DLL32 FUNCTION - is Pascal in any case necessary

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

DLL32 FUNCTION - is Pascal in any case necessary

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: DLL32 FUNCTION - is Pascal in any case necessary

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply