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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with DLL's 1

Status
Not open for further replies.

jerasi

Programmer
Jun 19, 2000
141
CA
I am working on an Extended Stored Procedure and i need to call funcions from another dll file, how do I import (or include) the dll file in my project?

Thank you.
 
There are three ways of doing it(that I am aware of):
- 1. implicit linking - you need to have the .h and .lib files of of the dll(and the dll itself). you put #include mydll.h in your code and mydll.lib in ProjectSettings->Link->Object/modules

- 2. explicit linking - you need to use the LoadLibrary/FreeLibrary to load the dll and GetProcAddress for every exported function from the dll

- 3. #import - usually for COM dlls (which are being registered with regsvr32.exe). You will need to use the .tlb file of the dll. use "#import" and "using namespace" to be able to create one object with CreateInstance and the use its functions/Interfaces.

Hope this helps, s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top