1 /* 2 * PROJECT: ReactOS Applications 3 * LICENSE: LGPL - See COPYING in the top level directory 4 * FILE: base/applications/msconfig_new/fileutils.h 5 * PURPOSE: File Utility Functions 6 * COPYRIGHT: Copyright 2011-2012 Hermes BELUSCA - MAITO <hermes.belusca@sfr.fr> 7 */ 8 9 #ifndef __FILEUTILS_H__ 10 #define __FILEUTILS_H__ 11 12 #pragma once 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 // 19 // NOTE: A function called "FileExists" with the very same prototype 20 // already exists in the PSDK headers (in setupapi.h) 21 // 22 BOOL 23 MyFileExists(IN LPCWSTR lpszFilePath, 24 OUT PWIN32_FIND_DATAW pFindData OPTIONAL); 25 26 //////////////////////////////////////////////////////////////////////////////// 27 typedef LRESULT 28 (*PQUERY_FILES_TABLE_ROUTINE)(IN LPCWSTR Path, 29 IN LPCWSTR FileNamesQuery, 30 IN LPCWSTR ExpandedFileNamesQuery, 31 IN PWIN32_FIND_DATAW pfind_data, 32 IN PVOID Context, 33 IN PVOID EntryContext); 34 35 #define QUERY_FILES_TABLE_ROUTINE(fnName) \ 36 LRESULT (fnName)(IN LPCWSTR Path, \ 37 IN LPCWSTR FileNamesQuery, \ 38 IN LPCWSTR ExpandedFileNamesQuery, \ 39 IN PWIN32_FIND_DATAW pfind_data, \ 40 IN PVOID Context, \ 41 IN PVOID EntryContext) 42 43 typedef struct __tagQUERY_FILES_TABLE 44 { 45 PQUERY_FILES_TABLE_ROUTINE QueryRoutine; 46 PVOID EntryContext; 47 // Other fields ? 48 } QUERY_FILES_TABLE, *PQUERY_FILES_TABLE; 49 50 LRESULT 51 FileQueryFiles(IN LPCWSTR Path, 52 IN LPCWSTR FileNamesQuery, 53 IN PQUERY_FILES_TABLE QueryTable, 54 IN PVOID Context); 55 56 //////////////////////////////////////////////////////////////////////////////// 57 58 BOOL BackupIniFile(IN LPCWSTR lpszIniFile); 59 60 #ifdef __cplusplus 61 } // extern "C" 62 #endif 63 64 #endif // __FILEUTILS_H__ 65