You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why result false when compare the two release codes?
// Compare the two release codes
result := AnsiUpperCase(ReleaseCodeString) = AnsiUpperCase(BufferToHex(CalculatedReleaseCode, sizeof(CalculatedReleaseCode)));
function IsReleaseCodeValid (ReleaseCodeString: string; const SerialNumber : longint) : boolean;
var
CalculatedReleaseCode : TCode;
begin
// Remove spaces from the Release code
while pos(' ', ReleaseCodeString) > 0 do
System.Delete(ReleaseCodeString, pos(' ', ReleaseCodeString), 1);
// Calculate the release code based on the serial number and the calculated machine modifier
InitSerialNumberCode(MachineKey, SerialNumber, Expires, CalculatedReleaseCode);
// Compare the two release codes
result := AnsiUpperCase(ReleaseCodeString) = AnsiUpperCase(BufferToHex(CalculatedReleaseCode, sizeof(CalculatedReleaseCode)));
end;
The text was updated successfully, but these errors were encountered:
OnGuard\onguard\examples\regdemo
uni_regcommon.pas
Why result false when compare the two release codes?
// Compare the two release codes
result := AnsiUpperCase(ReleaseCodeString) = AnsiUpperCase(BufferToHex(CalculatedReleaseCode, sizeof(CalculatedReleaseCode)));
function IsReleaseCodeValid (ReleaseCodeString: string; const SerialNumber : longint) : boolean;
var
CalculatedReleaseCode : TCode;
begin
// Remove spaces from the Release code
while pos(' ', ReleaseCodeString) > 0 do
System.Delete(ReleaseCodeString, pos(' ', ReleaseCodeString), 1);
// Calculate the release code based on the serial number and the calculated machine modifier
InitSerialNumberCode(MachineKey, SerialNumber, Expires, CalculatedReleaseCode);
// Compare the two release codes
result := AnsiUpperCase(ReleaseCodeString) = AnsiUpperCase(BufferToHex(CalculatedReleaseCode, sizeof(CalculatedReleaseCode)));
end;
The text was updated successfully, but these errors were encountered: