Solved

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

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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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 …
Suggested Courses

628 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