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.

116 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1998-2000 Microsoft Corporation
  3. Module Name :
  4. rdpdyn.h
  5. Abstract:
  6. This module is the dynamic device management component for RDP device
  7. redirection. It exposes an interface that can be opened by device management
  8. user-mode components running in session context.
  9. Revision History:
  10. --*/
  11. #pragma once
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif // __cplusplus
  15. // Our Pool Tag
  16. #define RDPDYN_POOLTAG ('dpdr')
  17. //
  18. // Opaque Associated Data for a Device Managed by this Module
  19. //
  20. typedef void *RDPDYN_DEVICEDATA;
  21. typedef RDPDYN_DEVICEDATA *PRDPDYN_DEVICEDATA;
  22. //
  23. // A structure representing the instance information associated with
  24. // a particular device. Note that this is only currently used for
  25. // DO's sitting on top of our physical device object.
  26. //
  27. typedef struct tagRDPDYNDEVICE_EXTENSION
  28. {
  29. // Device object we call when sending messages down the DO stack.
  30. PDEVICE_OBJECT TopOfStackDeviceObject;
  31. } RDPDYNDEVICE_EXTENSION, *PRDPDYNDEVICE_EXTENSION;
  32. // RDPDYN IRP Dispatch function.
  33. NTSTATUS RDPDYN_Dispatch(
  34. IN PDEVICE_OBJECT DeviceObject,
  35. IN PIRP Irp
  36. );
  37. // This function is called when a new session is connected.
  38. void RDPDYN_SessionConnected(
  39. IN ULONG sessionID
  40. );
  41. // This function is called when an existing session is disconnected.
  42. void RDPDYN_SessionDisconnected(
  43. IN ULONG sessionID
  44. );
  45. // Disable, without removing, a client device, previously announced
  46. // via RDPDYN_AddClientDevice.
  47. NTSTATUS RDPDYN_DisableClientDevice(
  48. IN RDPDYN_DEVICEDATA deviceData
  49. );
  50. // Enable a printer device disabled by a call to RDPDYN_DisablePrinterDevice. Note
  51. // that printer devices are enabled by default when they are added.
  52. NTSTATUS RDPDYN_EnableClientDevice(
  53. IN RDPDYN_DEVICEDATA deviceData
  54. );
  55. // Init function for this module.
  56. NTSTATUS RDPDYN_Initialize(
  57. );
  58. // Shutdown function for this module.
  59. NTSTATUS RDPDYN_Shutdown(
  60. );
  61. // This shouldn't really be here...
  62. // Dispatch a device management event to the appropriate (session-wise)
  63. // user-mode device manager component. If there are not any event request
  64. // IRP's pending for the specified session, then the event is queued for
  65. // future dispatch.
  66. NTSTATUS RDPDYN_DispatchNewDevMgmtEvent(
  67. IN PVOID devMgmtEvent,
  68. IN ULONG sessionID,
  69. IN ULONG eventType,
  70. OPTIONAL IN DrDevice *devDevice
  71. );
  72. //
  73. // Callback for completion of a client send message request.
  74. //
  75. typedef VOID (RDPDR_ClientMessageCB)(
  76. IN PVOID clientData,
  77. IN NTSTATUS status
  78. );
  79. //
  80. // Send a message to the client with the specified session ID.
  81. //
  82. NTSTATUS
  83. DrSendMessageToSession(
  84. IN ULONG SessionId,
  85. IN PVOID Msg,
  86. IN DWORD MsgSize,
  87. OPTIONAL IN RDPDR_ClientMessageCB CB,
  88. OPTIONAL IN PVOID ClientData
  89. );
  90. #ifdef __cplusplus
  91. } // extern "C"
  92. #endif // __cplusplus