Re: Queries about DLL Exports
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Thu, 23 Nov 2006 12:23:58 -0500
"Mohammad Omer" <momer114@xxxxxxxxx> wrote in message
news:1164289961.023137.46060@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
is it possible to export variable and classes with using def file?
I believe you can export a global variable the same way you export a
function: just mention its name in DEF file.
It's impractical to export a class via DEF file. Linker doesn't know
anything about classes: exporting a class really means exporting every
method of the class, under its mangled name. If you are curious, perform
an experiment: create a DLL project export a class with a few methods
via __declspec(dllexport), then use Dependency Walker
(www.dependencywalker.com) on the resulting DLL to see the names that
actually got exported. These are the names you would have had to list in
DEF file, and update every time your class definition changes.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: Queries about DLL Exports
- From: Mohammad Omer
- Re: Queries about DLL Exports
- References:
- Queries about DLL Exports
- From: Mohammad Omer
- Re: Queries about DLL Exports
- From: Doug Harrison [MVP]
- Re: Queries about DLL Exports
- From: Mohammad Omer
- Queries about DLL Exports
- Prev by Date: Re: Pipe - Conecpt
- Next by Date: Re: "try = _try"
- Previous by thread: Re: Queries about DLL Exports
- Next by thread: Re: Queries about DLL Exports
- Index(es):
Relevant Pages
|