- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to use an existing dll.How can I link a dll with my routine?
Bye,
Jan.
Jan.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Method 1). You need the .lib file which comes with .dll, and link your program with it. If it's written in another language, you need to examine exported routine names using dumpbin /exports or "Dependency Walker", and write INTERFACEs to routines, with ALIAS attribute.
Method 2). If you don't have the .lib, you can use "dynamic binding" with pointers to functions. Search this Forum for "GetProcAddress" -- there should be a plenty of samples (one CVF sample from AdvancedDll also demonstrates that, or see MAPI module on my home page).
In any case, you have to know routine prototypes (calling convention, return value, number and types of arguments) so that you can write INTERFACEs correctly, thus you need at least a piece of suitable documentation for the dll itself.
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page