[Toc][Index]

DosFindClose



#define INCL_DOSFILEMGR

USHORT  rc = DosFindClose(DirHandle);

HDIR             DirHandle;     /* Directory search handle */

USHORT           rc;            /* return code */

Example 
This example searches for a file, then closes the search. 

#define INCL_DOSFILEMGR
#define SEARCH_PATTERN "*.*"
#define FILE_ATTRIBUTE 0
#define RESERVED 0L

HDIR  FindHandle;

   FindHandle = 0x0001;
   FindCount = 1;

   rc = DosFindFirst(SEARCH_PATTERN,        /* File pattern */
                     &FindHandle,           /* Directory search handle */
                     FILE_ATTRIBUTE,        /* Search attribute */
                     &FindBuffer,           /* Result buffer */
                     sizeof(FindBuffer),    /* Result buffer length */
                     &FindCount,            /* # of entries to find */
                     RESERVED);             /* Reserved (must be zero) */
   rc = DosFindClose(FindHandle);           /* Directory search handle */


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