Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-04-05
4
Medium Priority
?
1,896 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
Clif earned 800 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 200 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Make the most of your online learning experience.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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…
Simple Linear Regression
Suggested Courses

705 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