Step 1.5: Checking the expiration date of the serial number
Now put a new line to the ini-file in the following format: ExpDate=YYYYMMDD. For example:
ExpDate=20000101
The date specified in this line must be already passed, that is, the maximum date is yesterday. When we run the program, we should see the following:
state = SERIAL_STATE_FLAG_DATE_EXPIRED please register!
Now let’s get some more information before the “please register” message is shown and the program exists:
if (res) { VMProtectSerialNumberData sd = {0}; VMProtectGetSerialNumberData(&sd, sizeof(sd)); printf("exp. date: y = %d, m = %d, d = %d\n", sd.dtExpire.wYear, sd.dtExpire.bMonth, sd.dtExpire.bDay); printf("please register!\n"); return 0; }
The second run of the app now provides more details to us:
state = SERIAL_STATE_FLAG_DATE_EXPIRED exp. date: y = 2000, m = 1, d = 1 please register!
Ok, now remove the ExpDate=… line from the ini-file, so it will not influence everything else we are to do.