DLL32 FUNCTION - is Pascal in any case necessary

DLL32 FUNCTION - is Pascal in any case necessary

Postby Otto » 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
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Re: DLL32 FUNCTION - is Pascal in any case necessary

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

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 72 guests

cron