![]() |
Serial Checking Using Own .DLL
Hey all,
We are currenly building an installer which can install one of our own tailor-made products. We would like to do serial checking during installation. The idea was that we make our own dll, and start this with parameters trough NSIS (by making a custom dialog) the dll gives a response[return?] but is NSIS able to catch up this responses or reactions from an external program/libary? Is this possible ? Or do you have some other bright ideas ? Thanks in advance. |
2 possibilities:
you will need to build your dll as a nsis-plugin dll, or call it by system-plugin. example-code for plugin-dlls to interact with nsis stack and variables is delievered in every nsis build, more on that in the documentation, as i'm not familiar with plugin programming :) maybe lobo lunar, deguix, or the nsis devs may help. calling your own dll with the system plugin doesn't require you to rewrite it, so have a look at the system plugin readme to see how to use it. code would look like that: code: code will be the same if you redesign your dll as nsis-plugin, except of this change: except of code: u'd use code: |
Hi Comm@nder21,
first of all thanks for your reply (Mike and I are building the installer together and I will take the plugin building into my account). The code certainly clears some blanks for me. However, the real difference between an NSIS plugin and the system DLL is still a bit unclear to me. Basically they look the same in your code but I am a bit confused on how to write the DLL (or what differentiates them from eachother). I have already started writing a simple plugin but I think I can get it to work just as you did in your example. Do you also have any idea on how to extract the input from a custom dialog and put it in a variable to pass to the serial checking function? Background: In total, the serial checking function passes these values: Username, Address, Zip code, City, Expiration date, Licensetype (true license (1) or demo license (0)) and of course the serial number to check. Later on I also want to add modules to it (eg. the client buys one module, so he cannot use the other modules, just the one he bought). The code in the DLL then performs some calculations on the input and calculates the serial. Then it compares the serial to the one supplied by the user. Return values should be indeed something like true or false, just like you pointed out in your example. Thanks again, Martin |
the system dll is a plugin for nsis delievered with any nsis distribution.
it is used to interact between "normal" dlls and nsis. if you code your own plugin you'll have to use special code to interact with nsis. (variables, stack) system dll already has this code and interacts with your dll like every other program, but also it can interact with nsis using nsis specific features. so it is the easiest way. |
| All times are GMT. The time now is 04:40. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.