Page 1 of 1

FAttrib()

PostPosted: Fri Oct 17, 2008 10:52 am
by Badara Thiam
Hi,

The function FAttrib() of my FWH pack return 1 when she must return 0.
I have created a new function who return same values than Clipper Tools
3, with the same name. This function work perfectly in Clipper and Harbour Windows programs. No problem under 98, XP, Vista.

Thanl you to inform me if she not work for you.

Regards,

Code: Select all  Expand view
******************
FUNCTION FILEATTR(cFichier)
*****************
LOCAL nAttr := GetFileAttributes(cFichier)
IF nAttr >= 256
* Attribut "Temporaire"
  nAttr := nAttr % 256
ENDIF
IF nAttr >= 128
* Attribut "Normal"
  nAttr := nAttr % 128
ENDIF
RETURN nAttr

***************************
DLL FUNCTION GetFileAttributes( lpszSearchFile AS STRING ) AS DWORD ;
PASCAL FROM "GetFileAttributesA" LIB "KERNEL32.DLL"
**************************