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.

80 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1999-2000 Microsoft Corporation
  3. Module Name:
  4. Drfile
  5. Abstract:
  6. This module provides generic device/file handle operation
  7. Author:
  8. JoyC 11/10/1999
  9. Revision History:
  10. --*/
  11. #ifndef __DRFILE_H__
  12. #define __DRFILE_H__
  13. #include <rdpdr.h>
  14. #include "drobject.h"
  15. #include "smartptr.h"
  16. ///////////////////////////////////////////////////////////////
  17. //
  18. // Defines and Macros
  19. //
  20. ///////////////////////////////////////////////////////////////
  21. #define DRFILEHANDLE HANDLE
  22. #define INVALID_TS_FILEHANDLE INVALID_HANDLE_VALUE
  23. //
  24. // DrFile Class Declaration
  25. //
  26. //
  27. class DrDevice;
  28. class DrFile: public RefCount
  29. {
  30. protected:
  31. ULONG _FileId;
  32. DRFILEHANDLE _FileHandle;
  33. DrDevice* _Device;
  34. public:
  35. //
  36. // Constructor
  37. //
  38. DrFile(DrDevice *Device, ULONG FileId, DRFILEHANDLE FileHandle);
  39. virtual ~DrFile();
  40. //
  41. // Return the class name.
  42. //
  43. virtual DRSTRING ClassName() { return TEXT("DrFile"); }
  44. ULONG GetID() {
  45. return _FileId;
  46. }
  47. DRFILEHANDLE GetFileHandle() {
  48. return _FileHandle;
  49. }
  50. virtual ULONG GetDeviceType();
  51. virtual BOOL Close();
  52. };
  53. #endif // DRFILE