// sessmgr.idl : IDL source for sessmgr.dll // // This file will be processed by the MIDL tool to // produce the type library (sessmgr.tlb) and marshalling code. import "oaidl.idl"; import "ocidl.idl"; import "rdspol.idl"; typedef [ uuid(3666e274-48a2-4f09-8ed5-0b492b07f2b7), helpstring("Help Session Status") ] enum { [helpstring("Help Session Status Unknown")] USERHELPSESSION_UNKNOWN=0x00, [helpstring("Help Session Status Waiting")] USERHELPSESSION_WAITING=0x01, [helpstring("Help Session Status User Logoff")] USERHELPSESSION_LOGOFF=0x02, [helpstring("Help Session Status Connected")] USERHELPSESSION_CONNECTED=0x04, [helpstring("Help Session Status RC In Progress")] USERHELPSESSION_RCINPROGRESS=0x08, } HELPSESSIONSTATUS; [ local, object, uuid(19E62A24-95D2-483A-AEB6-6FA92914DF96), dual, helpstring("IRemoteDesktopHelpSession Interface"), pointer_default(unique) ] interface IRemoteDesktopHelpSession : IDispatch { // // Properties // // All properties returns // // E_HANDLE : Help Session has been deleted. // E_POINTER : Parameter is NULL // E_OUTOFMEMORY : Out of memory // E_UNEXPECTED : Internal Error // // // Help Session ID [propget, id(1), helpstring("property HelpSessionId")] HRESULT HelpSessionId( [out, retval] BSTR *pVal ); // // TS Session ID // // Additional Return : // // S_FALSE : User has logoff. // [propget, id(2), helpstring("property UserLogonId")] HRESULT UserLogonId( [out, retval] long *pVal ); // // Help Account Name // [propget, id(3), helpstring("property AssistantAccountName")] HRESULT AssistantAccountName( [out, retval] BSTR *pVal ); // // Help Account password // [propget, id(4), helpstring("property AssistantAccountPassword")] HRESULT AssistantAccountPassword( [out, retval] BSTR *pVal ); // // Help Session Name, sessmgr does not alter this property // [propget, id(5), helpstring("property HelpSessionName")] HRESULT HelpSessionName( [out, retval] BSTR *pVal ); [propput, id(5), helpstring("property HelpSessionName")] HRESULT HelpSessionName( [in] BSTR newVal ); // // Help Session Password. // [propget, id(6), helpstring("property HelpSessionPassword")] HRESULT HelpSessionPassword( [out, retval] BSTR *pVal ); [propput, id(6), helpstring("property HelpSessionPassword")] HRESULT HelpSessionPassword( [in] BSTR newVal ); // // Help Session Description, sessmgr does not alter this property // [propget, id(7), helpstring("property HelpSessionDescription")] HRESULT HelpSessionDescription( [out, retval] BSTR *pVal ); [propput, id(7), helpstring("property HelpSessionDescription")] HRESULT HelpSessionDescription( [in] BSTR newVal ); // // Help Session Status, sessmgr does not alter this property // nor put in storage. // [propget, id(8), helpstring("property SessionStatus")] HRESULT SessionStatus( [out, retval] HELPSESSIONSTATUS *pVal ); [propput, id(8), helpstring("property SessionStatus")] HRESULT SessionStatus( [in] HELPSESSIONSTATUS Val ); // // Enable resolver callback // [propget, id(9), helpstring("property EnableResolver")] HRESULT EnableResolver( [out, retval] BOOL* pVal ); [propput, id(9), helpstring("property EnableResolver")] HRESULT EnableResolver( [in] BOOL Val ); // // Blob for resolver to resolve user session, sessmgr // does no alter this property. // [propget, id(10), helpstring("property ResolverBlob")] HRESULT ResolverBlob( [out, retval] BSTR* pVal ); [propput, id(10), helpstring("property ResolverBlob")] HRESULT ResolverBlob( [in] BSTR Val ); // // Help Session RDS setting, subject to group policy setting // [propput, id(11), helpstring("property UserHelpSessionRemoteDesktopSharingSetting")] HRESULT UserHelpSessionRemoteDesktopSharingSetting( [in] REMOTE_DESKTOP_SHARING_CLASS level ); [propget, id(11), helpstring("property UserHelpSessionRemoteDesktopSharingSetting")] HRESULT UserHelpSessionRemoteDesktopSharingSetting( [out, retval] REMOTE_DESKTOP_SHARING_CLASS* pLevel ); // // User account RDS setting from group policy // [propget, id(12), helpstring("property UserPolicyRemoteDesktopSharingSetting")] HRESULT UserPolicyRemoteDesktopSharingSetting( [out, retval] REMOTE_DESKTOP_SHARING_CLASS* pLevel ); // // User allow to get help, value retrieve from group policy // [propget, id(13), helpstring("property AllowToGetHelp")] HRESULT AllowToGetHelp( [out, retval] BOOL* pVal ); // // Help Session Timeout period. // [propput, id(14), helpstring("property TimeOut")] HRESULT TimeOut( [in] DWORD TimeOut ); [propget, id(14), helpstring("property TimeOut")] HRESULT TimeOut( [out, retval] DWORD* pTimeOut ); /////////////////////////////////////////////////////////////////// // // Methods // // // // Delete Help // [id(16), helpstring("method DeleteHelp")] HRESULT DeleteHelp(); // // Resolve help session to user session, if bstrResolverBlob // is NULL or empty string, Sessmgr pass cached ResolverBlob // to resolver // // Additional Return // // HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) No resolver for this session // HRESULT_FROM_WIN32(ERROR_INVALID_DATA) Can't convert Resolver's GUID // // error code from CoCreateInstance(ISAFRemoteDesktopCallback) or // ResolveTSRDPSessionID() call // [id(17), helpstring("method ResolveUserSession")] HRESULT ResolveUserSession( [in] BSTR bstrResolverBlob, [out, retval] long* plUserSession ); // // Set User's TS session's RDS (Shadow) setting // if bEnable = TRUE, sessmgr takes help RDS setting and // set user's TS session's shadow level, if bEnable = FALSE, // sessmgr reset user's TS session's shadow level back to // original setting. // [id(18), helpstring("SetUserSessionRdsSetting")] HRESULT EnableUserSessionRdsSetting( [in] BOOL bEnable ); // // Notify session connected, if bstrNofityBlob is NULL or // empty string, Sessmgr pass cached ResolverBlob to resolver. // // Additional Return // // HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) No resolver for this session // HRESULT_FROM_WIN32(ERROR_INVALID_DATA) Can't convert Resolver's GUID // HRESULT_FROM_WIN32(ERROR_VC_DISCONNECTED) if session has been disconnected. // // error code from CoCreateInstance(ISAFRemoteDesktopCallback) or // OnNotify() call // [id(19), helpstring("method NotifyConnect")] HRESULT NotifyConnect( [in] BSTR bstrNotifyBlob ); // // Notify session connected, if bstrNofityBlob is NULL or // empty string, Sessmgr pass cached ResolverBlob to resolver. // // Additional Return // // HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) No resolver for this session // HRESULT_FROM_WIN32(ERROR_INVALID_DATA) Can't convert Resolver's GUID // HRESULT_FROM_WIN32(ERROR_VC_DISCONNECTED) if session has been disconnected. // // error code from CoCreateInstance(ISAFRemoteDesktopCallback) or // OnNotify() call // [id(20), helpstring("method NotifyRemoteControl")] HRESULT NotifyRemoteControl( [in] BSTR bstrNotifyBlob ); [id(21), helpstring("method NotifyDisconnect")] HRESULT NotifyDisconnect(); }; [ local, object, uuid(676638A3-E76D-4C25-98D4-AA6F7D303B6F), dual, helpstring("IRemoteDesktopHelpSessionEnum Interface"), pointer_default(unique) ] interface IRemoteDesktopHelpSessionEnum : IDispatch { [id(1), helpstring("method Next")] HRESULT Next( [in] ULONG uCount, [out, size_is(uCount), length_is(*pcFetched)] IRemoteDesktopHelpSession** ppIRDHelpSession, [out] ULONG* pcFetched ); [id(2), helpstring("method Reset")] HRESULT Reset(); [id(3), helpstring("method Skip")] HRESULT Skip( [in] ULONG cCount ); [id(4), helpstring("method Clone")] HRESULT Clone( [out] IRemoteDesktopHelpSessionEnum** ppEnum ); [propget, id(5), helpstring("property Count")] HRESULT Count( [out, retval] long *pVal ); [propget, id(DISPID_VALUE), helpstring("property Item")] HRESULT Item( [in] long index, [out, retval] VARIANT* pItem ); [propget, id(DISPID_NEWENUM), helpstring("property _NewEnum"), restricted] HRESULT _NewEnum( [out, retval] LPUNKNOWN *pVal ); }; [ local, object, uuid(8556D72C-2854-447D-A098-39CDBFCDB832), dual, helpstring("IRemoteDesktopHelpSessionMgr Interface"), pointer_default(unique) ] interface IRemoteDesktopHelpSessionMgr : IDispatch { // // Get Help Assistant account name and password [id(1), helpstring("method GetHelpAssistantAccount")] HRESULT GetHelpAssistantAccount( [out] BSTR* pbstrAccName, [out] BSTR* pbstrAccPwd ); // // Reset Help Assistant account password // bForce : TRUE - Force delete all pending help session entry // and reset password // FALSE - Reset password only if no more pending help session // [id(2), helpstring("method ResetHelpAssistantAccount")] HRESULT ResetHelpAssistantAccount( [in] BOOL bForce ); // // Create a help session // [id(3), helpstring("method CreateHelpSession")] HRESULT CreateHelpSession( [in] BSTR bstrSessName, [in] BSTR bstrSessPwd, [in] BSTR bstrSessDesc, [out, retval] IRemoteDesktopHelpSession** ppIRDHelpSession ); // // Delete help session [id(4), helpstring("method DeleteHelpSession")] HRESULT DeleteHelpSession( [in] BSTR HelpSessionID ); // // Retrieve/open an existing help session. [id(5), helpstring("method RetrieveHelpSession")] HRESULT RetrieveHelpSession( [in] BSTR HelpSessionID, [out, retval] IRemoteDesktopHelpSession** ppIRDHelpSession ); // // Verify help session password, refer to IRemoteDesktopHelpSession's // ResolveUserSession() method for bstrResolverBlob parameter. // [id(6), helpstring("method VerifyUserHelpSession")] HRESULT VerifyUserHelpSession( [in] BSTR HelpSessionId, [in] BSTR bstrSessPwd, [in] BSTR bstrResolverBlob, [out, retval] long* pdwUserLogonSession ); // // Enumerate help session created by user. // [id(7), helpstring("method EnumUserHelpSession")] HRESULT EnumUserHelpSession( [out, retval] IRemoteDesktopHelpSessionEnum** ppIEnum ); // // Get IRemoteDesktopSystemPolicy [id(8), helpstring("method GetRemoteDesktopSystemPolicy")] HRESULT GetRemoteDesktopSystemPolicy( [out, retval] ISAFRemoteDesktopSystemPolicy** pISystemPolicy ); // // Get IRemoteDesktopUserPolicy for user. [id(9), helpstring("method GetRemoteDesktopUserPolicy")] HRESULT GetRemoteDesktopUserPolicy( [out, retval] ISAFRemoteDesktopUserPolicy** pIUsePolicy ); // // User session's RDS setting. [id(10), helpstring("method GetUserSessionRdsSetting")] HRESULT GetUserSessionRdsSetting( [out, retval] REMOTE_DESKTOP_SHARING_CLASS* sessionRdsLevel ); // // Notify session connected // // refer to IRemoteDesktopHelpSession's // NotifyConnect() method for bstrNotifyBlob parameter. // [id(11), helpstring("method NotifyConnect")] HRESULT NotifyConnect( [in] BSTR bstrHelpSessId, [in] BSTR bstrNotifyBlob ); // // Notify session being remote control // // refer to IRemoteDesktopHelpSession's // NotifyConnect() method for bstrNotifyBlob parameter. // [id(12), helpstring("method NotifyRemoteControl")] HRESULT NotifyRemoteControl( [in] BSTR bstrHelpSessId, [in] BSTR bstrNotifyBlob ); // // Unsolicated support // [id(13), helpstring("method RemoteCreateHelpSession")] HRESULT RemoteCreateHelpSession( [in] REMOTE_DESKTOP_SHARING_CLASS sharingClass, [in] LONG timeOut, [in] LONG userSessionId, [in] BSTR userSid, [out, retval] BSTR* parms ); // // Notify Resolver session has been disconnected. // [id(14), helpstring("method NotifyDisconnect")] HRESULT NotifyDisconnect( [in] BSTR bstrHelpSessionId ); }; [ uuid(71F1098A-2D69-45D7-B19E-D3B902323F66), version(1.0), helpstring("sessmgr 1.0 Type Library") ] library RDSESSMGRLib { importlib("stdole32.tlb"); importlib("stdole2.tlb"); [ uuid(1324F259-91EC-49C9-B60D-B0232CA11801), helpstring("RemoteDesktopSystemPolicy Class") ] coclass RemoteDesktopSystemPolicy { [default] interface ISAFRemoteDesktopSystemPolicy; } [ uuid(3BBD3AF0-09A0-4C6D-A6B6-0070728CE16A), helpstring("RemoteDesktopUserPolicy Class") ] coclass RemoteDesktopUserPolicy { [default] interface ISAFRemoteDesktopUserPolicy; } //[ // uuid(829990CB-1BA6-42F7-8435-BAFF5ABF946D), // helpstring("RemoteDesktopHelpSession Class") //] //coclass RemoteDesktopHelpSession //{ // [default] interface IRemoteDesktopHelpSession; //}; [ uuid(66AE6205-5022-4FCB-9E46-91E248B7F346), helpstring("RemoteDesktopHelpSessionEnum Class") ] coclass RemoteDesktopHelpSessionEnum { [default] interface IRemoteDesktopHelpSessionEnum; }; [ uuid(A6A6F92B-26B5-463B-AE0D-5F361B09C171), helpstring("RemoteDesktopHelpSessionMgr Class") ] coclass RemoteDesktopHelpSessionMgr { [default] interface IRemoteDesktopHelpSessionMgr; }; };