SHARE
TWEET

Untitled

a guest Dec 14th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <windows.h>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     const char* output = "XXXXXX";
  8.     const size_t len = strlen(output) + 1;
  9.     HGLOBAL hMem =  GlobalAlloc(GMEM_MOVEABLE, len);
  10.     memcpy(GlobalLock(hMem), output, len);
  11.     GlobalUnlock(hMem);
  12.     OpenClipboard(0);
  13.     EmptyClipboard();
  14.     SetClipboardData(CF_TEXT, hMem);
  15.     CloseClipboard();
  16.     MessageBox( 0, "License Key: XXXXXX", " This has automatically been copied to your clipboard", 0 );
  17.     return 0;
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top