comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Using CALL_EXTERNAL with C++ Code
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Using CALL_EXTERNAL with C++ Code [message #37820] Sat, 31 January 2004 16:07 Go to next message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
ebertf@gmx.de (Florian Meyer) wrote in message news:<14e53261.0401290549.2bc4d13d@posting.google.com>...
> ...(snip)...
> Compiling with C is working fine, but when the ending of the wrapper
> file is *.cpp or if you use the option /Tp (means: compile this as
> C++) then IDL is causing an error.
>
> Can anybody give me a hint, what could be wrong or need to changed
> when switching to c++?
>
> Florian

Just a guess, but try compiling with the /TC option - compile as C.
Re: Using CALL_EXTERNAL with C++ Code [message #37887 is a reply to message #37820] Tue, 03 February 2004 01:42 Go to previous message
ebertf is currently offline  ebertf
Messages: 12
Registered: January 2004
Junior Member
I got a solution for my problem. For anyone, who might be interested:
When using the C++ Compiler the names in the EXPORT LIST are decorated
with funny tags.

An example:
An entry in your DLL, lookin like this:

_declspec(dllexport) IDL_INT IDL_CDECL dllquest(int argc, void
*argv[])
{
<your C++ code>
}

is causing a name in the exportlist like this:

?dllquest@@YAFHQAPAX@Z

With CALL_EXTERNAL you need to call the second one, then it works and
you can process C++ Code in IDL. Using C-Compiler (option /Tc with cl)
the names are equal.
How the the Compiler changed the names can be obtained with a command
from the DOS Prompt on the OBJECT File the compiler created:

DUMPBIN <*.obj-File> /SYMBOLS

There you can find both names.

I think there are other ways to work around this problem (not to call
this weired decorated names) with a *.def File. But I don�t know how
to do that. If anybody can give a little 'manual' how to create such a
DLL I were very grateful.

Florian
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Memory Headache II
Next Topic: Re: Still getting trouble with ROI's

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:56:10 PDT 2025

Total time taken to generate the page: 0.00519 seconds