I cannot for the life of me get my application to only accept HWID-locked serial numbers.
At the moment I can create a license without a serial number field and the program just opens.
I want to get my protected program HWID locked. I'm using Delphi and I don't see any example codes on how to accomplish this.
I appreciate the support. Thank you.
Software opens without HWID in Serial
Re: Software opens without HWID in Serial
Look at our examples from C:\Users\Public\Documents\VMProtect\Licensing\Delphi
Re: Software opens without HWID in Serial
I used exact example found in that folder but it still does not lock to HWID.
You can create a license without a HWID and the program will open.
If you create a license with the wrong HWID that doesn't match the machine you are on, it also opens.
It's reading machine HWID correctly and putting it to string 'buf' to 'HWID'.
It reads license correctly. I'm not sure what I'm missing here.
You can create a license without a HWID and the program will open.
If you create a license with the wrong HWID that doesn't match the machine you are on, it also opens.
It's reading machine HWID correctly and putting it to string 'buf' to 'HWID'.
It reads license correctly. I'm not sure what I'm missing here.
Re: Software opens without HWID in Serial
It seems you still don't understand how our licensing system works. VMProtect doesn't do it automatically. You have to use VMProtectSetSerialNUmber for checking a serial number at the start of your application something like this:I used exact example found in that folder but it still does not lock to HWID.
Code: Select all
program Project2;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils, Classes, VMProtectSDK;
var
FileName: String;
Lines: TStringList;
I, SerialState: Integer;
Serial: AnsiString;
begin
Serial:='';
FileName:=ExtractFilePath(ParamStr(0))+'serial.key';
if FileExists(FileName) then
begin
Lines:=TStringList.Create;
Lines.LoadFromFile(FileName);
for I:=0 to Lines.Count-1 do
Serial:=Serial+AnsiString(Lines[I]);
Lines.Free;
end;
if (Serial = '') then
begin
Writeln('ERROR: Serial number not foud');
exit;
end;
SerialState := VMProtectSetSerialNumber(PAnsiChar(Serial));
if (SerialState <> SERIAL_STATE_SUCCESS) then
begin
Writeln('ERROR: VMProtectSetSerialNumber returns ' + IntToStr(SerialState));
exit;
end;
Writeln('Hello world!');
end.
Re: Software opens without HWID in Serial
I have it setting the serial number by reading a text file in the same folder. That’s not the problem. It reads serial number fine and will open when it’s the correct one, but it fails to actually lock to the HWID. I could set HWID incorrectly in license and program will still open.
Re: Software opens without HWID in Serial
I don't understand what is "set HWID incorrectly. Is this HWID from other computer?
P.S. I attached my example with my HWID in a license. Try to execute Project2.vmp.exe on your computer.
P.S. I attached my example with my HWID in a license. Try to execute Project2.vmp.exe on your computer.
- Attachments
-
- Project2.zip
- (4.91 MiB) Downloaded 532 times
Re: Software opens without HWID in Serial
Sorry I didn't explain well. It does appear the program is indeed checking the HWID to see if it matches or not, but if I create a serial number without HWID the program still opens. I want it to require a HWID in the serial number in order to open.
Meaning if a serial number is created without a HWID it should be seen as invalid and the program should not open.
Meaning if a serial number is created without a HWID it should be seen as invalid and the program should not open.
Re: Software opens without HWID in Serial
I don't see any problem - just always make serial numbers with HWID )Meaning if a serial number is created without a HWID it should be seen as invalid and the program should not open.
Re: Software opens without HWID in Serial
Someone could strip HWID out of license and make program no longer locked to machine. That defeats the purpose. There should be a way to force SDK to verify serial number with HWID included as GOOD STATE and serial number without HWID as BAD STATE. It's too easy to take the serial numbers apart and create an unlocked version.
Re: Software opens without HWID in Serial
Could you explain us how it's possible?Someone could strip HWID out of license and make program no longer locked to machine.