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.

629 lines
21 KiB

  1. /******************************************************************
  2. Copyright (C) 2000 Microsoft Corp.
  3. Winstation.H -- WMI provider class definition
  4. Generated by Microsoft WBEM Code Generation Engine
  5. Description:
  6. *******************************************************************/
  7. // Property set identification
  8. //============================
  9. #ifndef _Winstation_H_
  10. #define _Winstation_H_
  11. #include "resource.h"
  12. #include "Terminal.h"
  13. #include <winsta.h>
  14. #include <regapi.h>
  15. #include "smartptr.h"
  16. #define BIT_FENABLETERMINAL 0x0000000000000001
  17. #define BIT_TERMINALNAME 0x0000000000000002
  18. #define BIT_TERMINALPROTOCOL 0x0000000000000004
  19. #define BIT_TRANSPORT 0x0000000000000008
  20. #define BIT_COMMENT 0x0000000000000010
  21. #define BIT_WINDOWSAUTHENTICATION 0x0000000000000020
  22. #define BIT_ENCRYPTIONLEVEL 0x0000000000000040
  23. #define BIT_CLIENTLOGONINFOPOLICY 0x0000000000000080
  24. #define BIT_PROMPTFORPASSWORD 0x0000000000000100
  25. #define BIT_USERNAME 0x0000000000000200
  26. #define BIT_DOMAIN 0x0000000000000400
  27. #define BIT_ACTIVESESSIONPOLICY 0x0000000000001000
  28. #define BIT_DISCONNECTEDSESSIONPOLICY 0x0000000000002000
  29. #define BIT_IDLESESSIONPOLICY 0x0000000000004000
  30. #define BIT_ACTIVESESSIONLIMIT 0x0000000000008000
  31. #define BIT_DISCONNECTEDSESSIONLIMIT 0x0000000000010000
  32. #define BIT_IDLESESSIONLIMIT 0x0000000000020000
  33. #define BIT_BROKENCONNECTIONPOLICY 0x0000000000040000
  34. #define BIT_BROKENCONNECTIONACTION 0x0000000000080000
  35. #define BIT_RECONNECTIONPOLICY 0x0000000000100000
  36. #define BIT_INITIALPROGRAMPOLICY 0x0000000000200000
  37. #define BIT_INITIALPROGRAMPATH 0x0000000000400000
  38. #define BIT_STARTIN 0x0000000000800000
  39. #define BIT_CLIENTWALLPAPER 0x0000000001000000
  40. #define BIT_REMOTECONTROLPOLICY 0x0000000002000000
  41. #define BIT_LEVELOFCONTROL 0x0000000004000000
  42. #define BIT_CONNECTIONPOLICY 0x0000000008000000
  43. #define BIT_CONNECTCLIENTDRIVESATLOGON 0x0000000010000000
  44. #define BIT_CONNECTPRINTERATLOGON 0x0000000020000000
  45. #define BIT_DEFAULTTOCLIENTPRINTER 0x0000000040000000
  46. #define BIT_WINDOWSPRINTERMAPPING 0x0000000080000000
  47. #define BIT_LPTPORTMAPPING 0x0000000100000000
  48. #define BIT_COMPORTMAPPING 0x0000000200000000
  49. #define BIT_DRIVEMAPPING 0x0000000400000000
  50. #define BIT_AUDIOMAPPING 0x0000000800000000
  51. #define BIT_CLIPBOARDMAPPING 0x0000001000000000
  52. #define BIT_NETWORKADAPTERID 0x0000002000000000
  53. #define BIT_MAXIMUMCONNECTIONS 0x0000004000000000
  54. #define BIT_ACCOUNTNAME 0x0000008000000000
  55. #define BIT_SID 0x0000010000000000
  56. #define BIT_PERMISSIONSALLOWED 0x0000020000000000
  57. #define BIT_PERMISSIONSDENIED 0x0000040000000000
  58. #define BIT_AUDITSUCCESS 0x0000080000000000
  59. #define BIT_AUDITFAIL 0x0000100000000000
  60. #define BIT_COLORDEPTHPOLICY 0x0000200000000000
  61. #define BIT_COLORDEPTH 0x0000400000000000
  62. #define BIT_ALL_PROP 0xffffffffffffffff
  63. #define BIT_ALL_PROPS 0xffffffff
  64. #define TS_PATH TEXT("SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations")
  65. #define PROVIDER_NAME_Win32_WIN32_TERMINAL_Prov L"Win32_Terminal"
  66. #define PROVIDER_NAME_Win32_WIN32_TSGENERALSETTING_Prov L"Win32_TSGeneralSetting"
  67. #define PROVIDER_NAME_Win32_WIN32_TSLOGONSETTING_Prov L"Win32_TSLogonSetting"
  68. #define PROVIDER_NAME_Win32_WIN32_TSSESSIONSETTING_Prov L"Win32_TSSessionSetting"
  69. #define PROVIDER_NAME_Win32_WIN32_TSENVIRONMENTSETTING_Prov L"Win32_TSEnvironmentSetting"
  70. #define PROVIDER_NAME_Win32_WIN32_TSREMOTECONTROLSETTING_Prov L"Win32_TSRemoteControlSetting"
  71. #define PROVIDER_NAME_Win32_WIN32_TSCLIENTSETTING_Prov L"Win32_TSClientSetting"
  72. #define PROVIDER_NAME_Win32_WIN32_TSNETWORKADAPTERSETTING_Prov L"Win32_TSNetworkAdapterSetting"
  73. #define PROVIDER_NAME_Win32_WIN32_TSPERMISSIONSSETTING_Prov L"Win32_TSPermissionsSetting"
  74. #define PROVIDER_NAME_Win32_WIN32_TSNETWORKADAPTERLISTSETTING_Prov L"Win32_TSNetworkAdapterListSetting"
  75. #define PROVIDER_NAME_Win32_WIN32_TSACCOUNT_Prov L"Win32_TSAccount"
  76. #define PROVIDER_NAME_Win32_WIN32_TERMINALSERVICETOSETTING_Prov L"Win32_TerminalServiceToSetting"
  77. #define PROVIDER_NAME_Win32_WIN32_TERMINALTERMINALSETTING_Prov L"Win32_TerminalTerminalSetting"
  78. #define PROVIDER_NAME_Win32_WIN32_TSSESSIONDIRECTORYSETTING_Prov L"Win32_TSSessionDirectorySetting"
  79. #define SIZE_OF_BUFFER( x ) sizeof( x ) / sizeof( TCHAR )
  80. #define WINSTATIONNAME_LENGTH 32
  81. #define WINSTATIONCOMMENT_LENGTH 60
  82. #define APPSERVERNAME_LENGTH 17
  83. #define USERNAME_LENGTH 20
  84. #define PASSWORD_LENTH 14
  85. class CWin32_Terminal : public Provider
  86. {
  87. public:
  88. // Constructor/destructor
  89. //=======================
  90. CWin32_Terminal(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  91. virtual ~CWin32_Terminal();
  92. protected:
  93. // Reading Functions
  94. //============================
  95. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  96. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query );
  97. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  98. // Writing Functions
  99. //============================
  100. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  101. virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  102. // Other Functions
  103. virtual HRESULT ExecMethod(const CInstance& Instance,
  104. const BSTR bstrMethodName,
  105. CInstance *pInParams,
  106. CInstance *pOutParams,
  107. long lFlags = 0L );
  108. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS);
  109. private:
  110. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  111. TCHAR m_szEnableTerminal[ 64 ] ;
  112. TCHAR m_szNewTerminalName[ 64 ] ;
  113. TCHAR m_szTerminalName[ 64 ];
  114. TCHAR m_szEnable[ 64 ];
  115. TCHAR m_szRename[ 64 ];
  116. TCHAR m_szDelete[ 64 ];
  117. } ;
  118. class CWin32_TSGeneralSetting : public Provider
  119. {
  120. public:
  121. // Constructor/destructor
  122. //=======================
  123. CWin32_TSGeneralSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  124. virtual ~CWin32_TSGeneralSetting();
  125. protected:
  126. // Reading Functions
  127. //============================
  128. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  129. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query );
  130. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  131. // Writing Functions
  132. //============================
  133. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  134. virtual HRESULT ExecMethod(const CInstance& Instance,
  135. const BSTR bstrMethodName,
  136. CInstance *pInParams,
  137. CInstance *pOutParams,
  138. long lFlags = 0L );
  139. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS);
  140. private:
  141. POLICY_TS_MACHINE m_gpPolicy;
  142. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  143. TCHAR m_szTerminalProtocol[ 64 ];
  144. TCHAR m_szTransport[ 64 ];
  145. TCHAR m_szComment[ 64 ];
  146. TCHAR m_szWindowsAuthentication[ 64 ];
  147. TCHAR m_szEncryptionLevel[ 64 ];
  148. TCHAR m_szTerminalName[ 64 ];
  149. TCHAR m_szSetEncryptionLevel[ 64 ];
  150. } ;
  151. class CWin32_TSLogonSetting : public Provider
  152. {
  153. public:
  154. // Constructor/destructor
  155. //=======================
  156. CWin32_TSLogonSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  157. virtual ~CWin32_TSLogonSetting();
  158. protected:
  159. // Reading Functions
  160. //============================
  161. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  162. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query );
  163. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  164. // Writing Functions
  165. //============================
  166. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  167. // Other Functions
  168. virtual HRESULT ExecMethod(const CInstance& Instance,
  169. const BSTR bstrMethodName,
  170. CInstance *pInParams,
  171. CInstance *pOutParams,
  172. long lFlags = 0L );
  173. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS);
  174. private:
  175. POLICY_TS_MACHINE m_gpPolicy;
  176. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  177. TCHAR m_szClientLogonInfoPolicy[ 64 ];
  178. TCHAR m_szPromptForPassword[ 64 ];
  179. TCHAR m_szUserName[ 64 ];
  180. TCHAR m_szDomain[ 64 ];
  181. TCHAR m_szPassword[ 64 ];
  182. TCHAR m_szTerminalName[ 64 ];
  183. TCHAR m_szExplicitLogon[ 64 ];
  184. TCHAR m_szSetPromptForPassword[ 64 ];
  185. } ;
  186. //-------------------------------------------
  187. class CWin32_TSSessionSetting : public Provider
  188. {
  189. public:
  190. // Constructor/destructor
  191. //=======================
  192. CWin32_TSSessionSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  193. virtual ~CWin32_TSSessionSetting();
  194. protected:
  195. // Reading Functions
  196. //============================
  197. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  198. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query);
  199. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  200. // Writing Functions
  201. //============================
  202. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  203. // Other Functions
  204. virtual HRESULT ExecMethod(const CInstance& Instance,
  205. const BSTR bstrMethodName,
  206. CInstance *pInParams,
  207. CInstance *pOutParams,
  208. long lFlags = 0L );
  209. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS);
  210. private:
  211. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  212. TCHAR m_szTimeLimitPolicy[ 64 ];
  213. TCHAR m_szActiveSessionLimit[ 64 ];
  214. TCHAR m_szDisconnectedSessionLimit[ 64 ];
  215. TCHAR m_szIdleSessionLimit[ 64 ];
  216. TCHAR m_szBrokenConnectionPolicy[ 64 ];
  217. TCHAR m_szBrokenConnectionAction[ 64 ];
  218. TCHAR m_szReconnectionPolicy[ 64 ];
  219. TCHAR m_szSessionLimitType[ 64 ];
  220. TCHAR m_szValueLimit[ 64 ];
  221. TCHAR m_szTerminalName[ 64 ];
  222. TCHAR m_szTimeLimit[ 64 ];
  223. TCHAR m_szBrokenConnection[ 64 ];
  224. } ;
  225. //----------------------------------------------
  226. class CWin32_TSEnvironmentSetting : public Provider
  227. {
  228. public:
  229. // Constructor/destructor
  230. //=======================
  231. CWin32_TSEnvironmentSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  232. virtual ~CWin32_TSEnvironmentSetting();
  233. protected:
  234. // Reading Functions
  235. //============================
  236. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  237. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query);
  238. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  239. // Writing Functions
  240. //============================
  241. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  242. // Other Functions
  243. virtual HRESULT ExecMethod(const CInstance& Instance,
  244. const BSTR bstrMethodName,
  245. CInstance *pInParams,
  246. CInstance *pOutParams,
  247. long lFlags = 0L );
  248. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS);
  249. private:
  250. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  251. TCHAR m_szInitialProgramPolicy[ 64 ];
  252. TCHAR m_szInitialProgramPath[ 64 ];
  253. TCHAR m_szStartIn[ 64 ];
  254. TCHAR m_szClientWallPaper[ 64 ];
  255. TCHAR m_szTerminalName[ 64 ];
  256. TCHAR m_szInitialProgram[ 64 ];
  257. } ;
  258. //-----------------------------------------------------
  259. class CWin32_TSRemoteControlSetting : public Provider
  260. {
  261. public:
  262. // Constructor/destructor
  263. //=======================
  264. CWin32_TSRemoteControlSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  265. virtual ~CWin32_TSRemoteControlSetting();
  266. protected:
  267. // Reading Functions
  268. //============================
  269. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  270. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query);
  271. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  272. // Writing Functions
  273. //============================
  274. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  275. // Other Functions
  276. virtual HRESULT ExecMethod(const CInstance& Instance,
  277. const BSTR bstrMethodName,
  278. CInstance *pInParams,
  279. CInstance *pOutParams,
  280. long lFlags = 0L );
  281. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS);
  282. private:
  283. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  284. TCHAR m_szRemoteControlPolicy[ 64 ];
  285. TCHAR m_szLevelOfControl[ 64 ];
  286. TCHAR m_szTerminalName[ 64 ];
  287. TCHAR m_szRemoteControl[ 64 ];
  288. } ;
  289. //-----------------------------------------------------
  290. class CWin32_TSClientSetting : public Provider
  291. {
  292. public:
  293. // Constructor/destructor
  294. //=======================
  295. CWin32_TSClientSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  296. virtual ~CWin32_TSClientSetting();
  297. protected:
  298. // Reading Functions
  299. //============================
  300. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  301. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query);
  302. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  303. // Writing Functions
  304. //============================
  305. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  306. // Other Functions
  307. virtual HRESULT ExecMethod(const CInstance& Instance,
  308. const BSTR bstrMethodName,
  309. CInstance *pInParams,
  310. CInstance *pOutParams,
  311. long lFlags = 0L );
  312. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS );
  313. private:
  314. POLICY_TS_MACHINE m_gpPolicy;
  315. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  316. TCHAR m_szConnectionPolicy [ 64 ];
  317. TCHAR m_szConnectClientDrivesAtLogon[ 64 ];
  318. TCHAR m_szConnectPrinterAtLogon[ 64 ];
  319. TCHAR m_szDefaultToClientPrinter[ 64 ];
  320. TCHAR m_szWindowsPrinterMapping[ 64 ];
  321. TCHAR m_szLPTPortMapping[ 64 ];
  322. TCHAR m_szCOMPortMapping[ 64 ];
  323. TCHAR m_szDriveMapping[ 64 ];
  324. TCHAR m_szAudioMapping[ 64 ];
  325. TCHAR m_szClipboardMapping[ 64 ];
  326. TCHAR m_szTerminalName[ 64 ];
  327. TCHAR m_szPropertyName[ 64 ];
  328. TCHAR m_szValue[ 64 ];
  329. TCHAR m_szConnectionSettings[ 64 ];
  330. TCHAR m_szSetClientProperty[ 64 ];
  331. TCHAR m_szColorDepth[ 64 ];
  332. TCHAR m_szColorDepthPolicy[ 64 ];
  333. TCHAR m_szSetColorDepth[ 64 ];
  334. TCHAR m_szSetColorDepthPolicy[ 64 ];
  335. } ;
  336. //-----------------------------------------------------
  337. class CWin32_TSNetworkAdapterSetting : public Provider
  338. {
  339. public:
  340. // Constructor/destructor
  341. //=======================
  342. CWin32_TSNetworkAdapterSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  343. virtual ~CWin32_TSNetworkAdapterSetting();
  344. protected:
  345. // Reading Functions
  346. //============================
  347. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  348. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query);
  349. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  350. // Writing Functions
  351. //============================
  352. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  353. // Other Functions
  354. virtual HRESULT ExecMethod(const CInstance& Instance,
  355. const BSTR bstrMethodName,
  356. CInstance *pInParams,
  357. CInstance *pOutParams,
  358. long lFlags = 0L );
  359. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS);
  360. private:
  361. POLICY_TS_MACHINE m_gpPolicy;
  362. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  363. TCHAR m_szNetworkAdapterName[ 64 ];
  364. TCHAR m_szNetworkAdapterID[ 64 ];
  365. TCHAR m_szMaximumConnections[ 64 ];
  366. TCHAR m_szTerminalName[ 64 ];
  367. TCHAR m_szSelectAllNetworkAdapters[ 64 ];
  368. TCHAR m_szSelectNetworkAdapterID[ 64 ];
  369. } ;
  370. //-------------------------------
  371. class CWin32_TSPermissionsSetting : public Provider
  372. {
  373. public:
  374. // Constructor/destructor
  375. //=======================
  376. CWin32_TSPermissionsSetting(LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  377. virtual ~CWin32_TSPermissionsSetting();
  378. protected:
  379. // Reading Functions
  380. //============================
  381. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  382. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query);
  383. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  384. // Writing Functions
  385. //============================
  386. virtual HRESULT PutInstance(const CInstance& Instance, long lFlags = 0L);
  387. // Other Functions
  388. virtual HRESULT ExecMethod(const CInstance& Instance,
  389. const BSTR bstrMethodName,
  390. CInstance *pInParams,
  391. CInstance *pOutParams,
  392. long lFlags = 0L );
  393. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PWS pWS);
  394. private:
  395. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  396. const WCHAR* m_pszPermissionPreSet;
  397. TCHAR m_szTerminalName[ 64 ];
  398. TCHAR m_szAccountName[ 64 ];
  399. TCHAR m_szPermissionPreSet[ 64 ];
  400. TCHAR m_szPermissionMask[ 64 ];
  401. TCHAR m_szSID[ 64 ];
  402. TCHAR m_szAddAccount[ 64 ];
  403. TCHAR m_szRestoreDefaults[ 64 ];
  404. } ;
  405. //=-------------------
  406. class CWin32_TSNetworkAdapterListSetting : public Provider
  407. {
  408. private:
  409. /*
  410. TCHAR m_szDeviceID[ 64 ];
  411. TCHAR m_szIndex[ 64 ];
  412. TCHAR m_szNetworkAdapterID[ 64 ];
  413. TCHAR m_szDescription[ 64 ];
  414. TCHAR m_szTerminalName[ 64 ];
  415. */
  416. TCHAR m_szTransport[ 64 ];
  417. TCHAR m_szNetworkAdapterID[ 64 ];
  418. TCHAR m_szDescription[ 64 ];
  419. TCHAR m_szTerminalProtocol[ 64 ];
  420. protected:
  421. public:
  422. CWin32_TSNetworkAdapterListSetting (const CHString& setName, LPCTSTR pszNameSpace =NULL);
  423. ~CWin32_TSNetworkAdapterListSetting ();
  424. virtual HRESULT EnumerateInstances (MethodContext* pMethodContext, long lFlags = 0L);
  425. virtual HRESULT GetObject ( CInstance* pInstance, long lFlags, CFrameworkQuery &Query );
  426. // HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties, PTCHAR pdName, PTCHAR wdName, PTCHAR pGuid, PTCHAR DisplayName);
  427. // virtual HRESULT DeleteInstance(const CInstance& Instance, long lFlags = 0L);
  428. };
  429. //=---------------------
  430. class CWin32_TSAccount : public Provider
  431. {
  432. protected:
  433. public:
  434. CWin32_TSAccount (LPCWSTR lpwszClassName, LPCWSTR lpwszNameSpace);
  435. ~CWin32_TSAccount ();
  436. virtual HRESULT EnumerateInstances(MethodContext* pMethodContext, long lFlags = 0L);
  437. virtual HRESULT GetObject(CInstance* pInstance, long lFlags, CFrameworkQuery &Query );
  438. virtual HRESULT ExecQuery(MethodContext *pMethodContext, CFrameworkQuery& Query, long lFlags = 0L);
  439. // Writing Functions
  440. //============================
  441. // Other Functions
  442. virtual HRESULT ExecMethod(const CInstance& Instance,
  443. const BSTR bstrMethodName,
  444. CInstance *pInParams,
  445. CInstance *pOutParams,
  446. long lFlags = 0L );
  447. HRESULT LoadPropertyValues( CInstance *pInstance, ULONGLONG ulRequiredProperties,
  448. PWS pWS, PUSERPERMLIST pUserList, PUSERPERMLIST pUserAuditList);
  449. private:
  450. BOOL IsInList(const CHStringArray &asArray, LPCWSTR pszString);
  451. POLICY_TS_MACHINE m_gpPolicy;
  452. TCHAR m_szPermissionPreSet[ 64 ];
  453. TCHAR m_szTerminalName[ 64 ];
  454. TCHAR m_szAccountName[ 64 ];
  455. TCHAR m_szPermissionMask[ 64 ];
  456. TCHAR m_szPermissionsAllowed[ 64 ];
  457. TCHAR m_szPermissionsDenied[ 64 ];
  458. TCHAR m_szAuditSuccess[ 64 ];
  459. TCHAR m_szAuditFail[ 64 ];
  460. TCHAR m_szAllow[ 64 ];
  461. TCHAR m_szSuccess[ 64 ];
  462. TCHAR m_szSID[ 64 ];
  463. TCHAR m_szDelete[ 64 ];
  464. TCHAR m_szModifyPermissions[ 64 ];
  465. TCHAR m_szModifyAuditPermissions[ 64 ];
  466. };
  467. #endif