char cD[] ="http://rfb.";
if(OpenClipboard(NULL))
{
HGLOBAL hmem=GlobalAlloc(GHND,20);
char *pmem=(char*)GlobalLock(hmem);
EmptyClipboard();
memcpy(pmem,cD,20);
SetClipboardData(CF_TEXT,hmem);
CloseClipboard();
GlobalFree(hmem);
}
wchar 转成char
const WCHAR* guid
char test[6];
int ret;
ret = wcstombs ( test, guid, sizeof(test) );