Page 1 of 1

DLL32 FUNCTION - is Pascal in any case necessary

Posted: Wed Nov 28, 2007 10:10 am
by Otto
In clipper I declared the function without PASCAL and it worked.
Harbour gives you Harbour Exception.

DLL32 FUNCTION MOVEFILE( cExistingFileName AS LPSTR, cNewFileName AS LPSTR ) AS BOOL PASCAL FROM "MoveFileA" LIB "kernel32.dll"

Is PASCAL for all DLL32 FUNCTION necessary? (vrd.prg clipper does it include without) - if yes double check your code

Re: DLL32 FUNCTION - is Pascal in any case necessary

Posted: Wed Nov 28, 2007 10:47 am
by Enrico Maria Giordano
I've always used PASCAL clause even in 16 bit days. I think it depends on the DLL. All system DLLs need PASCAL clause.

EMG

Posted: Wed Nov 28, 2007 11:07 am
by Antonio Linares
PASCAL means that the called function rearranges its own C stack, so the calling function hasn't to do it. Its very important and yes, it is needed.