Using these functions, you can easily protect your commercial macros from using beyond the evaluation period.
You and your cutomers must have QM 2.1.5 or later.
_________________
Version 1.0.1.
Fixed bug causing the dialog to stop working when encrypted.
Version 1.0.2.
Computer-specific registration codes.
More clear and secure.
Version 1.0.3.
Can be used in exe too.
Uses registry hive HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE. Using local machine would fail on Vista or when running as a limited (non admin) user. Please review registry variables in your SM_About and SM_CanRun. You probably have to change the value assigned to sm_registry_key_first_run.
Now we need a way to retrive and test codes from a webpage and this system will be dynamic :wink:
Im looking forward to your solution to this approach :lol:
Well uhmmm...
How about it accesses a URL with parameters, then captures some portion from the output?
That way it can send the used code to a preconfigured web address and let the website provide feedback about the validity of the code.
If that works the maintainer of the macro can have a script, javascript/CGI/whatever on a website with active codes he gave out.
And also have a posibility to revoke codes that way easyly and on the fly...
What if the user is disconnected from the Internet, or the url is temporarily unavailable? Other problem - delay, especially if the url is unavailable. In some cases, there may be delay of 10 - 30 seconds.
Maybe at first validate the regcode locally, then asynchronously access the url, and, if the regcode is invalid, lock later?
Well thats ofcourse up to the shareware writer....
He could also maybe set it to check once a week...
Besides its only checked at startup of the macro, so a small delay wont be a problem i think...
But incase of time-outs there should be a way to notice the user and let it retry...
never mind I know you cant use 0.1 I have looked through it and I was wondering if i may get a bit of help making it go by hours instead of days or mins instead of day.
Because I change the local time tor first day, the protection will fail and it can use again.
BTW, I want to modify the code to time limited macro, for example, one reg code will only use the macro 30 day(for example, 9/1 ~9/30, not real usage time), and the macro will need new reg code from me after 30 day, did you have any ideas or any macros?
Get time from internet? You can use function IntGetFile to download time from a time server or your website. But it is slow and unreliable, eg user can edit hosts file to disable connection to the webserver.
Instead you can use a counter and date-last-run. Save them in registry. When date-today is not = date-last-run, set date-last-run = date-today and increment counter. When counter is >30, disable your software.
I don't want to develop the shareware protection functions more.
DATE d="4/1/2003" ;add 2 days
d=d+2 out d ;subtract 1 hour SYSTEMTIME st
st.wHour=1 out d.sub(st) ;get difference in hours out d.diff("4.1.2003" st 1) out"%i/%i/%i %i:%i:%i" st.wMonth st.wDay st.wYear st.wHour st.wMinute st.wSecond
the results:
2003/4/3
2003/4/2 下午 11:00:00
Error (RT) in Macro3: 0x80020005, 類型不相符。. ?
DateTime DAY1.FromComputerTime DateTime DAY2=DAY1; DAY2.AddParts(2);;+2 days long day_diff DateTime.TimeSpanGetPartsTotal(DAY2-DAY1 day_diff) out day_diff
3. Probably the time string format is unavailable on your PC.
Hello i am trying to understand this but when i make new registry code (i also check it regedit it is created) and press unlock nothing happens it just close about page.
i dont understand where i make mistake
thank you