Looking some code on codeguru.com, I encounted following interesting comment "Use GlobalLock and GlobalUnlock instead of simply assuming the memory handle to be a pointer".
As I understand, it's about hBmp.
In another place, I saw GlobalLock for the handle of a clipboard object.
I'm confused a little, first of all, because all operations are executing inside processing single message and can't imagine, why memory could be moved or discarded.
Is it really necessary to execute GlobalLock/Unlock in such situations ?
As I understand, it's about hBmp.
In another place, I saw GlobalLock for the handle of a clipboard object.
I'm confused a little, first of all, because all operations are executing inside processing single message and can't imagine, why memory could be moved or discarded.
Is it really necessary to execute GlobalLock/Unlock in such situations ?
Comment