Subject: Re: DLL help needed...
From: [email-masked] (Richard Stanton)

23 Dec 1997 10:50:24 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
To: [email-masked]
Cc: [email-masked]

>>>>> ">>" == Mikey  <[email-masked]> 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@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@16
RHS=RHS@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@4 instead of RHS@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
"[email-masked]" with one line of text: "help".