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.

179 lines
6.4 KiB

  1. /****************************************************************************/
  2. // itssd.idl
  3. //
  4. // Terminal Server Session Directory Interface (ITSSessionDirectory) COM IDL.
  5. //
  6. // Copyright (C) 2000 Microsoft Corporation
  7. /****************************************************************************/
  8. import "basetsd.h";
  9. import "oaidl.idl";
  10. // Max number of disconnected sessions allowed from a disc session query.
  11. #define TSSD_MaxDisconnectedSessions 10
  12. /****************************************************************************/
  13. // TSSD_CreateSessionInfo
  14. //
  15. // Data block passed to session directory that completely identifies a
  16. // new TS session on the local machine. Combined with the local server address
  17. // this information corresponds to a session record in the session directory.
  18. /****************************************************************************/
  19. typedef struct _TSSD_CreateSessionInfo
  20. {
  21. WCHAR UserName[256];
  22. WCHAR Domain[128];
  23. DWORD SessionID;
  24. DWORD TSProtocol;
  25. WCHAR ApplicationType[256];
  26. DWORD ResolutionWidth;
  27. DWORD ResolutionHeight;
  28. DWORD ColorDepth;
  29. FILETIME CreateTime;
  30. } TSSD_CreateSessionInfo, *PTSSD_CreateSessionInfo;
  31. /****************************************************************************/
  32. // TSSD_DisconnectedSessionInfo
  33. //
  34. // Data block that contains required information about disconnected
  35. // sessions.
  36. /****************************************************************************/
  37. typedef struct _TSSD_DisconnectedSessionInfo
  38. {
  39. WCHAR ServerAddress[128];
  40. DWORD SessionID;
  41. DWORD TSProtocol;
  42. WCHAR ApplicationType[256];
  43. DWORD ResolutionWidth;
  44. DWORD ResolutionHeight;
  45. DWORD ColorDepth;
  46. FILETIME CreateTime;
  47. FILETIME DisconnectionTime;
  48. } TSSD_DisconnectedSessionInfo;
  49. /****************************************************************************/
  50. // TSSD_RepopulateSessionInfo
  51. //
  52. // Data block that contains required information about a session of any type.
  53. /****************************************************************************/
  54. typedef struct _TSSD_RepopulateSessionInfo
  55. {
  56. WCHAR *UserName;
  57. WCHAR *Domain;
  58. DWORD SessionID;
  59. DWORD TSProtocol;
  60. WCHAR *ApplicationType;
  61. DWORD ResolutionWidth;
  62. DWORD ResolutionHeight;
  63. DWORD ColorDepth;
  64. DWORD CreateTimeLow;
  65. DWORD CreateTimeHigh;
  66. DWORD DisconnectionTimeLow;
  67. DWORD DisconnectionTimeHigh;
  68. DWORD State;
  69. } TSSD_RepopulateSessionInfo;
  70. /****************************************************************************/
  71. // TSSD_ReconnectSessionInfo
  72. //
  73. // Data block that contains information that changes on session reconnection,
  74. // used to update the session directory record for that session.
  75. /****************************************************************************/
  76. typedef struct _TSSD_ReconnectSessionInfo
  77. {
  78. DWORD SessionID;
  79. DWORD TSProtocol;
  80. DWORD ResolutionWidth;
  81. DWORD ResolutionHeight;
  82. DWORD ColorDepth;
  83. } TSSD_ReconnectSessionInfo;
  84. /****************************************************************************/
  85. // ITSSessionDirectoryEx
  86. /****************************************************************************/
  87. [
  88. local,
  89. object,
  90. uuid(012b47b7-2f06-4154-ad0c-c64bcdf0d512),
  91. helpstring("ITSSessionDirectoryEx"),
  92. pointer_default(unique)
  93. ]
  94. interface ITSSessionDirectoryEx : IUnknown
  95. {
  96. [ helpstring("Queries load balance info using server address.") ]
  97. HRESULT GetLoadBalanceInfo(
  98. [in, string] LPWSTR LocalServerAddress,
  99. [out, retval] BSTR* pLBInfo);
  100. };
  101. /****************************************************************************/
  102. // ITSSessionDirectory
  103. /****************************************************************************/
  104. [
  105. local,
  106. object,
  107. uuid(0241e043-1cb6-4716-aa50-6a492049c3f3),
  108. helpstring("ITSSessionDirectory"),
  109. pointer_default(unique)
  110. ]
  111. interface ITSSessionDirectory : IUnknown
  112. {
  113. [ helpstring("Initializes the object post-creation.") ]
  114. HRESULT Initialize(
  115. [in, string] LPWSTR LocalServerAddress,
  116. [in, string] LPWSTR StoreServerName, // Max 64 chars incl. null.
  117. [in, string] LPWSTR ClusterName, // Max 64 incl null
  118. [in, string] LPWSTR OpaqueSettings, // Max 256 incl null
  119. DWORD Flags,
  120. DWORD (*repopfn)(), // pointer to repopulation function
  121. DWORD (*updatesd)(DWORD) ); // pointer to updatesd function
  122. [ helpstring("Updates the object with new configuration information.") ]
  123. HRESULT Update(
  124. [in, string] LPWSTR LocalServerAddress,
  125. [in, string] LPWSTR StoreServerName, // Max 64 chars incl. null.
  126. [in, string] LPWSTR ClusterName, // Max 64 incl null
  127. [in, string] LPWSTR OpaqueSettings,
  128. DWORD Flags, // Max 256 incl null
  129. BOOL ForceRejoin);
  130. [ helpstring("Queries disconnected sessions for a given user.") ]
  131. HRESULT GetUserDisconnectedSessions(
  132. [in, string] LPWSTR UserName,
  133. [in, string] LPWSTR Domain,
  134. [out] DWORD *pNumSessionsReturned,
  135. [out, length_is(*pNumSessionsReturned)]
  136. TSSD_DisconnectedSessionInfo SessionBuf[
  137. TSSD_MaxDisconnectedSessions]);
  138. [ helpstring("Called on a local-machine session creation.") ]
  139. HRESULT NotifyCreateLocalSession(TSSD_CreateSessionInfo *pCreateInfo);
  140. [ helpstring("Called on a local-machine session destruction.") ]
  141. HRESULT NotifyDestroyLocalSession(DWORD SessionID);
  142. [ helpstring("Called on a local-machine session disconnection.") ]
  143. HRESULT NotifyDisconnectLocalSession(DWORD SessionID, FILETIME DiscTime);
  144. [ helpstring("Called on a local-machine session reconnection.") ]
  145. HRESULT NotifyReconnectLocalSession(TSSD_ReconnectSessionInfo *pReconnInfo);
  146. [ helpstring("Called immediately after revectoring client.") ]
  147. HRESULT NotifyReconnectPending(WCHAR *);
  148. [ helpstring("Called when repopulating all sessions in the session directory.") ]
  149. HRESULT Repopulate(DWORD WinStationCount, TSSD_RepopulateSessionInfo *rsi);
  150. [ helpstring("Ping Session Directory server to see if it will accept RPC call or not") ]
  151. HRESULT PingSD(WCHAR *pszServerName);
  152. [ helpstring("Wait for repopulate to complete") ]
  153. HRESULT WaitForRepopulate(DWORD dwTimeOut);
  154. };