Reputation: 11399
I have like 10 C++ applications that run independendly (like "mydll1.dll", mydll2.dll"). These are single products that can be purchased separately. They are COM objects that other applications can use.
They can be activated/licensed through an interface. I have put this interface into a single application ("licenseserver.exe").
I did not want to include the same licensing interface into each of the COM dlls because that would be redundancy.
At instanciation, each COM dll will check if it had been licensed/activated.
If they are not, I want to bring up the licenseserver.exe that will tell the user that the COM dll was not activated yet and offer him options to activate it.
I have not found a smart way to do that yet.
I was thinking about letting the COM server start licenseserver.exe with a parameter.
Would that be a valid approach, and if yes, how would I do that?
Thank you for the help!
Upvotes: 0
Views: 125
Reputation: 20063
One option is to create an interface for the license server and an out of process COM server (licenseserver.exe
) that provides it's implementation. When your individual components need to request licensing information from the user you just create an instance of the license object. This will cause the COM subsystem to automatically start the server if it's not already running. This provides greater control over the information presented to the user as you can create a much more robust interface that you could with command line parameters. This will also allow you to request the licensing information and active the component in a more fluid manner instead of having them perform multiple steps.
Upvotes: 1
Reputation: 446
You could consider registering a URI scheme for your licenseserver.exe application and then use LaunchUriAsync to invoke it and pass parameters.
Upvotes: 0