Source code of Windows XP (NT5)
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.

580 lines
14 KiB

  1. // sessmgr.idl : IDL source for sessmgr.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (sessmgr.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. import "rdspol.idl";
  8. typedef [
  9. uuid(3666e274-48a2-4f09-8ed5-0b492b07f2b7),
  10. helpstring("Help Session Status")
  11. ]
  12. enum {
  13. [helpstring("Help Session Status Unknown")] USERHELPSESSION_UNKNOWN=0x00,
  14. [helpstring("Help Session Status Waiting")] USERHELPSESSION_WAITING=0x01,
  15. [helpstring("Help Session Status User Logoff")] USERHELPSESSION_LOGOFF=0x02,
  16. [helpstring("Help Session Status Connected")] USERHELPSESSION_CONNECTED=0x04,
  17. [helpstring("Help Session Status RC In Progress")] USERHELPSESSION_RCINPROGRESS=0x08,
  18. } HELPSESSIONSTATUS;
  19. [
  20. local,
  21. object,
  22. uuid(19E62A24-95D2-483A-AEB6-6FA92914DF96),
  23. dual,
  24. helpstring("IRemoteDesktopHelpSession Interface"),
  25. pointer_default(unique)
  26. ]
  27. interface IRemoteDesktopHelpSession : IDispatch
  28. {
  29. //
  30. // Properties
  31. //
  32. // All properties returns
  33. //
  34. // E_HANDLE : Help Session has been deleted.
  35. // E_POINTER : Parameter is NULL
  36. // E_OUTOFMEMORY : Out of memory
  37. // E_UNEXPECTED : Internal Error
  38. //
  39. //
  40. // Help Session ID
  41. [propget, id(1), helpstring("property HelpSessionId")]
  42. HRESULT
  43. HelpSessionId(
  44. [out, retval] BSTR *pVal
  45. );
  46. //
  47. // TS Session ID
  48. //
  49. // Additional Return :
  50. //
  51. // S_FALSE : User has logoff.
  52. //
  53. [propget, id(2), helpstring("property UserLogonId")]
  54. HRESULT
  55. UserLogonId(
  56. [out, retval] long *pVal
  57. );
  58. //
  59. // Help Account Name
  60. //
  61. [propget, id(3), helpstring("property AssistantAccountName")]
  62. HRESULT
  63. AssistantAccountName(
  64. [out, retval] BSTR *pVal
  65. );
  66. //
  67. // Help Account password
  68. //
  69. [propget, id(4), helpstring("property AssistantAccountPassword")]
  70. HRESULT
  71. AssistantAccountPassword(
  72. [out, retval] BSTR *pVal
  73. );
  74. //
  75. // Help Session Name, sessmgr does not alter this property
  76. //
  77. [propget, id(5), helpstring("property HelpSessionName")]
  78. HRESULT
  79. HelpSessionName(
  80. [out, retval] BSTR *pVal
  81. );
  82. [propput, id(5), helpstring("property HelpSessionName")]
  83. HRESULT
  84. HelpSessionName(
  85. [in] BSTR newVal
  86. );
  87. //
  88. // Help Session Password.
  89. //
  90. [propget, id(6), helpstring("property HelpSessionPassword")]
  91. HRESULT
  92. HelpSessionPassword(
  93. [out, retval] BSTR *pVal
  94. );
  95. [propput, id(6), helpstring("property HelpSessionPassword")]
  96. HRESULT
  97. HelpSessionPassword(
  98. [in] BSTR newVal
  99. );
  100. //
  101. // Help Session Description, sessmgr does not alter this property
  102. //
  103. [propget, id(7), helpstring("property HelpSessionDescription")]
  104. HRESULT
  105. HelpSessionDescription(
  106. [out, retval] BSTR *pVal
  107. );
  108. [propput, id(7), helpstring("property HelpSessionDescription")]
  109. HRESULT
  110. HelpSessionDescription(
  111. [in] BSTR newVal
  112. );
  113. //
  114. // Help Session Status, sessmgr does not alter this property
  115. // nor put in storage.
  116. //
  117. [propget, id(8), helpstring("property SessionStatus")]
  118. HRESULT
  119. SessionStatus(
  120. [out, retval] HELPSESSIONSTATUS *pVal
  121. );
  122. [propput, id(8), helpstring("property SessionStatus")]
  123. HRESULT
  124. SessionStatus(
  125. [in] HELPSESSIONSTATUS Val
  126. );
  127. //
  128. // Enable resolver callback
  129. //
  130. [propget, id(9), helpstring("property EnableResolver")]
  131. HRESULT
  132. EnableResolver(
  133. [out, retval] BOOL* pVal
  134. );
  135. [propput, id(9), helpstring("property EnableResolver")]
  136. HRESULT
  137. EnableResolver(
  138. [in] BOOL Val
  139. );
  140. //
  141. // Blob for resolver to resolve user session, sessmgr
  142. // does no alter this property.
  143. //
  144. [propget, id(10), helpstring("property ResolverBlob")]
  145. HRESULT
  146. ResolverBlob(
  147. [out, retval] BSTR* pVal
  148. );
  149. [propput, id(10), helpstring("property ResolverBlob")]
  150. HRESULT
  151. ResolverBlob(
  152. [in] BSTR Val
  153. );
  154. //
  155. // Help Session RDS setting, subject to group policy setting
  156. //
  157. [propput, id(11), helpstring("property UserHelpSessionRemoteDesktopSharingSetting")]
  158. HRESULT
  159. UserHelpSessionRemoteDesktopSharingSetting(
  160. [in] REMOTE_DESKTOP_SHARING_CLASS level
  161. );
  162. [propget, id(11), helpstring("property UserHelpSessionRemoteDesktopSharingSetting")]
  163. HRESULT
  164. UserHelpSessionRemoteDesktopSharingSetting(
  165. [out, retval] REMOTE_DESKTOP_SHARING_CLASS* pLevel
  166. );
  167. //
  168. // User account RDS setting from group policy
  169. //
  170. [propget, id(12), helpstring("property UserPolicyRemoteDesktopSharingSetting")]
  171. HRESULT
  172. UserPolicyRemoteDesktopSharingSetting(
  173. [out, retval] REMOTE_DESKTOP_SHARING_CLASS* pLevel
  174. );
  175. //
  176. // User allow to get help, value retrieve from group policy
  177. //
  178. [propget, id(13), helpstring("property AllowToGetHelp")]
  179. HRESULT
  180. AllowToGetHelp(
  181. [out, retval] BOOL* pVal
  182. );
  183. //
  184. // Help Session Timeout period.
  185. //
  186. [propput, id(14), helpstring("property TimeOut")]
  187. HRESULT
  188. TimeOut(
  189. [in] DWORD TimeOut
  190. );
  191. [propget, id(14), helpstring("property TimeOut")]
  192. HRESULT
  193. TimeOut(
  194. [out, retval] DWORD* pTimeOut
  195. );
  196. ///////////////////////////////////////////////////////////////////
  197. //
  198. // Methods
  199. //
  200. //
  201. //
  202. // Delete Help
  203. //
  204. [id(16), helpstring("method DeleteHelp")]
  205. HRESULT
  206. DeleteHelp();
  207. //
  208. // Resolve help session to user session, if bstrResolverBlob
  209. // is NULL or empty string, Sessmgr pass cached ResolverBlob
  210. // to resolver
  211. //
  212. // Additional Return
  213. //
  214. // HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) No resolver for this session
  215. // HRESULT_FROM_WIN32(ERROR_INVALID_DATA) Can't convert Resolver's GUID
  216. //
  217. // error code from CoCreateInstance(ISAFRemoteDesktopCallback) or
  218. // ResolveTSRDPSessionID() call
  219. //
  220. [id(17), helpstring("method ResolveUserSession")]
  221. HRESULT
  222. ResolveUserSession(
  223. [in] BSTR bstrResolverBlob,
  224. [out, retval] long* plUserSession
  225. );
  226. //
  227. // Set User's TS session's RDS (Shadow) setting
  228. // if bEnable = TRUE, sessmgr takes help RDS setting and
  229. // set user's TS session's shadow level, if bEnable = FALSE,
  230. // sessmgr reset user's TS session's shadow level back to
  231. // original setting.
  232. //
  233. [id(18), helpstring("SetUserSessionRdsSetting")]
  234. HRESULT
  235. EnableUserSessionRdsSetting(
  236. [in] BOOL bEnable
  237. );
  238. //
  239. // Notify session connected, if bstrNofityBlob is NULL or
  240. // empty string, Sessmgr pass cached ResolverBlob to resolver.
  241. //
  242. // Additional Return
  243. //
  244. // HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) No resolver for this session
  245. // HRESULT_FROM_WIN32(ERROR_INVALID_DATA) Can't convert Resolver's GUID
  246. // HRESULT_FROM_WIN32(ERROR_VC_DISCONNECTED) if session has been disconnected.
  247. //
  248. // error code from CoCreateInstance(ISAFRemoteDesktopCallback) or
  249. // OnNotify() call
  250. //
  251. [id(19), helpstring("method NotifyConnect")]
  252. HRESULT
  253. NotifyConnect(
  254. [in] BSTR bstrNotifyBlob
  255. );
  256. //
  257. // Notify session connected, if bstrNofityBlob is NULL or
  258. // empty string, Sessmgr pass cached ResolverBlob to resolver.
  259. //
  260. // Additional Return
  261. //
  262. // HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) No resolver for this session
  263. // HRESULT_FROM_WIN32(ERROR_INVALID_DATA) Can't convert Resolver's GUID
  264. // HRESULT_FROM_WIN32(ERROR_VC_DISCONNECTED) if session has been disconnected.
  265. //
  266. // error code from CoCreateInstance(ISAFRemoteDesktopCallback) or
  267. // OnNotify() call
  268. //
  269. [id(20), helpstring("method NotifyRemoteControl")]
  270. HRESULT
  271. NotifyRemoteControl(
  272. [in] BSTR bstrNotifyBlob
  273. );
  274. [id(21), helpstring("method NotifyDisconnect")]
  275. HRESULT
  276. NotifyDisconnect();
  277. };
  278. [
  279. local,
  280. object,
  281. uuid(676638A3-E76D-4C25-98D4-AA6F7D303B6F),
  282. dual,
  283. helpstring("IRemoteDesktopHelpSessionEnum Interface"),
  284. pointer_default(unique)
  285. ]
  286. interface IRemoteDesktopHelpSessionEnum : IDispatch
  287. {
  288. [id(1), helpstring("method Next")]
  289. HRESULT
  290. Next(
  291. [in] ULONG uCount,
  292. [out, size_is(uCount), length_is(*pcFetched)] IRemoteDesktopHelpSession** ppIRDHelpSession,
  293. [out] ULONG* pcFetched
  294. );
  295. [id(2), helpstring("method Reset")]
  296. HRESULT Reset();
  297. [id(3), helpstring("method Skip")]
  298. HRESULT Skip(
  299. [in] ULONG cCount
  300. );
  301. [id(4), helpstring("method Clone")]
  302. HRESULT Clone(
  303. [out] IRemoteDesktopHelpSessionEnum** ppEnum
  304. );
  305. [propget, id(5), helpstring("property Count")]
  306. HRESULT Count(
  307. [out, retval] long *pVal
  308. );
  309. [propget, id(DISPID_VALUE), helpstring("property Item")]
  310. HRESULT Item(
  311. [in] long index,
  312. [out, retval] VARIANT* pItem
  313. );
  314. [propget, id(DISPID_NEWENUM), helpstring("property _NewEnum"), restricted]
  315. HRESULT _NewEnum(
  316. [out, retval] LPUNKNOWN *pVal
  317. );
  318. };
  319. [
  320. local,
  321. object,
  322. uuid(8556D72C-2854-447D-A098-39CDBFCDB832),
  323. dual,
  324. helpstring("IRemoteDesktopHelpSessionMgr Interface"),
  325. pointer_default(unique)
  326. ]
  327. interface IRemoteDesktopHelpSessionMgr : IDispatch
  328. {
  329. //
  330. // Get Help Assistant account name and password
  331. [id(1), helpstring("method GetHelpAssistantAccount")]
  332. HRESULT
  333. GetHelpAssistantAccount(
  334. [out] BSTR* pbstrAccName,
  335. [out] BSTR* pbstrAccPwd
  336. );
  337. //
  338. // Reset Help Assistant account password
  339. // bForce : TRUE - Force delete all pending help session entry
  340. // and reset password
  341. // FALSE - Reset password only if no more pending help session
  342. //
  343. [id(2), helpstring("method ResetHelpAssistantAccount")]
  344. HRESULT
  345. ResetHelpAssistantAccount(
  346. [in] BOOL bForce
  347. );
  348. //
  349. // Create a help session
  350. //
  351. [id(3), helpstring("method CreateHelpSession")]
  352. HRESULT
  353. CreateHelpSession(
  354. [in] BSTR bstrSessName,
  355. [in] BSTR bstrSessPwd,
  356. [in] BSTR bstrSessDesc,
  357. [out, retval] IRemoteDesktopHelpSession** ppIRDHelpSession
  358. );
  359. //
  360. // Delete help session
  361. [id(4), helpstring("method DeleteHelpSession")]
  362. HRESULT
  363. DeleteHelpSession(
  364. [in] BSTR HelpSessionID
  365. );
  366. //
  367. // Retrieve/open an existing help session.
  368. [id(5), helpstring("method RetrieveHelpSession")]
  369. HRESULT
  370. RetrieveHelpSession(
  371. [in] BSTR HelpSessionID,
  372. [out, retval] IRemoteDesktopHelpSession** ppIRDHelpSession
  373. );
  374. //
  375. // Verify help session password, refer to IRemoteDesktopHelpSession's
  376. // ResolveUserSession() method for bstrResolverBlob parameter.
  377. //
  378. [id(6), helpstring("method VerifyUserHelpSession")]
  379. HRESULT
  380. VerifyUserHelpSession(
  381. [in] BSTR HelpSessionId,
  382. [in] BSTR bstrSessPwd,
  383. [in] BSTR bstrResolverBlob,
  384. [out, retval] long* pdwUserLogonSession
  385. );
  386. //
  387. // Enumerate help session created by user.
  388. //
  389. [id(7), helpstring("method EnumUserHelpSession")]
  390. HRESULT
  391. EnumUserHelpSession(
  392. [out, retval] IRemoteDesktopHelpSessionEnum** ppIEnum
  393. );
  394. //
  395. // Get IRemoteDesktopSystemPolicy
  396. [id(8), helpstring("method GetRemoteDesktopSystemPolicy")]
  397. HRESULT
  398. GetRemoteDesktopSystemPolicy(
  399. [out, retval] ISAFRemoteDesktopSystemPolicy** pISystemPolicy
  400. );
  401. //
  402. // Get IRemoteDesktopUserPolicy for user.
  403. [id(9), helpstring("method GetRemoteDesktopUserPolicy")]
  404. HRESULT
  405. GetRemoteDesktopUserPolicy(
  406. [out, retval] ISAFRemoteDesktopUserPolicy** pIUsePolicy
  407. );
  408. //
  409. // User session's RDS setting.
  410. [id(10), helpstring("method GetUserSessionRdsSetting")]
  411. HRESULT
  412. GetUserSessionRdsSetting(
  413. [out, retval] REMOTE_DESKTOP_SHARING_CLASS* sessionRdsLevel
  414. );
  415. //
  416. // Notify session connected
  417. //
  418. // refer to IRemoteDesktopHelpSession's
  419. // NotifyConnect() method for bstrNotifyBlob parameter.
  420. //
  421. [id(11), helpstring("method NotifyConnect")]
  422. HRESULT
  423. NotifyConnect(
  424. [in] BSTR bstrHelpSessId,
  425. [in] BSTR bstrNotifyBlob
  426. );
  427. //
  428. // Notify session being remote control
  429. //
  430. // refer to IRemoteDesktopHelpSession's
  431. // NotifyConnect() method for bstrNotifyBlob parameter.
  432. //
  433. [id(12), helpstring("method NotifyRemoteControl")]
  434. HRESULT
  435. NotifyRemoteControl(
  436. [in] BSTR bstrHelpSessId,
  437. [in] BSTR bstrNotifyBlob
  438. );
  439. //
  440. // Unsolicated support
  441. //
  442. [id(13), helpstring("method RemoteCreateHelpSession")]
  443. HRESULT
  444. RemoteCreateHelpSession(
  445. [in] REMOTE_DESKTOP_SHARING_CLASS sharingClass,
  446. [in] LONG timeOut,
  447. [in] LONG userSessionId,
  448. [in] BSTR userSid,
  449. [out, retval] BSTR* parms
  450. );
  451. //
  452. // Notify Resolver session has been disconnected.
  453. //
  454. [id(14), helpstring("method NotifyDisconnect")]
  455. HRESULT
  456. NotifyDisconnect(
  457. [in] BSTR bstrHelpSessionId
  458. );
  459. };
  460. [
  461. uuid(71F1098A-2D69-45D7-B19E-D3B902323F66),
  462. version(1.0),
  463. helpstring("sessmgr 1.0 Type Library")
  464. ]
  465. library RDSESSMGRLib
  466. {
  467. importlib("stdole32.tlb");
  468. importlib("stdole2.tlb");
  469. [
  470. uuid(1324F259-91EC-49C9-B60D-B0232CA11801),
  471. helpstring("RemoteDesktopSystemPolicy Class")
  472. ]
  473. coclass RemoteDesktopSystemPolicy
  474. {
  475. [default] interface ISAFRemoteDesktopSystemPolicy;
  476. }
  477. [
  478. uuid(3BBD3AF0-09A0-4C6D-A6B6-0070728CE16A),
  479. helpstring("RemoteDesktopUserPolicy Class")
  480. ]
  481. coclass RemoteDesktopUserPolicy
  482. {
  483. [default] interface ISAFRemoteDesktopUserPolicy;
  484. }
  485. //[
  486. // uuid(829990CB-1BA6-42F7-8435-BAFF5ABF946D),
  487. // helpstring("RemoteDesktopHelpSession Class")
  488. //]
  489. //coclass RemoteDesktopHelpSession
  490. //{
  491. // [default] interface IRemoteDesktopHelpSession;
  492. //};
  493. [
  494. uuid(66AE6205-5022-4FCB-9E46-91E248B7F346),
  495. helpstring("RemoteDesktopHelpSessionEnum Class")
  496. ]
  497. coclass RemoteDesktopHelpSessionEnum
  498. {
  499. [default] interface IRemoteDesktopHelpSessionEnum;
  500. };
  501. [
  502. uuid(A6A6F92B-26B5-463B-AE0D-5F361B09C171),
  503. helpstring("RemoteDesktopHelpSessionMgr Class")
  504. ]
  505. coclass RemoteDesktopHelpSessionMgr
  506. {
  507. [default] interface IRemoteDesktopHelpSessionMgr;
  508. };
  509. };