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.

320 lines
9.2 KiB

  1. //
  2. // This file will be processed by the MIDL tool to
  3. // produce the type library (sessmgr.tlb) and marshalling code.
  4. import "oaidl.idl";
  5. import "ocidl.idl";
  6. import "wtypes.idl";
  7. import "rdshost.idl";
  8. [
  9. local,
  10. object,
  11. uuid(19E62A24-95D2-483A-AEB6-6FA92914DF96),
  12. dual,
  13. helpstring("IRemoteDesktopHelpSession Interface"),
  14. pointer_default(unique)
  15. ]
  16. interface IRemoteDesktopHelpSession : IDispatch
  17. {
  18. //
  19. // Properties
  20. //
  21. // All properties returns
  22. //
  23. // E_HANDLE : Help Session has been deleted.
  24. // E_POINTER : Parameter is NULL
  25. // E_OUTOFMEMORY : Out of memory
  26. // E_UNEXPECTED : Internal Error
  27. //
  28. //
  29. // Help Session ID
  30. [propget, id(1), helpstring("property HelpSessionId")]
  31. HRESULT
  32. HelpSessionId(
  33. [out, retval] BSTR *pVal
  34. );
  35. //
  36. // TS Session ID
  37. //
  38. // Additional Return :
  39. //
  40. // S_FALSE : User has logoff.
  41. //
  42. [propget, id(2), helpstring("property UserLogonId")]
  43. HRESULT
  44. UserLogonId(
  45. [out, retval] long *pVal
  46. );
  47. //
  48. // Help Account Name
  49. //
  50. [propget, id(3), helpstring("property AssistantAccountName")]
  51. HRESULT
  52. AssistantAccountName(
  53. [out, retval] BSTR *pVal
  54. );
  55. //
  56. // Help Session RDS setting, subject to group policy setting
  57. //
  58. [propput, id(4), helpstring("property UserHelpSessionRemoteDesktopSharingSetting")]
  59. HRESULT
  60. UserHelpSessionRemoteDesktopSharingSetting(
  61. [in] REMOTE_DESKTOP_SHARING_CLASS level
  62. );
  63. [propget, id(4), helpstring("property UserHelpSessionRemoteDesktopSharingSetting")]
  64. HRESULT
  65. UserHelpSessionRemoteDesktopSharingSetting(
  66. [out, retval] REMOTE_DESKTOP_SHARING_CLASS* pLevel
  67. );
  68. //
  69. // Retrieve connect parms for this help session
  70. //
  71. [propget, id(5), helpstring("property ConnectParms")]
  72. HRESULT
  73. ConnectParms(
  74. [out, retval] BSTR* pConnectParm
  75. );
  76. ///////////////////////////////////////////////////////////////////
  77. //
  78. // Methods
  79. //
  80. //
  81. //
  82. // Delete Help
  83. //
  84. [id(6), helpstring("method DeleteHelp")]
  85. HRESULT
  86. DeleteHelp();
  87. //
  88. // Resolve help session to user session, if bstrResolverBlob
  89. // is NULL or empty string, Sessmgr pass cached ResolverBlob
  90. // to resolver
  91. //
  92. // Additional Return
  93. //
  94. // HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) No resolver for this session
  95. // HRESULT_FROM_WIN32(ERROR_INVALID_DATA) Can't convert Resolver's GUID
  96. //
  97. // error code from CoCreateInstance(ISAFRemoteDesktopCallback) or
  98. // ResolveTSRDPSessionID() call
  99. //
  100. [id(7), helpstring("method ResolveUserSession")]
  101. HRESULT
  102. ResolveUserSession(
  103. [in] BSTR bstrResolverBlob,
  104. [in] BSTR bstrExpertBlob,
  105. [in] LONG CallerProcessId,
  106. [out] ULONG_PTR* hHelpCtr,
  107. [out] LONG* pResolverErrorCode,
  108. [out, retval] long* plUserSession
  109. );
  110. //
  111. // Set User's TS session's RDS (Shadow) setting
  112. // if bEnable = TRUE, sessmgr takes help RDS setting and
  113. // set user's TS session's shadow level, if bEnable = FALSE,
  114. // sessmgr reset user's TS session's shadow level back to
  115. // original setting.
  116. //
  117. [id(8), helpstring("SetUserSessionRdsSetting")]
  118. HRESULT
  119. EnableUserSessionRdsSetting(
  120. [in] BOOL bEnable
  121. );
  122. [propget, id(9), helpstring("HelpSessionCreateBlob")]
  123. HRESULT
  124. HelpSessionCreateBlob(
  125. [out, retval] BSTR* Blob
  126. );
  127. [propput, id(9), helpstring("HelpSessionCreateBlob")]
  128. HRESULT
  129. HelpSessionCreateBlob(
  130. [in] BSTR Blob
  131. );
  132. [propget, id(10), helpstring("TimeOut")]
  133. HRESULT
  134. TimeOut( [out, retval] DWORD* pTimeOut );
  135. [id(11), helpstring("IsUserOwnerOfTicket")]
  136. HRESULT
  137. IsUserOwnerOfTicket(
  138. [in] BSTR UserSid,
  139. [out, retval] VARIANT_BOOL* pbOwn
  140. );
  141. };
  142. [
  143. local,
  144. object,
  145. uuid(8556D72C-2854-447D-A098-39CDBFCDB832),
  146. dual,
  147. helpstring("IRemoteDesktopHelpSessionMgr Interface"),
  148. pointer_default(unique)
  149. ]
  150. interface IRemoteDesktopHelpSessionMgr : IDispatch
  151. {
  152. //
  153. // Reset Help Assistant account password
  154. // bForce : TRUE - Force delete all pending help session entry
  155. // and reset password
  156. // FALSE - Reset password only if no more pending help session
  157. //
  158. [id(1), helpstring("method ResetHelpAssistantAccount")]
  159. HRESULT
  160. ResetHelpAssistantAccount(
  161. [in] BOOL bForce
  162. );
  163. //
  164. // Create a help session
  165. //
  166. [id(2), helpstring("method CreateHelpSession")]
  167. HRESULT
  168. CreateHelpSession(
  169. [in] BSTR bstrSessName,
  170. [in] BSTR bstrSessPwd,
  171. [in] BSTR bstrSessDesc,
  172. [in] BSTR bstrHelpCreateBlob,
  173. [out, retval] IRemoteDesktopHelpSession** ppIRDHelpSession
  174. );
  175. //
  176. // Delete help session
  177. [id(3), helpstring("method DeleteHelpSession")]
  178. HRESULT
  179. DeleteHelpSession(
  180. [in] BSTR HelpSessionID
  181. );
  182. //
  183. // Retrieve/open an existing help session.
  184. [id(4), helpstring("method RetrieveHelpSession")]
  185. HRESULT
  186. RetrieveHelpSession(
  187. [in] BSTR HelpSessionID,
  188. [out, retval] IRemoteDesktopHelpSession** ppIRDHelpSession
  189. );
  190. //
  191. // Verify help session password, refer to IRemoteDesktopHelpSession's
  192. // ResolveUserSession() method for bstrResolverBlob parameter.
  193. //
  194. [id(5), helpstring("method VerifyUserHelpSession")]
  195. HRESULT
  196. VerifyUserHelpSession(
  197. [in] BSTR HelpSessionId,
  198. [in] BSTR bstrSessPwd,
  199. [in] BSTR bstrResolverBlob,
  200. [in] BSTR bstrExpertBlob,
  201. [in] LONG CallerProcessId,
  202. [out] ULONG_PTR* phHelpCtr,
  203. [out] LONG* pResolverErrCode,
  204. [out, retval] long* pdwUserLogonSession
  205. );
  206. //
  207. // Verify if a help session is valid
  208. //
  209. [id(6), helpstring("method IsValidHelpSession")]
  210. HRESULT
  211. IsValidHelpSession(
  212. [in] BSTR HelpSessionId,
  213. [in] BSTR bstrSessPwd
  214. );
  215. //
  216. // User session's RDS setting.
  217. [id(7), helpstring("method GetUserSessionRdsSetting")]
  218. HRESULT
  219. GetUserSessionRdsSetting(
  220. [out, retval] REMOTE_DESKTOP_SHARING_CLASS* sessionRdsLevel
  221. );
  222. //
  223. // Unsolicated support
  224. //
  225. [id(8), helpstring("method RemoteCreateHelpSession")]
  226. HRESULT
  227. RemoteCreateHelpSession(
  228. [in] REMOTE_DESKTOP_SHARING_CLASS sharingClass,
  229. [in] LONG timeOut,
  230. [in] LONG userSessionId,
  231. [in] BSTR userSid,
  232. [in] BSTR bstrHelpCreateBlob,
  233. [out, retval] BSTR* parms
  234. );
  235. //
  236. // Unsolicated support
  237. //
  238. [id(9), helpstring("method CreateHelpSessionEx")]
  239. HRESULT
  240. CreateHelpSessionEx(
  241. [in] REMOTE_DESKTOP_SHARING_CLASS sharingClass,
  242. [in] BOOL fEnableCallback,
  243. [in] LONG timeOut,
  244. [in] LONG userSessionId,
  245. [in] BSTR userSid,
  246. [in] BSTR bstrHelpCreateBlob,
  247. [out, retval] IRemoteDesktopHelpSession** ppIRDHelpSession
  248. );
  249. //
  250. // Event log, Can't use optional parameter or RPC will
  251. // throw an exception, can't use defaultvalue, default
  252. // value works with VB not with C++.
  253. //
  254. [id(10), helpstring("method LogSalemEvent")]
  255. HRESULT
  256. LogSalemEvent(
  257. [in] LONG ulEventType,
  258. [in] LONG ulEventCode,
  259. [in] VARIANT* EventString
  260. );
  261. //
  262. // Prepare Salem for system restore
  263. //
  264. [id(11), helpstring("method PrepareSystemRestore")]
  265. HRESULT
  266. PrepareSystemRestore();
  267. };
  268. [
  269. uuid(71F1098A-2D69-45D7-B19E-D3B902323F66),
  270. version(1.0),
  271. helpstring("sessmgr 1.0 Type Library")
  272. ]
  273. library RDSESSMGRLib
  274. {
  275. importlib("stdole32.tlb");
  276. importlib("stdole2.tlb");
  277. [
  278. uuid(A6A6F92B-26B5-463B-AE0D-5F361B09C171),
  279. helpstring("RemoteDesktopHelpSessionMgr Class")
  280. ]
  281. coclass RemoteDesktopHelpSessionMgr
  282. {
  283. [default] interface IRemoteDesktopHelpSessionMgr;
  284. };
  285. };