Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

  1. #ifndef __INCLUDE_UTIL
  2. #define __INCLUDE_UTIL
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /* Attempt to fopen pszFileName in mode pszMode. If that fails, try it in the subdirectory
  7. above the current one. Continue up the directory tree until you reach the top. Return
  8. NULL only if ALL attempts fail. In case of success, return the actual path to the
  9. opened file in pszFullPath. cchFullPathMax is the size of the buffer pszFullPath
  10. points to. */
  11. FILE *
  12. UtilOpen(
  13. TCHAR *pszFileName, // File to open
  14. TCHAR *pszMode, // stdio mode string
  15. TCHAR *pszFullPath, // Out: path to file opened, if any
  16. int cchFullPathMax // size in bytes of pszFullPath
  17. );
  18. /* Same as UtilOpen except current directory is not used. Instead, search starts in
  19. directory named by pszPath */
  20. FILE *
  21. UtilOpenPath(
  22. TCHAR *pszPath, // Path to start looking for file
  23. TCHAR *pszFileName, // File to open
  24. TCHAR *pszMode, // stdio mode string
  25. TCHAR *pszFullPath, // Out: path to file opened, if any
  26. int cchFullPathMax // size in bytes of pszFullPath
  27. );
  28. #ifdef __cplusplus
  29. };
  30. #endif
  31. #endif //__INCLUDE_UTIL