Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use dll without registering

Status
Not open for further replies.

wrchto

IS-IT--Management
Jan 3, 2001
14
AT
I have heard that I do not have to register a dll to use it from my VB-program. It is possible to use the dll when it is in the same program directory as my VB-program. But that does not work!
I have the dll and the program in the same directory on my server. When I start the program from my client, I want to use the dll in the same directory without registering it on every client. Do I have to program that extra in my program?

Can anybody help me???

Thomas
 
It depends on what the DLL contains. If the DLL has pure API calls written in 'C' then the DLL does not need to be registers ( as there is nothing in it to register !!). All you need to do in your program is to declare the external functions as follows:

Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long

If the DLL contains objects that are instanciated within your program, then the DLL MUST be registerd otherwise windows system does not know what the objects are and you will get error messages of the type 'Cannot create object'

Hope this helps,


Chris Dukes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top