Re: Turning off name-decoration
- From: "TheBlasphemer" <theblasp@xxxxxxxxx>
- Date: Fri, 27 Jan 2006 20:26:17 +0100
Just "Initialize"...
"Victor Bazarov" <v.Abazarov@xxxxxxxxxxxx> wrote in message
news:uG1$Pb3IGHA.2912@xxxxxxxxxxxxxxxxxxxxxxx
> 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
.
- References:
- Turning off name-decoration
- From: TheBlasphemer
- Re: Turning off name-decoration
- From: Victor Bazarov
- Turning off name-decoration
- Prev by Date: Re: Stange GetModuleFilename() behaviour
- Next by Date: Re: the process of debugging
- Previous by thread: Re: Turning off name-decoration
- Next by thread: Re: Turning off name-decoration
- Index(es):