Quote Originally Posted by 2kaud View Post
clip is a handle - not a pointer to data. Once you have the handle then you need to obtain a memory pointer from it. or this use GlobalLock(clip). The return value is a pointer to the data. If not nulllptr then the data can be copied.

Note that once the data has been copied then you use GlobalUnlock() and then CloseClipBoard(). Don't close if no error before the data has been copied.

See https://docs.microsoft.com/en-us/win...-the-clipboard for an example.


Well, I may not use the clip the correct way but I successfully get the string so the string length is correct. The question is why this is not enough and the clipboard is empty.