This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Exporting fns from .EXE files

At 07:37 PM 2/25/98 -0500, you wrote:
>Hello, vischne.  Below is the information I promised you.  Could you post
it to the gnuwin32 list for me, as I don't remember the address off the top
of my head, and I'm only subscribed at work.
>The steps to export functions from an .exe are as follows : 
>1.)  Write a .def file listing the name of the function(s) you want to
>2.)  Use this command line :
>"dlltool --def defname.def --dllname exename --output-exp exename.exp
>-v --nodelete",
>where : 'defname.def' is the name of your .DEF file, and 'exename' is
>the name of your executable program, minus the .EXE extension.  This
>will produce a temporary file named 'tappname.exp'.  
>3.)  Edit this temporary file, changing :
>	name:	.asciz	"APPNAME"
>	name:	.asciz	"APPNAME.EXE"
>Remember to keep the quotes when editing the file!
>4.)  Assemble this temporary file, and link the resultant .o file into
>your executable with ld.
>Hope this helps!  Feel free to direct any questions to my work account
>( or my personal account
Well, let's see:

dlltool --def ExportLib.def --dllname ExportLib --output-exp ExportLib.exp
-v --nodelete
// Followed by the appropriate editing of tExportLib.exp
as tExportLib.exp -o tExportLib.o
gcc -O -o ExportLib ExportLib.c tExportLib.o -luser32 -lkernel32

and the following occurs:
LIBCALL  EXE         3,584  02-26-98 12:46a libcall.exe
EXPORT~1 EXE         4,096  02-26-98 12:43a ExportLib.exe
         2 file(s)          7,680 bytes
         0 dir(s)     806,846,464 bytes free

libhandle = 0
Calling export1 with address 0x0
Calling export2 with address 0x0
Calling export3 with address 0x0

Guess I'll have to wait until recovers from whatever stops
incoming http connections to go after all the documentation I lost
with my last disk crash.

For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]