Solved

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

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
A short article about problems I had with the new location API and permissions in Marshmallow
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now