Finds the first file object or group of file objects whose names match the specification. The specification can include extended attributes (EA) associated with a file or directory.

#define INCL_DOSFILEMGR
#include <os2.h>

PSZ       pszFileSpec;  /*  Address of the ASCIIZ path name of the file or subdirectory to be found. */
PHDIR     phdir;        /*  Address of the handle associated with this DosFindFirst request. */
ULONG     flAttribute;  /*  Attribute value that determines the file objects to be searched for. */
PVOID     pfindbuf;     /*  Result buffer. */
ULONG     cbBuf;        /*  The length, in bytes, of pfindbuf. */
PULONG    pcFileNames;  /*  Pointer to the number of entries: */
ULONG     ulInfoLevel;  /*  The level of file information required. */
APIRET    ulrc;         /*  Return Code. */

ulrc = DosFindFirst(pszFileSpec, phdir, flAttribute,
         pfindbuf, cbBuf, pcFileNames, ulInfoLevel);


[Back] [Next]