dynamically link to the function in a DLL 
Author Message
 dynamically link to the function in a DLL

Hello! I'm a beginner in using Visual C++ 6.0 and I need to
know how to dynamically link to the functions in a dll. I
need to know what type of file need to be included. I know
that you need to #include the header file and possibly
*.lib library file in addition to the *.dll in the working
directory. Any help would be greatly appreciated.

Quan



Tue, 20 Jan 2004 01:03:08 GMT  
 dynamically link to the function in a DLL
Greets,

    Because the .DLL file contains the code itself, this is definitely a
file that must be distributed.  In order to know the names of the exported
symbols and how the stack itself behaves (as well as how to access
parameters passed on the stack) the header (.H file) is required to provide
the necessary declarations for the functions exported from the DLL.  One may
or may not choose to include a .LIB file as part of the distribution.  Not
all import libraries can be shared between different link tools.  You may,
however, choose to distribute a .DEF file with the DLL entry points, most
development tools come with a utility to create an import library from the
.DEF file.  The import library is only necessary if you wish to provide
early binding to the symbols in your DLL.  Late binding can be done at
runtime with the use of LoadLibrary() and GetProcAddress();  in this case,
only the .DLL and .H files are required.

Regards,

Joe


Quote:
> Hello! I'm a beginner in using Visual C++ 6.0 and I need to
> know how to dynamically link to the functions in a dll. I
> need to know what type of file need to be included. I know
> that you need to #include the header file and possibly
> *.lib library file in addition to the *.dll in the working
> directory. Any help would be greatly appreciated.

> Quan



Tue, 20 Jan 2004 02:30:35 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Address of dynamically linked functions

2. Address of dynamically linked functions

3. How to REALLY free a dynamically linked DLL.

4. Modeless dialog boxes in dynamically linked dll

5. regular dlls dynamically linked to mfc

6. AFX_MANAGE_STATE in dynamically linked DLL

7. Restricting access to a dynamically linked DLL

8. Dynamically calling a __stdcall function in a DLL

9. Linking against exported functions in a DLL

10. Linking error in calling a function exporting from a DLL

11. About explicit linking to DLL functions:

12. DLL doesn't link runtime functions

 

 
Powered by phpBB® Forum Software