Note that the MSDN entry on the SetClipboardData function states:
If the hMem parameter identifies a memory object, the object must have been allocated using the function with the GMEM_MOVEABLE flag.
Rather than the GMEM_FIXED you are using. See the following article for further information (including the need to unlock the memory before closing the Clipboard)
I have found this Microsoft example which is using GEM_FIXED... it's part of the MFC documentation. As it disagrees with the entry for the SetClipboardData function, I am suspicious of it.