Link to home
Start Free TrialLog in
Avatar of bhushanp
bhushanp

asked on

avoid dll from referencing

Hello all,
I am creating an application that interacts with the database via a dll. the dll also has other bussiness logics and encryption of data, implemented.
Since i will be distributing the dll with my application, there arise a need to know how do i avoid/stop my dll from being referenced by other projects.
Like for eg: if one tries reference any dll(pick any one randomly from the system32 folder), it will say "can't add a reference to the specific file". i want something like this, so that my logic remains protected in dll.
Any ways to go about it ??
Have a great day,
happy programming
Bhushan
ASKER CERTIFIED SOLUTION
Avatar of y2ksw
y2ksw

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HarmnKardn
HarmnKardn

If you want to be an uber-bastard, you could require all your client's computers to have net access, and the client developer machine make a socket connection with a simple registration server you write and admin yourself.  

You'll be able to monitor everyone who instantiates your COM objects online, even implement some form of authentication to let some users make some objects, other users no objects, etc.

However, this approach is painful and impractical.  Instead I'd recommend y2ksw's solution number 3) (the Init procedure).
Just a note:  The specifics of "can't add a reference to the specific file" refer to the fact that the dll selected does not contain a valid type library embedded.  That is all.

As for your problem, I also vote for option 3) above, although you can always make the dll require licensing.  But again, I think VB is not capable of making use of runtime-only licensed dlls because it does not compile the license key for this particular type of COM houses.
Avatar of bhushanp

ASKER

Hello all,
i worked on the option no. 3 posted by y2ksw and it worked just well as i needed.
Thanks for your response.
Bye
Best regards
Bhushan
Hello all,
i worked on the option no. 3 posted by y2ksw and it worked just well as i needed.
Thanks for your response.
Bye
Best regards
Bhushan
bhushanp:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
> Who deserves points here?

Me :-)
Avatar of DanRollins
Moderator, my recommended disposition is:

    Accept y2ksw's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer