begin hMutex := CreateMutex(nil, False, PChar(MUTEX_NAME)); if (hMutex = 0) then Halt; if GetLastError = ERROR_ALREADY_EXISTS then begin // Send command-line to running instance if ParamCount > 0 then SendArgsToRunningInstance(ParamStr(1)); // extend to multiple args CloseHandle(hMutex); Halt; end;
Click and select Yes when prompted to save the file. This creates a FileActivation.xml file, typically on your desktop. Activating the File : File Activation Delphi 2016
Signature := TNetEncoding.Base64.Decode(RSA_Sign(DataToSign, PrivateKey)); // pseudo Move(Signature[0], License.Signature, Length(Signature)); begin hMutex := CreateMutex(nil
var hMutex: THandle;
Your activation server (or a simple Delphi tool you keep in-house) signs the file. You will need a private key (e.g., from OpenSSL). For brevity, assume you have a SignData function that uses RSA-SHA256. if (hMutex = 0) then Halt