FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FAttrib()
Posts: 160
Joined: Tue Oct 18, 2005 10:21 AM
FAttrib()
Posted: Fri Oct 17, 2008 10:50 AM
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,

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

Continue the discussion