From: stanton AT haas DOT berkeley DOT edu (Richard Stanton) Subject: Re: DLL help needed... 23 Dec 1997 10:50:24 -0800 Message-ID: <9712231654.AA0664.cygnus.gnu-win32@volans75.wco.com> References: <349f7828 DOT 48009513 AT smtp DOT netzone DOT com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII To: jeffdb AT netzone DOT com Cc: gnu-win32 AT cygnus DOT com >>>>> ">>" == Mikey writes: > [c:\projects\excel]exe > i 10.000000, j 11.000000, k -1.#IND00 >> Could this help? >> __attribute__((__stdcall__)) double RHS (double x, double y) > { > return (x + y); > } Thanks for the suggestion. It makes some difference, but unfortunately not to the output! With this change, I no longer need to compile with the -mrtd option, and I need to change my dll.def file - using -mrtd I need RHS RHS AT 16=RHS Using the explicit stdcall attribute in the .C file, and compiling without -mrtd, the DEF file needs to be the other way round: RHS AT 16 RHS=RHS AT 16 However, the program output is the same: C:\PROJECTS\excel>exe i 10.000000, j 11.000000, k -1.#IND00 Again, if I use exactly the same files, but replacing every "double" with a "short", (and RHS AT 4 instead of RHS AT 16 where appropriate) the program runs perfectly. I just tried again, this time removing all stdcall references. The program still fails, but this time I get C:\PROJECTS\excel>exe i 10.000000, j 11.000000, k 0.000000 (the last number is supposed to be the sum of the other two) I'm still confused... Richard Stanton - 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".