Subject: Re: DLL help needed
From: [email-masked] (Jens Yllman)

10 Nov 1998 04:14:26 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Carlos Albar-Diaz <[email-masked]>, [email-masked]

 Hello,

 I'm quite new to use gcc to compile on the win32 platform. So I'm not
sure I can help you. But one of the big problems is namemangling.
Especially when we compile C++ programs. That's why you use the extern
"C" syntax on functions that should use C namemangling. But when it is
win32 functions they should be using pascal namemangling and parameter
passing. This is only if the system is to call the function. And
probably MS Excel whan the pascal namemangling. And what I understand is
that __stdcall is used to get pascal namemangling and parameter passing. 
 What exactly is the problem? Do you get any error messages? How does
the names look in the .dll? Have you exported the functions? I'm not
sure the __stdcall does that. I guess you link a .def file with the .dll
to export the functions. Have you looked att the site for mingw32???

 Jens Yllman

Carlos Albar-Diaz wrote:
> 
> I am not able to use my mingw32-built DLLs from MS Excel.  The problem seems to be the DLLs need to use the __stdcall convention, and the instructions/makefiles I have are for _cdecl convention.
> 
> How do I make a dll from an .o file that contains a function defined woth __stdcall? How do I find out the mangling of the function name?  Mumit's makefiles do all this OK until I put __stdcall in the function.
> 
> I have browsed the files but none of the "recipes" I saw  work with __stdcall.
> 
> I will greatly appreciate your help.
> 
> Carlos
> 
> -----
> Free e-mail group hosting at http://www.eGroups.com/
> -
> For help on using this list (especially unsubscribing), send a message to
> "[email-masked]" with one line of text: "help".
------------------------------------------------------------
Uniweb AB                            Phone:  +46 8 626 42 00
P O Box 745                          FAX:    +46 8 626 42 01
S-191 27  SOLLENTUNA
SWEDEN                               http://www.uniweb.se/
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".