Solved

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

Posted on 2007-04-05
4
1,882 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

803 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