IDL Linkimage and Borland Compiler DLLs [message #10349] |
Tue, 18 November 1997 00:00 |
Stefan Grudszus
Messages: 1 Registered: November 1997
|
Junior Member |
|
|
Dear developers!
Using Borland C++ Compiler (V.5.02) to create 32bit DLLs to be called by
IDL's linkimage to add IDL system function creates a severe problem, I
cannot understand. Therefore, I try to contact any expert in this area for
help.
Suppose the simple example of chapter 15 "adding system routines" from IDL
Advanced User Guide.
Using this example, compiling it with MSVC and adding the function "mult2"
to IDL via the merged DLL function works very well.
Using Borland Compiler results in a system cash as IDL accesses the
destination data pointer of the IDL_Variable structure depicted in chapter
6.
Here is a fragment of code I added before line 17 of the example, where
the program crashes:
> sprintf(szMsg, "%s %x %s %d %s %d %s %x%s %x ",
> "pointer src= ", (int) src,
> "\nsrc->type: " , src->type,
> "\ncompare with type: ", IDL_TYP_FLOAT,
> "\nsrc->flags: ", src->flags,
> "\nsrc->value.arr: ", (int) (src->value.arr));
>
> MessageBox (NULL, (LPSTR)szMsg, (LPSTR)"Message from mult2.dll",
> MB_OK | MB_ICONINFORMATION);
line 17: src_d = dst_d = (float *) src->value.arr->data;
And here is the output of the message box:
> pointer src: 20222390
> src type: 4
> compare with type: 4
> src flag: 16
> src->value.arr: 0
Everything is ok, dspite the NULL POINTER (!!!!!) in the last line.
I urgently need a solution to this problem, but I did not find one.
Using MSVC gives a raesonable pointer, Borland gives a NULL pointer !?
May I need to change my compiler or linker settings.
I am working on a Pentium PC with Windows 95.
Any help appreciated. Please answer soon. Thanks a lot in advance.
Regards, Stefan
--
Dipl. Ing. Stefan Grudszus
plettac electronic security GmbH
Wuerzburger Str. 150
D-90766 Fuerth / Bayern / Germany
Phone: +49 911 703 4158
Fax : +49 911 703 4121
eMail: S.Grudszus@gmx.net
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
|
|
|