[Toc][Index]

DosFindFirst2



typedef struct _FDATE {   /* fdate */
 
  unsigned day   : 5;     /* binary day for directory entry */
  unsigned month : 4;     /* binary month for directory entry */
  unsigned year  : 7;     /* binary year for directory entry */
 
} FDATE;

typedef struct _FTIME {       /* ftime */
 
  unsigned twosecs : 5;       /* binary number of two-second increments */
  unsigned minutes : 6;       /* binary number of minutes */
  unsigned hours   : 5;       /* binary number of hours */
 
} FTIME;

typedef struct _FILEFINDBUF {   /* findbuf */
 
  FDATE  fdateCreation;         /* file date of creation */
  FTIME  ftimeCreation;         /* file time of creation */
  FDATE  fdateLastAccess;       /* file date of last access */
  FTIME  ftimeLastAccess;       /* file time of last access */
  FDATE  fdateLastWrite;        /* file date of last write */
  FTIME  ftimeLastWrite;        /* file time of last write */
  ULONG  cbFile;                /* file end of data */
  ULONG  cbFileAlloc;           /* file allocation */
  USHORT attrFile;              /* file attribute */
  UCHAR  cchName;               /* length of ASCIIZ name string */
  CHAR   achName[CCHMAXPATHCOMP]; /* ASCIIZ name string */
 
} FILEFINDBUF;

typedef struct _FILEFINDBUF2 {   /* findbuf */
 
  FDATE  fdateCreation;         /* file date of creation */
  FTIME  ftimeCreation;         /* file time of creation */
  FDATE  fdateLastAccess;       /* file date of last access */
  FTIME  ftimeLastAccess;       /* file time of last access */
  FDATE  fdateLastWrite;        /* file date of last write */
  FTIME  ftimeLastWrite;        /* file time of last write */
  ULONG  cbFile;                /* file end of data */
  ULONG  cbFileAlloc;           /* file allocation */
  USHORT attrFile;              /* file attribute */
  ULONG  cbList;                /* level 2 only field (calculate size of
                                    buffer) */
  UCHAR  cchName;               /* length of ASCIIZ name string */
  CHAR   achName[CCHMAXPATHCOMP]; /* ASCIIZ name string */
 
} FILEFINDBUF2;


typedef struct _GEA {       /* gea */
 
  BYTE cbName;            /* name length not including NULL */
  CHAR szName[1];         /* attribute name */
 
} GEA;

typedef struct _GEALIST {   /* geal */
 
  ULONG  cbList;          /* total bytes of structure including full list */
  GEA list[1];            /* variable length GEA structures */
 
} GEALIST;

typedef struct _FEA {       /* fea */
 
  BYTE fEA;               /* flags */
  BYTE cbName;            /* name length not including NULL */
  USHORT cbValue;         /* value length */
 
} FEA;

typedef struct _FEALIST {   /* feal */
 
  ULONG  cbList;          /* total bytes of structure including full list */
  FEA list[1];            /* variable length FEA structures */
 
} FEALIST;

typedef struct _EAOP {      /* eaop */
 
  PGEALIST fpGEAList;     /* general EA list */
  PFEALIST fpFEAList;     /* full EA list */
  ULONG  oError;
 
} EAOP;

#define INCL_DOSFILEMGR

USHORT  rc = DosFindFirst2(FileName, DirHandle, Attribute, ResultBuf,
                             ResultBufLen, SearchCount, Reserved);

PSZ              FileName;      /* File path name */
PHDIR            DirHandle;     /* Directory search handle */
USHORT           Attribute;     /* Search attribute */
PVOID            ResultBuf;     /* Result buffer */
USHORT           ResultBufLen;  /* Result buffer length *
PUSHORT          SearchCount;   /* Number of entries to find */
USHORT           FileInfoLevel; /* File data required */
ULONG            0;             /* Reserved (must be zero) */

USHORT           rc;            /* return code */


Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs