Im having some trouble with this. Could someone help me change this function into masm, thanks.
Code:void CopyStringToClipboard(char *string) { LPTSTR lptstrCopy; OpenClipboard(NULL); EmptyClipboard(); HGLOBAL txt = GlobalAlloc(GMEM_DDESHARE, (strlen(string) + 1) * sizeof(TCHAR)); lptstrCopy = (char*)GlobalLock(txt); memcpy(lptstrCopy, string, (strlen(string)) * sizeof(TCHAR)); lptstrCopy[strlen(string)] = (TCHAR)0; GlobalUnlock(txt); SetClipboardData(CF_TEXT, txt); CloseClipboard(); }


Reply With Quote
