Results 1 to 2 of 2

Thread: C++ to masm

  1. #1
    ChimpFace9000
    Guest

    Post

    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();
    }

  2. #2
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    Did you try a disassemble?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width