Ok, I am a complete newbie at ASM. All I am trying to do, is have a message box that displays the text of the clipboard with the GetClipboardData function. I know this sounds REALLY dumb, but i have been trying to do it for the last 10 minutes... lol

...

simon
Posted on 2001-11-08 21:43:12 by boxdot3
The GetClipboardData function retrieves data from the clipboard in a specified format. The clipboard must have been opened previously.

HANDLE GetClipboardData(

UINT uFormat // clipboard format
);
Parameters

uFormat

Specifies a clipboard format. For a description of the clipboard formats, see the SetClipboardData function.

Return Value

If the function succeeds, the return value is the handle of a clipboard object in the specified format.
-----------------------------------------------------------------

simon,

Some stupid questions:
have you opened the clipboard before ?
The function returns a valid handle in eax?
Is there anything valid ASCII in the clipboard (more than 32 char value) ?

Otherwise, send the code.


Bye
Posted on 2001-11-09 01:02:47 by Bit7
You have to also open the clipboard first
Try the following code:

invoke OpenClipboard,NULL
invoke GetClipboardData,CF_TEXT
invoke MessageBox,NULL,eax,NULL,MB_OK
Posted on 2001-11-09 17:51:55 by grv575