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.

660 lines
24 KiB

  1. #include "iisprov.h"
  2. //
  3. // Initialize WMI_ASSOCIATION_TYPE_DATA
  4. //
  5. WMI_ASSOCIATION_TYPE WMI_ASSOCIATION_TYPE_DATA::s_ElementSetting =
  6. { L"Element", L"Setting", g_wszElementSettingAssocParent, g_wszExtElementSettingAssocParent };
  7. WMI_ASSOCIATION_TYPE WMI_ASSOCIATION_TYPE_DATA::s_Component =
  8. { L"GroupComponent", L"PartComponent", g_wszGroupPartAssocParent, g_wszExtGroupPartAssocParent };
  9. WMI_ASSOCIATION_TYPE WMI_ASSOCIATION_TYPE_DATA::s_AdminACL =
  10. { L"GroupComponent", L"PartComponent", g_wszGroupPartAssocParent, g_wszExtGroupPartAssocParent };
  11. WMI_ASSOCIATION_TYPE WMI_ASSOCIATION_TYPE_DATA::s_IPSecurity =
  12. { L"Element", L"Setting", g_wszElementSettingAssocParent, g_wszExtElementSettingAssocParent };
  13. //
  14. // Initialize METABASE_KEYTYPE_DATA
  15. //
  16. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsApplicationPool =
  17. {
  18. L"IIsApplicationPool", NULL, NULL
  19. };
  20. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsApplicationPools =
  21. {
  22. L"IIsApplicationPools", NULL, L"/LM/w3svc/AppPools"
  23. };
  24. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsCertMapper =
  25. {
  26. L"IIsCertMapper", NULL, NULL
  27. };
  28. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsCompressionScheme =
  29. {
  30. L"IIsCompressionScheme", NULL, NULL
  31. };
  32. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsCompressionSchemes =
  33. {
  34. L"IIsCompressionSchemes", NULL, L"/LM/w3svc/Filters/Compression/Parameters"
  35. };
  36. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsComputer =
  37. {
  38. L"IIsComputer", NULL, L"/LM"
  39. };
  40. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsCustomLogModule =
  41. {
  42. L"IIsCustomLogModule", NULL, NULL
  43. };
  44. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsFilter =
  45. {
  46. L"IIsFilter", NULL, NULL
  47. };
  48. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsFilters =
  49. {
  50. L"IIsFilters", NULL, L"/LM/w3svc/filters"
  51. };
  52. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsFtpInfo =
  53. {
  54. L"IIsFtpInfo", NULL, L"/LM/msftpsvc/info"
  55. };
  56. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsFtpServer =
  57. {
  58. L"IIsFtpServer", NULL, NULL
  59. };
  60. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsFtpService =
  61. {
  62. L"IIsFtpService", NULL, L"/LM/msftpsvc"
  63. };
  64. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsFtpVirtualDir =
  65. {
  66. L"IIsFtpVirtualDir", NULL, NULL
  67. };
  68. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsImapInfo =
  69. {
  70. L"IIsImapInfo", NULL, L"/LM/imapsvc/info"
  71. };
  72. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsImapService =
  73. {
  74. L"IIsImapService", NULL, L"/LM/imapsvc"
  75. };
  76. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsLogModule =
  77. {
  78. L"IIsLogModule", NULL, NULL
  79. };
  80. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsLogModules =
  81. {
  82. L"IIsLogModules", NULL, L"/LM/Logging"
  83. };
  84. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsMimeMap =
  85. {
  86. L"IIsMimeMap", NULL, NULL
  87. };
  88. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsNntpInfo =
  89. {
  90. L"IIsNntpInfo", NULL, L"/LM/nntpsvc/info"
  91. };
  92. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsNntpService =
  93. {
  94. L"IIsNntpService", NULL, L"/LM/nntpsvc"
  95. };
  96. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsObject =
  97. {
  98. L"IIsObject", NULL, NULL
  99. };
  100. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsPop3Info =
  101. {
  102. L"IIsPop3Info", NULL, L"/LM/pop3svc/info"
  103. };
  104. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsPop3Service =
  105. {
  106. L"IIsPop3Service", NULL, L"/LM/pop3svc"
  107. };
  108. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsSmtpInfo =
  109. {
  110. L"IIsSmtpInfo", NULL, L"/LM/smtpsvc/info"
  111. };
  112. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsSmtpService =
  113. {
  114. L"IIsSmtpService", NULL, L"/LM/smtpsvc"
  115. };
  116. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsWebDirectory =
  117. {
  118. L"IIsWebDirectory", NULL, NULL
  119. };
  120. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsWebFile =
  121. {
  122. L"IIsWebFile", NULL, NULL
  123. };
  124. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsWebInfo =
  125. {
  126. L"IIsWebInfo", NULL, L"/LM/w3svc/info"
  127. };
  128. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsWebServer =
  129. {
  130. L"IIsWebServer", NULL, NULL
  131. };
  132. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsWebService =
  133. {
  134. L"IIsWebService", NULL, L"/LM/w3svc"
  135. };
  136. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_IIsWebVirtualDir =
  137. {
  138. L"IIsWebVirtualDir", NULL, NULL
  139. };
  140. //
  141. // These are special. They don't get put into the hashtable of keytypes
  142. //
  143. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_TYPE_AdminACL = { NULL, NULL };
  144. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_TYPE_AdminACE = { NULL, NULL };
  145. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_TYPE_IPSecurity = { NULL, NULL };
  146. METABASE_KEYTYPE METABASE_KEYTYPE_DATA::s_NO_TYPE = { NULL, NULL };
  147. METABASE_KEYTYPE* METABASE_KEYTYPE_DATA::s_MetabaseKeyTypes[] =
  148. {
  149. &s_IIsApplicationPool,
  150. &s_IIsApplicationPools,
  151. &s_IIsCertMapper,
  152. &s_IIsCompressionScheme,
  153. &s_IIsCompressionSchemes,
  154. &s_IIsComputer,
  155. &s_IIsCustomLogModule,
  156. &s_IIsFilter,
  157. &s_IIsFilters,
  158. &s_IIsFtpInfo,
  159. &s_IIsFtpServer,
  160. &s_IIsFtpService,
  161. &s_IIsFtpVirtualDir,
  162. &s_IIsImapInfo,
  163. &s_IIsImapService,
  164. &s_IIsLogModule,
  165. &s_IIsLogModules,
  166. &s_IIsMimeMap,
  167. &s_IIsNntpInfo,
  168. &s_IIsNntpService,
  169. &s_IIsObject,
  170. &s_IIsPop3Info,
  171. &s_IIsPop3Service,
  172. &s_IIsSmtpInfo,
  173. &s_IIsSmtpService,
  174. &s_IIsWebDirectory,
  175. &s_IIsWebFile,
  176. &s_IIsWebInfo,
  177. &s_IIsWebServer,
  178. &s_IIsWebService,
  179. &s_IIsWebVirtualDir,
  180. &s_TYPE_AdminACL,
  181. &s_TYPE_AdminACE,
  182. &s_TYPE_IPSecurity,
  183. &s_NO_TYPE,
  184. NULL
  185. };
  186. ///
  187. // initialize METABASE_PROPERTY_DATA
  188. //
  189. METABASE_PROPERTY METABASE_PROPERTY_DATA::s_AppRoot =
  190. { L"AppRoot",MD_APP_ROOT, IIS_MD_UT_FILE, STRING_METADATA, NULL, METADATA_INHERIT, TRUE, NULL };
  191. METABASE_PROPERTY METABASE_PROPERTY_DATA::s_Path =
  192. { L"Path", MD_VR_PATH, IIS_MD_UT_FILE, STRING_METADATA, NULL, METADATA_INHERIT, FALSE, NULL };
  193. METABASE_PROPERTY METABASE_PROPERTY_DATA::s_ServerBindings =
  194. { L"ServerBindings",MD_SERVER_BINDINGS, IIS_MD_UT_SERVER, MULTISZ_METADATA, NULL, METADATA_NO_ATTRIBUTES, FALSE, NULL };
  195. METABASE_PROPERTY METABASE_PROPERTY_DATA::s_ServerComment =
  196. { L"ServerComment",MD_SERVER_COMMENT, IIS_MD_UT_SERVER, STRING_METADATA, NULL, METADATA_INHERIT, FALSE, L"" };
  197. METABASE_PROPERTY METABASE_PROPERTY_DATA::s_KeyType =
  198. { L"", MD_KEY_TYPE, IIS_MD_UT_SERVER, STRING_METADATA, NULL, METADATA_NO_ATTRIBUTES, FALSE, L"IIsObject", 0 };
  199. METABASE_PROPERTY* METABASE_PROPERTY_DATA::s_MetabaseProperties[] =
  200. {
  201. &s_AppRoot,
  202. &s_Path,
  203. &s_ServerBindings,
  204. &s_ServerComment,
  205. &s_KeyType,
  206. NULL
  207. };
  208. //
  209. //initiailze WMI_METHOD_PARAM_DATA
  210. //
  211. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_Applications = { L"Applications", CIM_STRING | VT_ARRAY, PARAM_OUT };
  212. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_AppMode = { L"AppMode", CIM_SINT32, PARAM_IN };
  213. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_BackupDateTimeOut = { L"BackupDateTimeOut", CIM_DATETIME, PARAM_OUT };
  214. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_BackupFlags = { L"BackupFlags", CIM_SINT32, PARAM_IN };
  215. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_BackupLocation = { L"BackupLocation", CIM_STRING, PARAM_IN };
  216. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_BackupLocation_io = { L"BackupLocation", CIM_STRING, PARAM_INOUT };
  217. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_BackupVersion = { L"BackupVersion", CIM_SINT32, PARAM_IN };
  218. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_BackupVersionOut = { L"BackupVersionOut", CIM_SINT32, PARAM_OUT };
  219. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_DestPath = { L"DestPath", CIM_STRING, PARAM_IN };
  220. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_EnumIndex = { L"EnumIndex", CIM_SINT32, PARAM_IN};
  221. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_FileName = { L"FileName", CIM_STRING, PARAM_IN };
  222. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_HistoryTime = { L"HistoryTime", CIM_DATETIME, PARAM_OUT };
  223. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_IEnabled = { L"IEnabled", CIM_BOOLEAN, PARAM_IN };
  224. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_IEnabled_o = { L"IEnabled", CIM_BOOLEAN, PARAM_OUT };
  225. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_IMethod = { L"IMethod", CIM_SINT32, PARAM_IN };
  226. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_IndexIn = { L"IndexIn", CIM_SINT32, PARAM_IN };
  227. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_InProcFlag = { L"InProcFlag", CIM_BOOLEAN, PARAM_IN };
  228. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_AppPoolName = { L"AppPoolName", CIM_STRING, PARAM_IN };
  229. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_bCreate = { L"bCreate", CIM_BOOLEAN, PARAM_IN };
  230. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_MajorVersion = { L"MajorVersion", CIM_SINT32, PARAM_IN };
  231. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_MajorVersion_o = { L"MajorVersion", CIM_SINT32, PARAM_OUT };
  232. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_MDFlags = { L"MDFlags", CIM_SINT32, PARAM_IN };
  233. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_MDHistoryLocation = { L"MDHistoryLocation", CIM_STRING, PARAM_IN };
  234. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_MDHistoryLocation_io = { L"MDHistoryLocation", CIM_STRING, PARAM_INOUT };
  235. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_MinorVersion = { L"MinorVersion", CIM_SINT32, PARAM_IN };
  236. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_MinorVersion_o = { L"MinorVersion", CIM_SINT32, PARAM_OUT };
  237. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_NtAcct = { L"NtAcct", CIM_STRING, PARAM_IN };
  238. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_NtAcct_o = { L"NtAcct", CIM_STRING, PARAM_OUT };
  239. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_NtPwd = { L"NtPwd", CIM_STRING, PARAM_IN };
  240. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_NtPwd_o = { L"NtPwd", CIM_STRING, PARAM_OUT };
  241. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_Password = { L"Password", CIM_STRING, PARAM_IN };
  242. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_Passwd = { L"Passwd", CIM_STRING, PARAM_IN };
  243. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_PathOfRootVirtualDir = { L"PathOfRootVirtualDir", CIM_STRING, PARAM_IN };
  244. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_Recursive = { L"Recursive", CIM_BOOLEAN, PARAM_IN };
  245. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_ServerComment = { L"ServerComment", CIM_STRING, PARAM_IN };
  246. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_ServerBindings = { L"ServerBindings", VT_ARRAY | VT_UNKNOWN, PARAM_IN };
  247. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_ServerId = { L"ServerId", CIM_SINT32, PARAM_IN };
  248. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_ServerMode = { L"ServerMode", CIM_SINT32, PARAM_OUT };
  249. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_SourcePath = { L"SourcePath", CIM_STRING, PARAM_IN };
  250. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_strName = { L"strName", CIM_STRING, PARAM_IN };
  251. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_strName_o = { L"strName", CIM_STRING, PARAM_OUT };
  252. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_vCert = { L"vCert", CIM_STRING, PARAM_IN };
  253. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_vCert_o = { L"vCert", CIM_STRING, PARAM_OUT };
  254. WMI_METHOD_PARAM WMI_METHOD_PARAM_DATA::s_vKey = { L"vKey", CIM_STRING, PARAM_IN };
  255. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_ServiceCreateNewServer[] =
  256. {
  257. &s_ServerComment,
  258. &s_ServerBindings,
  259. &s_PathOfRootVirtualDir,
  260. &s_ServerId,
  261. NULL
  262. };
  263. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_GetCurrentMode[] =
  264. {
  265. &s_ServerMode,
  266. NULL
  267. };
  268. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_AppCreate[] =
  269. {
  270. &s_InProcFlag,
  271. &s_AppPoolName,
  272. &s_bCreate,
  273. NULL
  274. };
  275. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_AppCreate2[] =
  276. {
  277. &s_AppMode,
  278. &s_AppPoolName,
  279. &s_bCreate,
  280. NULL
  281. };
  282. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_AppDelete[] =
  283. {
  284. &s_Recursive,
  285. NULL
  286. };
  287. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_AppUnLoad[] =
  288. {
  289. &s_Recursive,
  290. NULL
  291. };
  292. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_AppEnable[] =
  293. {
  294. &s_Recursive,
  295. NULL
  296. };
  297. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_AppDisable[] =
  298. {
  299. &s_Recursive,
  300. NULL
  301. };
  302. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_BackupWithPasswd[] =
  303. {
  304. &s_BackupLocation,
  305. &s_BackupVersion,
  306. &s_BackupFlags,
  307. &s_Password,
  308. NULL
  309. };
  310. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_DeleteBackup[] =
  311. {
  312. &s_BackupLocation,
  313. &s_BackupVersion,
  314. NULL
  315. };
  316. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_EnumBackups[] =
  317. {
  318. &s_BackupLocation_io,
  319. &s_IndexIn,
  320. &s_BackupVersionOut,
  321. &s_BackupDateTimeOut,
  322. NULL
  323. };
  324. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_RestoreWithPasswd[] =
  325. {
  326. &s_BackupLocation,
  327. &s_BackupVersion,
  328. &s_BackupFlags,
  329. &s_Password,
  330. NULL
  331. };
  332. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_Export[] =
  333. {
  334. &s_Passwd,
  335. &s_FileName,
  336. &s_SourcePath,
  337. &s_MDFlags,
  338. NULL
  339. };
  340. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_Import[] =
  341. {
  342. &s_Passwd,
  343. &s_FileName,
  344. &s_SourcePath,
  345. &s_DestPath,
  346. &s_MDFlags,
  347. NULL
  348. };
  349. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_RestoreHistory[] =
  350. {
  351. &s_MDHistoryLocation,
  352. &s_MajorVersion,
  353. &s_MinorVersion,
  354. &s_MDFlags,
  355. NULL
  356. };
  357. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_EnumHistory[] =
  358. {
  359. &s_MDHistoryLocation_io,
  360. &s_MajorVersion_o,
  361. &s_MinorVersion_o,
  362. &s_HistoryTime,
  363. &s_EnumIndex,
  364. NULL
  365. };
  366. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_CreateMapping[] =
  367. {
  368. &s_vCert,
  369. &s_NtAcct,
  370. &s_NtPwd,
  371. &s_strName,
  372. &s_IEnabled,
  373. NULL
  374. };
  375. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_DeleteMapping[] =
  376. {
  377. &s_IMethod,
  378. &s_vKey,
  379. NULL
  380. };
  381. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_GetMapping[] =
  382. {
  383. &s_IMethod,
  384. &s_vKey,
  385. &s_vCert_o,
  386. &s_NtAcct_o,
  387. &s_NtPwd_o,
  388. &s_strName_o,
  389. &s_IEnabled_o,
  390. NULL
  391. };
  392. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_SetAcct[] =
  393. {
  394. &s_IMethod,
  395. &s_vKey,
  396. &s_NtAcct,
  397. NULL
  398. };
  399. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_SetEnabled[] =
  400. {
  401. &s_IMethod,
  402. &s_vKey,
  403. &s_IEnabled,
  404. NULL
  405. };
  406. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_SetName[] =
  407. {
  408. &s_IMethod,
  409. &s_vKey,
  410. &s_strName,
  411. NULL
  412. };
  413. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_SetPwd[] =
  414. {
  415. &s_IMethod,
  416. &s_vKey,
  417. &s_NtPwd,
  418. NULL
  419. };
  420. WMI_METHOD_PARAM* WMI_METHOD_PARAM_DATA::s_EnumAppsInPool[] =
  421. {
  422. &s_Applications,
  423. NULL
  424. };
  425. //
  426. //initialize WMI_METHOD_DATA
  427. //
  428. WMI_METHOD WMI_METHOD_DATA::s_ServiceCreateNewServer = {L"CreateNewSite", 0, L"string", WMI_METHOD_PARAM_DATA::s_ServiceCreateNewServer, L"Creates a new site." };
  429. WMI_METHOD WMI_METHOD_DATA::s_GetCurrentMode = {L"GetCurrentMode", 0, NULL, WMI_METHOD_PARAM_DATA::s_GetCurrentMode, L"Returns what mode -- Full Isolation (= 1) or Shared Isolation (= 0) -- the W3SVC is running in." };
  430. WMI_METHOD WMI_METHOD_DATA::s_ServerStart = {L"Start", MD_SERVER_COMMAND_START, NULL, NULL, L"Starts the server." };
  431. WMI_METHOD WMI_METHOD_DATA::s_ServerStop = {L"Stop", MD_SERVER_COMMAND_STOP, NULL, NULL, L"Stops the server." };
  432. WMI_METHOD WMI_METHOD_DATA::s_ServerContinue = {L"Continue", MD_SERVER_COMMAND_CONTINUE, NULL, NULL, L"Continues the server." };
  433. WMI_METHOD WMI_METHOD_DATA::s_ServerPause = {L"Pause", MD_SERVER_COMMAND_PAUSE, NULL, NULL, L"Pauses the server." };
  434. WMI_METHOD WMI_METHOD_DATA::s_AppCreate = {L"AppCreate", 0, NULL, WMI_METHOD_PARAM_DATA::s_AppCreate, L"Creates an application at the specified metabase key(parameter is a Boolean)." };
  435. WMI_METHOD WMI_METHOD_DATA::s_AppCreate2 = {L"AppCreate2", 0, NULL, WMI_METHOD_PARAM_DATA::s_AppCreate2, L"Creates an application at the specified metabase key(parameter is a Long)." };
  436. WMI_METHOD WMI_METHOD_DATA::s_AppDelete = {L"AppDelete", 0, NULL, WMI_METHOD_PARAM_DATA::s_AppDelete, L"Deletes an application definition at the specified key (and its subkeys)." };
  437. WMI_METHOD WMI_METHOD_DATA::s_AppUnLoad = {L"AppUnLoad", 0, NULL, WMI_METHOD_PARAM_DATA::s_AppUnLoad, L"Unloads an application at the specified key (and its subkeys)." };
  438. WMI_METHOD WMI_METHOD_DATA::s_AppDisable = {L"AppDisable", 0, NULL, WMI_METHOD_PARAM_DATA::s_AppDisable, NULL };
  439. WMI_METHOD WMI_METHOD_DATA::s_AppEnable = {L"AppEnable", 0, NULL, WMI_METHOD_PARAM_DATA::s_AppEnable, NULL };
  440. WMI_METHOD WMI_METHOD_DATA::s_AppGetStatus = {L"AppGetStatus", 0, L"uint32", NULL, NULL };
  441. WMI_METHOD WMI_METHOD_DATA::s_AspAppRestart = {L"AspAppRestart", 0, NULL, NULL, L"Restarts the ASP application that invoked it." };
  442. WMI_METHOD WMI_METHOD_DATA::s_SaveData = {L"SaveData", 0, NULL, NULL, L"Explicitly saves the metabase data to disk." };
  443. WMI_METHOD WMI_METHOD_DATA::s_BackupWithPasswd = {L"BackupWithPassword", 0, NULL, WMI_METHOD_PARAM_DATA::s_BackupWithPasswd, L"Saves the metabase to long-term storage." };
  444. WMI_METHOD WMI_METHOD_DATA::s_DeleteBackup = {L"DeleteBackup", 0, NULL, WMI_METHOD_PARAM_DATA::s_DeleteBackup, L"Deletes a metabase backup from long-term storage." };
  445. WMI_METHOD WMI_METHOD_DATA::s_EnumBackups = {L"EnumBackups", 0, NULL, WMI_METHOD_PARAM_DATA::s_EnumBackups, L"Enumerates metabase backups in long-term storage." };
  446. WMI_METHOD WMI_METHOD_DATA::s_RestoreWithPasswd = {L"RestoreWithPassword", 0, NULL, WMI_METHOD_PARAM_DATA::s_RestoreWithPasswd, L"Restores a metabase backup from long-term storage." };
  447. WMI_METHOD WMI_METHOD_DATA::s_Export = {L"Export", 0, NULL, WMI_METHOD_PARAM_DATA::s_Export, NULL };
  448. WMI_METHOD WMI_METHOD_DATA::s_Import = {L"Import", 0, NULL, WMI_METHOD_PARAM_DATA::s_Import, NULL };
  449. WMI_METHOD WMI_METHOD_DATA::s_RestoreHistory = {L"RestoreHistory", 0, NULL, WMI_METHOD_PARAM_DATA::s_RestoreHistory, NULL };
  450. WMI_METHOD WMI_METHOD_DATA::s_EnumHistory = {L"EnumHistory", 0, NULL, WMI_METHOD_PARAM_DATA::s_EnumHistory, NULL };
  451. WMI_METHOD WMI_METHOD_DATA::s_CreateMapping = {L"CreateMapping", 0, NULL, WMI_METHOD_PARAM_DATA::s_CreateMapping, L"Maps a certificate to a Windows account." };
  452. WMI_METHOD WMI_METHOD_DATA::s_DeleteMapping = {L"DeleteMapping", 0, NULL, WMI_METHOD_PARAM_DATA::s_DeleteMapping, L"Deletes an existing certificate mapping." };
  453. WMI_METHOD WMI_METHOD_DATA::s_GetMapping = {L"GetMapping", 0, NULL, WMI_METHOD_PARAM_DATA::s_GetMapping, L"Retrieves a certificate and the mapping data from an existing certificate mapping." };
  454. WMI_METHOD WMI_METHOD_DATA::s_SetAcct = {L"SetAcct", 0, NULL, WMI_METHOD_PARAM_DATA::s_SetAcct, L"Sets a new value for the Windows account string in an existing certificate mapping." };
  455. WMI_METHOD WMI_METHOD_DATA::s_SetEnabled = {L"SetEnabled", 0, NULL, WMI_METHOD_PARAM_DATA::s_SetEnabled, L"Enables or disables an existing certificate mapping." };
  456. WMI_METHOD WMI_METHOD_DATA::s_SetName = {L"SetName", 0, NULL, WMI_METHOD_PARAM_DATA::s_SetName, L"Sets a new value for the name string in an existing certificate mapping." };
  457. WMI_METHOD WMI_METHOD_DATA::s_SetPwd = {L"SetPwd", 0, NULL, WMI_METHOD_PARAM_DATA::s_SetPwd, L"Sets a new value for the Windows password string in an existing certificate mapping." };
  458. WMI_METHOD WMI_METHOD_DATA::s_RecycleAppPool = {L"RecycleAppPool", 0, NULL, NULL, L"Recycle an already enabled application pool on demand" };
  459. WMI_METHOD WMI_METHOD_DATA::s_EnumAppsInPool = {L"EnumAppsInPool", 0, NULL, WMI_METHOD_PARAM_DATA::s_EnumAppsInPool, L"Determine which applications are currently routed to the given application pool" };
  460. WMI_METHOD WMI_METHOD_DATA::s_Start = {L"Start", 0, NULL, NULL, L"Starts an application pool"};
  461. WMI_METHOD WMI_METHOD_DATA::s_Stop = {L"Stop", 0, NULL, NULL, L"Stops an application pool"};
  462. WMI_METHOD* WMI_METHOD_DATA::s_WebServiceMethods[] =
  463. {
  464. &s_ServiceCreateNewServer,
  465. &s_GetCurrentMode,
  466. NULL
  467. };
  468. WMI_METHOD* WMI_METHOD_DATA::s_ServiceMethods[] =
  469. {
  470. &s_ServiceCreateNewServer,
  471. NULL
  472. };
  473. WMI_METHOD* WMI_METHOD_DATA::s_ServerMethods[] =
  474. {
  475. &s_ServerStart,
  476. &s_ServerStop,
  477. &s_ServerContinue,
  478. &s_ServerPause,
  479. NULL
  480. };
  481. WMI_METHOD* WMI_METHOD_DATA::s_WebAppMethods[] =
  482. {
  483. &s_AppCreate,
  484. &s_AppCreate2,
  485. &s_AppDelete,
  486. &s_AppUnLoad,
  487. &s_AppDisable,
  488. &s_AppEnable,
  489. &s_AppGetStatus,
  490. &s_AspAppRestart,
  491. NULL
  492. };
  493. WMI_METHOD* WMI_METHOD_DATA::s_ComputerMethods[] =
  494. {
  495. &s_SaveData,
  496. &s_BackupWithPasswd,
  497. &s_DeleteBackup,
  498. &s_EnumBackups,
  499. &s_RestoreWithPasswd,
  500. &s_Export,
  501. &s_Import,
  502. &s_RestoreHistory,
  503. &s_EnumHistory,
  504. NULL
  505. };
  506. WMI_METHOD* WMI_METHOD_DATA::s_CertMapperMethods[] =
  507. {
  508. &s_CreateMapping,
  509. &s_DeleteMapping,
  510. &s_GetMapping,
  511. &s_SetAcct,
  512. &s_SetEnabled,
  513. &s_SetName,
  514. &s_SetPwd,
  515. NULL
  516. };
  517. WMI_METHOD* WMI_METHOD_DATA::s_AppPoolMethods[] =
  518. {
  519. &s_EnumAppsInPool,
  520. &s_RecycleAppPool,
  521. &s_Start,
  522. &s_Stop,
  523. NULL
  524. };
  525. //
  526. // initialize WMI_CLASS_DATA
  527. //
  528. //** Computer
  529. WMI_CLASS WMI_CLASS_DATA::s_Computer =
  530. {L"IIsComputer", L"", L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsComputer, WMI_METHOD_DATA::s_ComputerMethods, SHIPPED_TO_MOF, L"CIM_ApplicationSystem", true, NULL};
  531. WMI_CLASS WMI_CLASS_DATA::s_ComputerSetting =
  532. {L"IIsComputerSetting", L"", L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsComputer, NULL, SHIPPED_TO_MOF, g_wszSettingParent, true, NULL};
  533. //** FtpService
  534. WMI_CLASS WMI_CLASS_DATA::s_FtpService =
  535. {L"IIsFtpService", L"/LM", L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsFtpService, WMI_METHOD_DATA::s_ServiceMethods, SHIPPED_TO_MOF, g_awszParentClassWithNamePK[eWin32_Service], false, NULL};
  536. //** FtpServer
  537. WMI_CLASS WMI_CLASS_DATA::s_FtpServer =
  538. {L"IIsFtpServer", L"/LM", L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsFtpServer, WMI_METHOD_DATA::s_ServerMethods, SHIPPED_TO_MOF, g_wszElementParent, true, NULL};
  539. //** FtpVirtualDir
  540. WMI_CLASS WMI_CLASS_DATA::s_FtpVirtualDir =
  541. {L"IIsFtpVirtualDir",L"/LM",L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsFtpVirtualDir, NULL, SHIPPED_TO_MOF, g_awszParentClassWithNamePK[eIIsDirectory], true, NULL};
  542. //** WebService
  543. WMI_CLASS WMI_CLASS_DATA::s_WebService =
  544. {L"IIsWebService", L"/LM", L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsWebService, WMI_METHOD_DATA::s_WebServiceMethods, SHIPPED_TO_MOF, g_awszParentClassWithNamePK[eWin32_Service], false, NULL};
  545. //** WebFilter
  546. WMI_CLASS WMI_CLASS_DATA::s_WebFilter =
  547. {L"IIsFilter", L"/LM", L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsFilter, NULL, SHIPPED_TO_MOF, g_wszElementParent, true, NULL};
  548. //** WebServer
  549. WMI_CLASS WMI_CLASS_DATA::s_WebServer =
  550. {L"IIsWebServer", L"/LM", L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsWebServer, WMI_METHOD_DATA::s_ServerMethods, SHIPPED_TO_MOF, g_wszElementParent, true, NULL};
  551. //** Web CertMapper
  552. WMI_CLASS WMI_CLASS_DATA::s_WebCertMapper =
  553. {L"IIsCertMapper",L"/LM",L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsCertMapper, WMI_METHOD_DATA::s_CertMapperMethods, SHIPPED_TO_MOF, g_wszElementParent, true, NULL};
  554. //** Web VirtualDir
  555. WMI_CLASS WMI_CLASS_DATA::s_WebVirtualDir =
  556. {L"IIsWebVirtualDir",L"/LM",L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsWebVirtualDir, WMI_METHOD_DATA::s_WebAppMethods, SHIPPED_TO_MOF, g_awszParentClassWithNamePK[eIIsDirectory], true, NULL};
  557. //** Web Directory
  558. WMI_CLASS WMI_CLASS_DATA::s_WebDirectory =
  559. {L"IIsWebDirectory",L"/LM",L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsWebDirectory, WMI_METHOD_DATA::s_WebAppMethods, SHIPPED_TO_MOF, g_awszParentClassWithNamePK[eIIsDirectory], true, NULL};
  560. //** Web File
  561. WMI_CLASS WMI_CLASS_DATA::s_WebFile =
  562. {L"IIsWebFile",L"/LM",L"Name", NULL, &METABASE_KEYTYPE_DATA::s_IIsWebFile, NULL, SHIPPED_TO_MOF, g_awszParentClassWithNamePK[eIIsDirectory], true, NULL};
  563. //** Application Pool
  564. WMI_CLASS WMI_CLASS_DATA::s_ApplicationPool =
  565. {L"IIsApplicationPool",L"/LM",L"Name",NULL, &METABASE_KEYTYPE_DATA::s_IIsApplicationPool, WMI_METHOD_DATA::s_AppPoolMethods, SHIPPED_TO_MOF, g_wszElementParent, true, NULL};
  566. //** AdminACL
  567. WMI_CLASS WMI_CLASS_DATA::s_AdminACL =
  568. {L"IIsAdminACL", L"/LM",L"Name", NULL, &METABASE_KEYTYPE_DATA::s_TYPE_AdminACL, NULL, SHIPPED_NOT_TO_MOF, g_wszElementParent, true, NULL};
  569. WMI_CLASS WMI_CLASS_DATA::s_ACE =
  570. {L"IIsACE", L"/LM",L"Name", NULL, &METABASE_KEYTYPE_DATA::s_TYPE_AdminACE, NULL, SHIPPED_NOT_TO_MOF, g_wszElementParent, true, NULL};
  571. //** IPSecurity
  572. WMI_CLASS WMI_CLASS_DATA::s_IPSecurity =
  573. {L"IIsIPSecuritySetting", L"/LM",L"Name", NULL, &METABASE_KEYTYPE_DATA::s_TYPE_IPSecurity, NULL, SHIPPED_NOT_TO_MOF, g_wszSettingParent, true, NULL};
  574. WMI_CLASS* WMI_CLASS_DATA:: s_WmiClasses[] =
  575. {
  576. &s_Computer,
  577. &s_ComputerSetting,
  578. &s_FtpService,
  579. &s_FtpServer,
  580. &s_FtpVirtualDir,
  581. &s_WebService,
  582. &s_WebFilter,
  583. &s_WebServer,
  584. &s_WebCertMapper,
  585. &s_WebVirtualDir,
  586. &s_WebDirectory,
  587. &s_WebFile,
  588. &s_ApplicationPool,
  589. &s_AdminACL,
  590. &s_ACE,
  591. &s_IPSecurity,
  592. NULL
  593. };
  594. //** Hard-coded Associations
  595. WMI_ASSOCIATION WMI_ASSOCIATION_DATA::s_AdminACLToACE =
  596. { L"IIsAdminACL_IIsACE", &WMI_CLASS_DATA::s_AdminACL, &WMI_CLASS_DATA::s_ACE, &WMI_ASSOCIATION_TYPE_DATA::s_AdminACL, 0, SHIPPED_TO_MOF, g_wszGroupPartAssocParent};
  597. WMI_ASSOCIATION* WMI_ASSOCIATION_DATA:: s_WmiAssociations[] =
  598. {
  599. &s_AdminACLToACE,
  600. NULL
  601. };