Leaked source code of windows server 2003
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.

55 lines
1.9 KiB

  1. //------------------------------------------------------------------------------------------
  2. // FileManager.h
  3. //
  4. // Contain code for loading and writting files.
  5. //
  6. // Created By: aarayas
  7. //
  8. // History: 01/11/2001
  9. //
  10. //------------------------------------------------------------------------------------------
  11. #ifndef _FILEMANAGER_H_
  12. #define _FILEMANAGER_H_
  13. #include <stdio.h>
  14. #include <windows.h>
  15. HANDLE CMN_CreateFileW(
  16. PCWSTR pwzFileName, // pointer to name of the file
  17. DWORD dwDesiredAccess, // access (read-write) mode
  18. DWORD dwShareMode, // share mode
  19. LPSECURITY_ATTRIBUTES pSecurityAttributes, // pointer to security descriptor
  20. DWORD dwCreationDistribution, // how to create
  21. DWORD dwFlagsAndAttributes, // file attributes
  22. HANDLE hTemplateFile); // handle to file with attributes to copy
  23. HANDLE CMN_CreateFileMapping(
  24. HANDLE hFile, // handle to file
  25. LPSECURITY_ATTRIBUTES lpAttributes, // security
  26. DWORD flProtect, // protection
  27. DWORD dwMaximumSizeHigh, // high-order DWORD of size
  28. DWORD dwMaximumSizeLow, // low-order DWORD of size
  29. LPCSTR lpName // object name
  30. );
  31. DWORD CMN_GetFileSize(
  32. HANDLE hFile, // handle to file
  33. LPDWORD lpFileSizeHigh // high-order word of file size
  34. );
  35. BOOL CMN_CloseHandle(
  36. HANDLE hObject // handle to object
  37. );
  38. LPVOID CMN_MapViewOfFile(
  39. HANDLE hFileMappingObject, // handle to file-mapping object
  40. DWORD dwDesiredAccess, // access mode
  41. DWORD dwFileOffsetHigh, // high-order DWORD of offset
  42. DWORD dwFileOffsetLow, // low-order DWORD of offset
  43. SIZE_T dwNumberOfBytesToMap // number of bytes to map
  44. );
  45. BOOL CMN_UnmapViewOfFile(
  46. LPCVOID lpBaseAddress // starting address
  47. );
  48. FILE* CMN_FOpen( const WCHAR* filename, const WCHAR* mode );
  49. #endif // _FILEMANAGER_H_