22 _tcscpy ( szDirectory, szDirectory_ );
27 getcwd ( szDirectory,
sizeof(szDirectory)-1 );
29 int dirlen =
_tcslen(szDirectory);
30 if ( dirlen > 0 && szDirectory[dirlen-1] !=
'\\' )
34 _sntprintf ( szSearchPath,
sizeof(szSearchPath)-1,
_T(
"%s%s"), szDirectory, szFileSpec );
45 if ( !bSubsMustMatchFileSpec )
47 _sntprintf ( szTemp,
sizeof(szTemp)-1,
_T(
"%s%s"), szDirectory, wfd.cFileName );
57 _sntprintf ( szTemp,
sizeof(szTemp)-1,
_T(
"%s%s"), szDirectory, wfd.cFileName );
59 if ( !pProc ( &wfd, szTemp,
lParam ) )
67 if ( !bSubsToo || bSubsMustMatchFileSpec )
71 _sntprintf ( szSearchPath,
sizeof(szSearchPath)-1,
_T(
"%s*.*"), szDirectory );
81 _sntprintf ( szTemp,
sizeof(szTemp)-1,
_T(
"%s%s"), szDirectory, wfd.cFileName );
BOOL EnumFilesInDirectory(const TCHAR *szDirectory_, const TCHAR *szFileSpec, MYENUMFILESPROC pProc, long lParam, BOOL bSubsToo, BOOL bSubsMustMatchFileSpec)
BOOL(* MYENUMFILESPROC)(PWIN32_FIND_DATA, const TCHAR *, long)
int FixLFN(const TCHAR *pBadFileName, TCHAR *pGoodFileName)
_Check_return_ _Ret_opt_z_ _CRTIMP char *__cdecl getcwd(_Out_writes_opt_(_SizeInBytes) char *_DstBuf, _In_ int _SizeInBytes)
#define INVALID_HANDLE_VALUE
BOOL WINAPI FindClose(HANDLE hFindFile)
#define FILE_ATTRIBUTE_DIRECTORY
size_t safestrlen(const tchar *string)