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.

129 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1998-2000 Microsoft Corporation
  3. Module Name:
  4. w32drdev
  5. Abstract:
  6. This module defines the parent for the Win32 client-side RDP
  7. device redirection "device" class hierarchy, W32DrDevice.
  8. Author:
  9. Tad Brockway 3/23/99
  10. Revision History:
  11. --*/
  12. #ifndef __W32DRDEV_H__
  13. #define __W32DRDEV_H__
  14. #include "drdev.h"
  15. #include "thrpool.h"
  16. ///////////////////////////////////////////////////////////////
  17. //
  18. // Defines
  19. //
  20. //
  21. // String Resource Module Name
  22. //
  23. #define RDPDR_MODULE_NAME _T("rdpdr.dll")
  24. ///////////////////////////////////////////////////////////////
  25. //
  26. // W32DrDevice
  27. //
  28. class W32DrDevice : public DrDevice
  29. {
  30. protected:
  31. //
  32. // Client-Side Device Filename
  33. //
  34. TCHAR _devicePath[MAX_PATH];
  35. //
  36. // Handle to the RDPDR module. This is where string resources
  37. // come from.
  38. //
  39. HINSTANCE _hRdpDrModuleHandle;
  40. //
  41. // Read a string from the resources file.
  42. //
  43. ULONG ReadResources(ULONG ulMessageID, LPTSTR *ppStringBuffer,
  44. PVOID pArguments, BOOL bFromSystemModule);
  45. //
  46. // Supporting functions for IO Processing
  47. //
  48. virtual TCHAR* ConstructFileName(PWCHAR Path, ULONG PathBytes);
  49. virtual DWORD ConstructCreateDisposition(DWORD Disposition);
  50. virtual DWORD ConstructDesiredAccess(DWORD AccessMask);
  51. virtual DWORD ConstructFileFlags(DWORD CreateOptions);
  52. virtual BOOL IsDirectoryFile(
  53. DWORD DesiredAccess, DWORD CreateOptions, DWORD FileAttributes,
  54. PDWORD FileFlags);
  55. //
  56. // IO Processing Functions
  57. //
  58. // This subclass of DrDevice handles the following IO requests. These
  59. // functions may be overridden in a subclass.
  60. //
  61. // pIoRequestPacket - Request packet received from server.
  62. // packetLen - Length of the packet
  63. //
  64. //
  65. virtual VOID MsgIrpClose(
  66. IN PRDPDR_IOREQUEST_PACKET pIoRequestPacket,
  67. IN UINT32 packetLen
  68. );
  69. virtual VOID MsgIrpFlushBuffers(
  70. IN PRDPDR_IOREQUEST_PACKET pIoRequestPacket,
  71. IN UINT32 packetLen
  72. );
  73. // A cleanup is just a flush.
  74. virtual VOID MsgIrpCleanup(
  75. IN PRDPDR_IOREQUEST_PACKET pIoRequestPacket,
  76. IN UINT32 packetLen
  77. ) {
  78. DC_BEGIN_FN("W32DrDevice::MsgIrpCleanup");
  79. MsgIrpFlushBuffers(pIoRequestPacket, packetLen);
  80. DC_END_FN();
  81. }
  82. public:
  83. //
  84. // Public Methods
  85. //
  86. // Constructor/Destructor
  87. W32DrDevice(ProcObj *processObject, ULONG deviceID,
  88. const TCHAR *devicePath);
  89. virtual ~W32DrDevice();
  90. // Return the class name.
  91. virtual DRSTRING ClassName() { return TEXT("W32DrDevice"); }
  92. virtual DWORD InitializeDevice( DrFile* fileHandle ) { return ERROR_SUCCESS; }
  93. };
  94. #endif