Page 1 of 1

Suppressing "Code requires a serial number to run..." dialog

Posted: Sat Nov 09, 2013 2:25 pm
by bitman2112
Hi,

I want to suppress the:

This code requires valid serial number to run.
Program will be terminated.


I tried erasing the string in Options and saving my vmp file, but after recompilation, it's still there!

Thanks.

:Ron

Re: Suppressing "Code requires a serial number to run..." di

Posted: Mon Nov 11, 2013 5:48 pm
by bitman2112
I guess I should say why I desire to suppress this particular messagebox.

My protected project is a COM plugin DLL that plugs into a 3rd party application, SONARPDR.EXE

Upon exhaustion of trial period, I put up a message box that the trial is up, and don't create the application object.
This messagebox has a title that is the same as my project - good.

The next dialog is the "Code requires a serial number to run" dialog from VMProtect. But this messagebox has the
Host Application's name in it SONARPDR so the user will no doubt think this error is coming from SONARPDR and that IT
has no proper serial number to run with
.

This is presumably because I did not create my object and am dead now.

This is why I will need to suppress this message box if at all possible.

Re: Suppressing "Code requires a serial number to run..." di

Posted: Fri Nov 15, 2013 4:22 am
by Admin
If you don't need to show this dialog you can check VMPotectgetSerialNumberState before calling of a locked by serial number function.
Something like this:

Code: Select all

VMProtectSetSerialNumber(...);
...
if (VMProtectGetSerialNumberState() == 0)
  function_locked_by_serial_number();
else {
  MessageBox("function_locked_by_serial_number() can not be called");
  return;
}

Re: Suppressing "Code requires a serial number to run..." di

Posted: Fri Nov 15, 2013 4:37 am
by bitman2112
Hu, I'll be....

Thanks.

Re: Suppressing "Code requires a serial number to run..." di

Posted: Sun Nov 17, 2013 8:00 pm
by bitman2112
Seems obvious now in retrospect.

Works just as well

спасибо! :)