I have this unstable and inconsistent problem that makes me go crazy for a long time: in my program, GetClipboardData (CF_TEXT) reaches 90% (or so) of the time, but every time it returns NULL.
This is despite the fact that OpenClipboard () is always successful (and returns a verified value) before calling GetClipboardData (CF_TEXT).
Please note that a success rate of 90% corresponds to the same page! (i.e., I know that there is CF_TEXT content)
Note. When this fails, I immediately call GetLastError (), but all it returns is, "Operation completed successfully . "
This code is simple as:
if (::OpenClipboard(hwndW))
{
HANDLE handleClip = ::GetClipboardData(CF_TEXT);
if (handleClip == NULL)
dw = GetLastError()
}
GetLastError() ?
, ?
, - ? , ?
- ?