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.

71 lines
1.4 KiB

  1. #if !defined( _FILE_IO_ )
  2. #define _FILE_IO_
  3. #include "io.hxx"
  4. #include "hmem.hxx"
  5. #include "secrun.hxx"
  6. DECLARE_CLASS( FILE_IO );
  7. class FILE_IO : public IO_OBJECT {
  8. public:
  9. NONVIRTUAL
  10. FILE_IO(
  11. ) { _file_handle = INVALID_HANDLE_VALUE; _buffer_size = 0; };
  12. VIRTUAL
  13. ~FILE_IO(
  14. ) { CloseHandle(_file_handle); };
  15. NONVIRTUAL
  16. BOOLEAN
  17. Initialize(
  18. IN ULONG Size
  19. ) { _buffer_size = Size; return TRUE; };
  20. VIRTUAL
  21. BOOLEAN
  22. Setup(
  23. IN PMEM Mem,
  24. IN PLOG_IO_DP_DRIVE Drive,
  25. IN HANDLE Application,
  26. IN HWND WindowHandle,
  27. OUT PBOOLEAN Error
  28. );
  29. VIRTUAL
  30. BOOLEAN
  31. Read(
  32. OUT PULONG pError
  33. );
  34. VIRTUAL
  35. BOOLEAN
  36. Write(
  37. );
  38. VIRTUAL
  39. PVOID
  40. GetBuf(
  41. OUT PULONG Size DEFAULT NULL
  42. );
  43. VIRTUAL
  44. PTCHAR
  45. GetHeaderText(
  46. );
  47. private:
  48. HANDLE _file_handle;
  49. PVOID _buffer;
  50. ULONG _buffer_size;
  51. TCHAR _header_text[64 + MAX_PATH];
  52. };
  53. #endif