
Licensing for ActiveX DLL's and EXE's
I know when you create a User Control (OCX) you can choose to have a license
key associated with it to prevent users of your program from using the
control in the VB IDE at design time.
I need to have the same protection for an ActiveX DLL I wrote. Is there a
way to prevent user's from setting a reference to your DLL and using it in
their own programs?
I created a work around for now by making the class (which I will call Class
A) PublicNotCreatable. I added a second PublicMultiUse class (Class B) that
is used ONLY to create an instance of Class A. Class B has a method
Sub ClassA_Create(PermissionID As Long)
that willl only succeed if the calling application passes in a long integer
of the correct value. Since I am the only one who knows the correct value,
I would like to think that I am the only one who can write a program that
can create an instance of Class A. So even if a user set a reference to my
DLL in his own VB program, he cannot create an instance of Class A. This
still does not prevent the user from viewing the methods, events and
properties of Class A from the VB Object Browser. But I guess there is no
harm there if he can't use the DLL.
It sure would be easier if there was a licensing option for ActiveX DLL's
and EXE's. Is there something I am missing?
Chis