FAttrib()

Post Reply
User avatar
Badara Thiam
Posts: 160
Joined: Tue Oct 18, 2005 10:21 am
Location: France
Contact:

FAttrib()

Post 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

******************
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"
**************************

Badara Thiam
http://www.icim.fr
Post Reply