Finds files residing along paths. The path string may come from the process environment, or be supplied directly by the caller.
#define INCL_DOSFILEMGR
#define INCL_DOSMISC
#include <os2.h>
ULONG flag; /* A word bit vector that controls the behavior of DosSearchPath. */
PSZ pszPathOrName; /* Address of the path. */
PSZ pszFilename; /* Address of the ASCIIZ file name. */
PBYTE pBuf; /* Address of the path name of the file, if found. */
ULONG cbBuf; /* The length, in bytes, of pBuf. */
APIRET ulrc; /* Return Code. */
ulrc = DosSearchPath(flag, pszPathOrName,
pszFilename, pBuf, cbBuf);