How is this for subtlety:
Either declaration works perfectly in Win98.
In Win2K the first declaration statement works properly but the second one, although there is no error diagnostic, causes incorrect values to be returned by the function. The value of the global variable pxbor is ignored and taken as zero so the function simply returns the value of x.
This one was very difficult to find. Hope it saves someone else some time.
Regards,
Bern
------------------
Bern
www.insighttrading.com.au
Code:
'......................................................................................... 'The EXE code ' GLOBAL pxbor DECLARE FUNCTION x2d LIB "Plotengn.dll" (x AS DOUBLE) AS LONG ' OR DECLARE FUNCTION x2d LIB "Plotengn.dll "(x AS DOUBLE) AS LONG . . '.......................................................................................... 'The DLL code ' ' GLOBAL pxbor ' ' FUNCTION x2d(x AS DOUBLE) EXPORT AS LONG x2d=x+pxbor END FUNCTION
In Win2K the first declaration statement works properly but the second one, although there is no error diagnostic, causes incorrect values to be returned by the function. The value of the global variable pxbor is ignored and taken as zero so the function simply returns the value of x.
This one was very difficult to find. Hope it saves someone else some time.
Regards,
Bern
------------------
Bern
www.insighttrading.com.au
Comment