|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Importing a dll
I'm sorta new to dlls, or more explicitly, how to use them. In my program, I have a line:
Code:
#import <msxml3.dll> Turns out, everyone who uses my program will have the dll, but I'm just not sure what's happening here, and I'd like to know. -mj |
|
#2
|
||||
|
||||
|
The #import statement is used to import a type library. Basically, it causes the compiler to create a set of function prototypes and definitions for the type library into a header file. Wrapper functions and Helper classes are also generated by the compiler. The actual code from the DLL is not imported into your compiler, just the function prototypes, so your friends will still need the DLL for your program to work.
Hope this helps! |
|
#3
|
|||
|
|||
|
Excellent, thanks.
|
|
#4
|
|||
|
|||
|
There's a second step that is generally necessary. Somewhere on your system is a file msxml3.lib that you will need to link against. This .lib file contains the function stubs so that you won't get unresolved references when you link your program.
The .lib file itself contains the necessary instructions to load the .DLL into memory and access its functions.
__________________
Clay Dowling Lazarus Notes Articles and commentary on web development http://www.lazarusid.com/notes/ |
|
#5
|
|||
|
|||
|
The library is created when you create the DLL. It is only needed when implicitly linking the DLL.
Else you can use the Dependancy walker ect and find the functions and then explicitly link using GetProcAddress() and LoadLibrary() ect
__________________
The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions. Frank Zappa |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Importing a dll |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|