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

Home » Public Forums » archive » Using CALL_EXTERNAL with C++ Code
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Using CALL_EXTERNAL with C++ Code [message #37856] Thu, 29 January 2004 05:49 Go to previous message
ebertf is currently offline  ebertf
Messages: 12
Registered: January 2004
Junior Member
Hello,
I have a problem compiling and linking a DLL in C++ and integrate it
into IDL via CALL External. Everything works fine with C in this way
using a wrapper function:

-------------------------------------------------
C-Code of wrapper function:

#include "stdio.h"
#include "idl_export.h"
#include "myDLL.h"

_declspec(dllexport) IDL_INT IDL_CDECL mydllquest(int argc, void
*argv[])
{
return (dllquest(((IDL_INT) argv[0])));
}

----------------------------------------------------
compiling and linking were done from the DOS Console (VC6 is
installed):

cl -DLL -DWIN32 -D_MT /nologo /I"C:\RSI\IDL60\external\include" /c
mydllglue.c /Fomydllglue.obj

link /out:mydllglue.dll /nologo /nodefaultlib /dll mydllglue.obj
"C:\RSI\IDL60\bin\bin.x86\idl32.lib" dll.lib msvcrt.lib kernel32.lib

-------------------------------------------------------

The call in IDL works like this:

res=call_external(<path of
mydllglue.dll>,'mydllquest',1,/cdecl,value=[0])


---------------------------------------------------------

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
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Student Edition & Object Graphics
Next Topic: object graphics question

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

Current Time: Wed Oct 08 14:52:46 PDT 2025

Total time taken to generate the page: 0.00345 seconds