delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/28/15:39:33

From: ebritten AT ea DOT oac DOT uci DOT edu (Eric Britten)
Subject: Exporting __stdcall Procs without _ and @n
28 Apr 1997 15:39:33 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.GSO.3.96.970428123108.3032A-100000.cygnus.gnu-win32@rigel.oac.uci.edu>
Reply-To: Eric Britten <ebritten AT ea DOT oac DOT uci DOT edu>
Mime-Version: 1.0
Original-To: gnu-win32 <gnu-win32 AT cygnus DOT com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

In order to build a control panel applet I need to export the function
CPlApplet from a dll.  It is declared using the __stdcall convention.
However using gcc it is exported as CPlApplet AT 16, even if I use the -k
option for dlltool.  If I use lcc, it is exported as _CPlApplet AT 16.

In order for windows 95 to be able to use the applet it must have an
export with the name CPlApplet with no name mangling at all.  

I tried to use the following def file to change the way the export is
named.

EXPORTS
	CPlApplet AT 16=CPlApplet

Dlltool returns an error about the = sign.  Lcc ignores it.  

Is there anyway to remove the _ and the @16 for the name of the exported
function so windows can find the function using GetProcAddress.

Thanks.

-----------------------------------------------
		Eric Britten
	      ebritten AT uci DOT edu
-----------------------------------------------


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019