Solved

dll without visible references "Can't add a reference to the specified file"

Posted on 2007-04-05
4
1,883 Views
Last Modified: 2012-06-21
I am writing a dll which uses methods to calculate certain variables.
This dll is provided to a software creator who uses this dll in his programms which is then distributed to the public.

Now my problem, the software provider needs to see the functions when using my dll in his software, so I declared them public.
When he distributes the dll with his software I want to avoid that other users use this functions to perform certain calculations is there a way.

I have seen dll which when I try to reference them in VB the message:
Can't add a reference to the specified file
comes up mut I know the dll is used with methods and so on
How can I do the same for my dll
0
Comment
Question by:themroc
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
Clif earned 200 total points
ID: 18857703
You can create a license file which contains an encoded string.  Let your vender know how to decode the string and, when they do, pass it to your dll.  If the decoded password "fits", allow the dll to execute.  If not, throw up a message box informing the unauthorized developer that he needs a license.
0
 

Author Comment

by:themroc
ID: 18857763
Is there a way to prevent already that the user can see the methods in the object browser with F2

0
 
LVL 2

Assisted Solution

by:IanWelch
IanWelch earned 50 total points
ID: 18862205
"Is there a way to prevent already that the user can see the methods in the object browser with F2"

No, not that I know of.

Another option is to create your component as an invisible user-control and compile it as an OCX. There's an option in Project/Properties to 'Require License Key' and when that's checked VB will create a 'lic' file which must be present in order to use the control at design-time. So you would need to give your customer the OCX and LIC file so that they can add it to their project. Then they just distribute the OCX without the LIC file. Obviously, the drawback to this approach is that the control needs to be added to a form before it can be used.

Unfortunately, that type of functionality isn't available for DLLs so you need to 'Do It Yourself' as Clif suggested.
0
 

Author Comment

by:themroc
ID: 18957437
thanks for the comments, was not quiet what I expected but did help
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question