You need to allocate the memory and copy the data to that before processing! 2. The behavior is totally undefeined and not assured by Windows. TIPS : Crashes or not, do not modify the memory acquired by GetClipboardData. Anyway, our new license does not crash like before. When user accidentaly pastes non license data, their "protection" leads crashing too. TBH, we are not sure if Spectrasonics intends to do this, because this can cause lots of side effects. Once activation file is generated and restarting the app, this code does not affect to its stability.
This will cause buffer overrun and it destroys the stack most time! However, on some computers, it won't crash immediately, or errors are ignored on some hosts. After adding space, the license length becomes longer than first input. SPACE ADDED : xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx. SPACE REMOVED : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. When you paste the license from previous keygen (no spaces!) : INPUT : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Win32::OpenClipboard(hWnd) hGlobal = Win32::GetClipboardData(CF_TEXT) clipboardData = Win32::GlobalLock(hGlobal) Spectrasonics::removeSpaces(clipboardData) Spectrasonics::addSpaces(clipboardData) (DO MORE THINGS HERE) Win32::GlobalUnlock(hGlobal) Win32::CloseClipboard() - When you paste legit license, nothing will happen : INPUT : xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx. Crashing app when pasting the license Here is pseudo code of PASTE function in the latest version. TECHNICAL INFORMATION - The ANTI-R2R KeyGen Ways added in the updates! 1.