Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* getData() {
- if (OpenClipboard(NULL) == 0)
- puts("No such luck!");
- HGLOBAL hData = GetClipboardData(CF_TEXT);
- char* pzData = GlobalLock(hData);
- int iDataSz = GlobalSize(hData);
- char* pzResult = calloc( strnlen( pzData , iDataSz ) + 1 );
- memcpy( pzResult , pzData , iDataSz );
- GlobalUnlock(hData);
- return pzResult;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement