Re: Turning off name-decoration
- From: Victor Bazarov <v.Abazarov@xxxxxxxxxxxx>
- Date: Fri, 27 Jan 2006 14:20:50 -0500
TheBlasphemer wrote:
I've got a DLL file that I want to access from my code. To achieve this I used:
dumpbin <filename> /exports
then made a .def file and ran
lib /def:deffile
which gives me a nice library file.
Next in the header file I tried to add a function:
HRESULT __stdcall Initialize(GUID *guid, DWORD IDCRLVersion /* should be 1 */, DWORD dwFlags /*should be 0xF*/);
But that fails with the message:
1>main.obj : error LNK2019: unresolved external symbol "long __stdcall Initialize(struct _GUID *,unsigned long,unsigned long)" (?Initialize@@YGJPAU_GUID@@KK@Z) referenced in function _main
I also tried adding extern "C" to it, but even that resulted in:
1>main.obj : error LNK2019: unresolved external symbol _Initialize@12 referenced in function _main
Is there a way to turn off name mangling completely? or is there another way to get this to link properly?
When you do 'dumpbin /exports', what's the actual name of the symbol that corresponds to the 'Initialize' function?
V -- Please remove capital As from my address when replying by mail Sorry, I do not respond to top-posted replies, please don't ask .
- Follow-Ups:
- Re: Turning off name-decoration
- From: TheBlasphemer
- Re: Turning off name-decoration
- References:
- Turning off name-decoration
- From: TheBlasphemer
- Turning off name-decoration
- Prev by Date: Re: Stange GetModuleFilename() behaviour
- Next by Date: Re: Stange GetModuleFilename() behaviour
- Previous by thread: Turning off name-decoration
- Next by thread: Re: Turning off name-decoration
- Index(es):
Relevant Pages
|
|