FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DLL32 FUNCTION - is Pascal in any case necessary
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
DLL32 FUNCTION - is Pascal in any case necessary
Posted: Wed Nov 28, 2007 10:10 AM

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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: DLL32 FUNCTION - is Pascal in any case necessary
Posted: Wed Nov 28, 2007 10:47 AM

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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
DLL32 FUNCTION - is Pascal in any case necessary
Posted: Wed Nov 28, 2007 11:07 AM

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

Continue the discussion