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.

575 lines
21 KiB

  1. VERSION 5.00
  2. Begin VB.Form CimXMLTestForm
  3. Caption = "Form1"
  4. ClientHeight = 8832
  5. ClientLeft = 132
  6. ClientTop = 420
  7. ClientWidth = 10512
  8. LinkTopic = "Form1"
  9. ScaleHeight = 8832
  10. ScaleWidth = 10512
  11. StartUpPosition = 3 'Windows Default
  12. Begin VB.CommandButton TestInterOp
  13. Caption = "TestInterOp"
  14. Height = 315
  15. Left = 7200
  16. TabIndex = 25
  17. Top = 4200
  18. Width = 1335
  19. End
  20. Begin VB.CommandButton Clear
  21. Caption = "Clear"
  22. Height = 375
  23. Left = 5520
  24. TabIndex = 20
  25. Top = 3720
  26. Width = 1455
  27. End
  28. Begin VB.CommandButton ExecMethod
  29. Caption = "ExecMethod"
  30. Height = 375
  31. Left = 8880
  32. TabIndex = 19
  33. Top = 3720
  34. Width = 1575
  35. End
  36. Begin VB.TextBox ExecQueryBox
  37. Height = 2175
  38. Left = 1440
  39. TabIndex = 18
  40. Text = "select * from Win32_Processor"
  41. Top = 2160
  42. Width = 3735
  43. End
  44. Begin VB.CommandButton ExecQuery
  45. Caption = "ExecQuery"
  46. Height = 375
  47. Left = 120
  48. TabIndex = 17
  49. Top = 2160
  50. Width = 1215
  51. End
  52. Begin VB.CommandButton GetInstance
  53. Caption = "GetInstance"
  54. Height = 375
  55. Left = 7200
  56. TabIndex = 16
  57. Top = 3720
  58. Width = 1575
  59. End
  60. Begin VB.CheckBox DeepOption
  61. Caption = "Deep"
  62. Height = 255
  63. Left = 240
  64. TabIndex = 14
  65. Top = 2880
  66. Value = 1 'Checked
  67. Width = 735
  68. End
  69. Begin VB.TextBox EnumInstanceBox
  70. Height = 375
  71. Left = 1440
  72. TabIndex = 13
  73. Text = "Win32_ComputerSystem"
  74. Top = 1680
  75. Width = 2655
  76. End
  77. Begin VB.CommandButton EnumInstance
  78. Caption = "EnumInstance"
  79. Height = 375
  80. Left = 120
  81. TabIndex = 12
  82. Top = 1680
  83. Width = 1215
  84. End
  85. Begin VB.TextBox RequestXMLBox
  86. Height = 3375
  87. Left = 5280
  88. MultiLine = -1 'True
  89. ScrollBars = 3 'Both
  90. TabIndex = 7
  91. Top = 120
  92. Width = 5175
  93. End
  94. Begin VB.Frame OutputFrame
  95. Caption = "Responses"
  96. Height = 4695
  97. Left = 120
  98. TabIndex = 6
  99. Top = 4440
  100. Width = 10215
  101. Begin VB.TextBox LengthBox
  102. Height = 375
  103. Left = 8280
  104. TabIndex = 15
  105. Top = 360
  106. Width = 1575
  107. End
  108. Begin VB.TextBox XMLOutputBox
  109. Height = 3495
  110. Left = 240
  111. MultiLine = -1 'True
  112. ScrollBars = 3 'Both
  113. TabIndex = 11
  114. Top = 960
  115. Width = 9615
  116. End
  117. Begin VB.TextBox StatusTextBox
  118. Height = 375
  119. Left = 3120
  120. TabIndex = 10
  121. Top = 360
  122. Width = 5055
  123. End
  124. Begin VB.TextBox StatusBox
  125. Height = 375
  126. Left = 1560
  127. TabIndex = 9
  128. Top = 360
  129. Width = 1335
  130. End
  131. Begin VB.Label HTTPStatus
  132. Caption = "HTTP Status"
  133. Height = 255
  134. Left = 120
  135. TabIndex = 8
  136. Top = 360
  137. Width = 1095
  138. End
  139. End
  140. Begin VB.TextBox GetClassBox
  141. Height = 405
  142. Left = 1440
  143. TabIndex = 5
  144. Text = "Win32_Desktop"
  145. Top = 1200
  146. Width = 2895
  147. End
  148. Begin VB.CommandButton GetClass
  149. Caption = "GetClass"
  150. Height = 375
  151. Left = 360
  152. TabIndex = 4
  153. Top = 1200
  154. Width = 975
  155. End
  156. Begin VB.TextBox NamespaceBox
  157. Height = 405
  158. Left = 1080
  159. TabIndex = 3
  160. Text = "root\cimv2"
  161. Top = 600
  162. Width = 2895
  163. End
  164. Begin VB.TextBox URLBox
  165. Height = 405
  166. Left = 1080
  167. TabIndex = 1
  168. Text = "http://localhost/cimom"
  169. Top = 120
  170. Width = 2895
  171. End
  172. Begin VB.Frame FlagsFrame
  173. Caption = "Flags"
  174. Height = 1575
  175. Left = 120
  176. TabIndex = 21
  177. Top = 2640
  178. Width = 1215
  179. Begin VB.CheckBox QualifiersOption
  180. Caption = "Qualifiers"
  181. Height = 255
  182. Left = 120
  183. TabIndex = 24
  184. Top = 1200
  185. Width = 975
  186. End
  187. Begin VB.CheckBox ClassOriginOption
  188. Caption = "Class Org."
  189. Height = 375
  190. Left = 120
  191. TabIndex = 23
  192. Top = 840
  193. Width = 975
  194. End
  195. Begin VB.CheckBox LocalOption
  196. Caption = "Local"
  197. Height = 195
  198. Left = 120
  199. TabIndex = 22
  200. Top = 600
  201. Value = 1 'Checked
  202. Width = 735
  203. End
  204. End
  205. Begin VB.Label NamespaceLabel
  206. Caption = "Namespace"
  207. Height = 255
  208. Left = 0
  209. TabIndex = 2
  210. Top = 720
  211. Width = 975
  212. End
  213. Begin VB.Label URLLabel
  214. Caption = "URL"
  215. Height = 255
  216. Left = 240
  217. TabIndex = 0
  218. Top = 240
  219. Width = 495
  220. End
  221. End
  222. Attribute VB_Name = "CimXMLTestForm"
  223. Attribute VB_GlobalNameSpace = False
  224. Attribute VB_Creatable = False
  225. Attribute VB_PredeclaredId = True
  226. Attribute VB_Exposed = False
  227. Private Sub ClearOutput()
  228. StatusBox.Text = " "
  229. StatusTextBox.Text = " "
  230. XMLOutputBox.Text = " "
  231. LengthBox.Text = " "
  232. End Sub
  233. Private Sub Clear_Click()
  234. RequestXMLBox.Text = ""
  235. End Sub
  236. Private Sub EnumInstance_Click()
  237. ClearOutput
  238. Set theRequest = CreateObject("Microsoft.XMLHTTP")
  239. theRequest.open "M-POST", URLBox.Text, False
  240. theRequest.setRequestHeader "Content-Type", "application/xml;charset=""utf-8"""
  241. theRequest.setRequestHeader "Man", "http://www.dmtf.org/cim/operation;ns=73"
  242. theRequest.setRequestHeader "73-CIMOperation", "MethodCall"
  243. theRequest.setRequestHeader "73-CIMMethod", "EnumerateInstances"
  244. theRequest.setRequestHeader "73-CIMObject", NamespaceBox.Text
  245. Dim theLocalOption As String
  246. Dim theIncludeQualifierOption As String
  247. Dim theIncludeClassOriginOption As String
  248. If (LocalOption.Value = 1) Then
  249. theLocalOption = "TRUE"
  250. Else
  251. theLocalOption = "FALSE"
  252. End If
  253. If (QualifiersOption.Value = 1) Then
  254. theIncludeQualifierOption = "TRUE"
  255. Else
  256. theIncludeQualifierOption = "FALSE"
  257. End If
  258. If (ClassOriginOption.Value = 1) Then
  259. theIncludeClassOriginOption = "TRUE"
  260. Else
  261. theIncludeClassOriginOption = "FALSE"
  262. End If
  263. Dim theDeep As String
  264. theDeep = "TRUE"
  265. If DeepOption.Value = 0 Then
  266. theDeep = "FALSE"
  267. End If
  268. Dim theBody As String
  269. theBody = "<?xml version=""1.0"" ?>" & Chr(13) & Chr(10) & _
  270. "<CIM CIMVERSION=""2.0"" DTDVERSION=""2.0"">" & Chr(13) & Chr(10) & _
  271. "<MESSAGE ID=""877"" PROTOCOLVERSION=""1.0"">" & Chr(13) & Chr(10) & _
  272. "<SIMPLEREQ>" & Chr(13) & Chr(10) & _
  273. "<IMETHODCALL NAME=""EnumerateInstances"">" & Chr(13) & Chr(10) & _
  274. "<LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  275. "<NAMESPACE NAME=""" & NamespaceBox.Text & """ />" & Chr(13) & Chr(10) & _
  276. "</LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  277. "<PARAMVALUE NAME=""ClassName"">" & EnumInstanceBox.Text & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  278. "<PARAMVALUE NAME=""LocalOnly"">" & theLocalOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  279. "<PARAMVALUE NAME=""DeepInheritance"">" & theDeep & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  280. "<PARAMVALUE NAME=""IncludeQualifiers"">" & theIncludeQualifierOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  281. "<PARAMVALUE NAME=""IncludeClassOrigin"">" & theIncludeClassOriginOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  282. "</IMETHODCALL>" & Chr(13) & Chr(10) & _
  283. "</SIMPLEREQ>" & Chr(13) & Chr(10) & _
  284. "</MESSAGE>" & Chr(13) & Chr(10) & _
  285. "</CIM>"
  286. ShowResults theRequest, theBody
  287. End Sub
  288. Private Sub ExecMethod_Click()
  289. If RequestXMLBox.Text = "" Then
  290. RequestXMLBox.Text = "<?xml version=""1.0"" ?>" & Chr(13) & Chr(10) & _
  291. "<CIM CIMVERSION=""2.0"" DTDVERSION=""2.0"">" & Chr(13) & Chr(10) & _
  292. "<MESSAGE ID=""877"" PROTOCOLVERSION=""1.0"">" & Chr(13) & Chr(10) & _
  293. "<SIMPLEREQ>" & Chr(13) & Chr(10) & _
  294. "<METHODCALL NAME=""Create"">" & Chr(13) & Chr(10) & _
  295. "<LOCALCLASSPATH>" & Chr(13) & Chr(10) & _
  296. "<LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  297. "<NAMESPACE NAME=""root\cimv2"" />" & Chr(13) & Chr(10) & _
  298. "</LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  299. "<CLASSNAME NAME=""Win32_Process""/>" & Chr(13) & Chr(10) & _
  300. "</LOCALCLASSPATH>" & Chr(13) & Chr(10) & _
  301. "<PARAMVALUE NAME=""CommandLine"">notepad.exe</PARAMVALUE>" & Chr(13) & Chr(10) & _
  302. "</METHODCALL>" & Chr(13) & Chr(10) & _
  303. "</SIMPLEREQ>" & Chr(13) & Chr(10) & _
  304. "</MESSAGE>" & Chr(13) & Chr(10) & _
  305. "</CIM>"
  306. Else
  307. ClearOutput
  308. Set theRequest = CreateObject("Microsoft.XMLHTTP")
  309. theRequest.open "POST", URLBox.Text, False
  310. theRequest.setRequestHeader "Content-Type", "application/xml;charset=""utf-8"""
  311. theRequest.setRequestHeader "CIMOperation", "MethodCall"
  312. theRequest.setRequestHeader "CIMMethod", "Create"
  313. theRequest.setRequestHeader "CIMObject", "root/cimv2:win32_process"
  314. ShowResults theRequest, RequestXMLBox.Text
  315. End If
  316. End Sub
  317. Private Sub ExecQuery_Click()
  318. ClearOutput
  319. Set theRequest = CreateObject("Microsoft.XMLHTTP")
  320. theRequest.open "M-POST", URLBox.Text, False
  321. theRequest.setRequestHeader "Content-Type", "application/xml;charset=""utf-8"""
  322. theRequest.setRequestHeader "Man", "http://www.dmtf.org/cim/operation;ns=73"
  323. theRequest.setRequestHeader "73-CIMOperation", "MethodCall"
  324. theRequest.setRequestHeader "73-CIMMethod", "ExecQuery"
  325. theRequest.setRequestHeader "73-CIMObject", NamespaceBox.Text
  326. Dim theLocalOption As String
  327. Dim theIncludeQualifierOption As String
  328. Dim theIncludeClassOriginOption As String
  329. If (LocalOption.Value = 1) Then
  330. theLocalOption = "TRUE"
  331. Else
  332. theLocalOption = "FALSE"
  333. End If
  334. If (QualifiersOption.Value = 1) Then
  335. theIncludeQualifierOption = "TRUE"
  336. Else
  337. theIncludeQualifierOption = "FALSE"
  338. End If
  339. If (ClassOriginOption.Value = 1) Then
  340. theIncludeClassOriginOption = "TRUE"
  341. Else
  342. theIncludeClassOriginOption = "FALSE"
  343. End If
  344. Dim theBody As String
  345. theBody = "<?xml version=""1.0"" ?>" & Chr(13) & Chr(10) & _
  346. "<CIM CIMVERSION=""2.0"" DTDVERSION=""2.0"">" & Chr(13) & Chr(10) & _
  347. "<MESSAGE ID=""877"" PROTOCOLVERSION=""1.0"">" & Chr(13) & Chr(10) & _
  348. "<SIMPLEREQ>" & Chr(13) & Chr(10) & _
  349. "<IMETHODCALL NAME=""ExecQuery"">" & Chr(13) & Chr(10) & _
  350. "<LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  351. "<NAMESPACE NAME=""" & NamespaceBox.Text & """ />" & Chr(13) & Chr(10) & _
  352. "</LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  353. "<PARAMVALUE NAME=""QueryLanguage"">" & Chr(13) & Chr(10) & _
  354. "WQL" & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  355. "<PARAMVALUE NAME=""Query"">" & Chr(13) & Chr(10) & _
  356. ExecQueryBox.Text & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  357. "<PARAMVALUE NAME=""IncludeQualifiers"">" & theIncludeQualifierOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  358. "<PARAMVALUE NAME=""IncludeClassOrigin"">" & theIncludeClassOriginOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  359. "</IMETHODCALL>" & Chr(13) & Chr(10) & _
  360. "</SIMPLEREQ>" & Chr(13) & Chr(10) & _
  361. "</MESSAGE>" & Chr(13) & Chr(10) & _
  362. "</CIM>"
  363. ShowResults theRequest, theBody
  364. End Sub
  365. Private Sub GetClass_Click()
  366. ClearOutput
  367. Set theRequest = CreateObject("Microsoft.XMLHTTP")
  368. theRequest.open "M-POST", URLBox.Text, False
  369. theRequest.setRequestHeader "Content-Type", "application/xml;charset=""utf-8"""
  370. theRequest.setRequestHeader "Man", "http://www.dmtf.org/cim/operation;ns=73"
  371. theRequest.setRequestHeader "73-CIMOperation", "MethodCall"
  372. theRequest.setRequestHeader "73-CIMMethod", "GetClass"
  373. theRequest.setRequestHeader "73-CIMObject", NamespaceBox.Text
  374. Dim theBody As String
  375. Dim theLocalOption As String
  376. Dim theIncludeQualifierOption As String
  377. Dim theIncludeClassOriginOption As String
  378. If (LocalOption.Value = 1) Then
  379. theLocalOption = "TRUE"
  380. Else
  381. theLocalOption = "FALSE"
  382. End If
  383. If (QualifiersOption.Value = 1) Then
  384. theIncludeQualifierOption = "TRUE"
  385. Else
  386. theIncludeQualifierOption = "FALSE"
  387. End If
  388. If (ClassOriginOption.Value = 1) Then
  389. theIncludeClassOriginOption = "TRUE"
  390. Else
  391. theIncludeClassOriginOption = "FALSE"
  392. End If
  393. theBody = "<?xml version=""1.0"" ?>" & Chr(13) & Chr(10) & _
  394. "<CIM CIMVERSION=""2.0"" DTDVERSION=""2.0"">" & Chr(13) & Chr(10) & _
  395. "<MESSAGE ID=""877"" PROTOCOLVERSION=""1.0"">" & Chr(13) & Chr(10) & _
  396. "<SIMPLEREQ>" & Chr(13) & Chr(10) & _
  397. "<IMETHODCALL NAME=""GetClass"">" & Chr(13) & Chr(10) & _
  398. "<LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  399. "<NAMESPACE NAME=""" & NamespaceBox.Text & """ />" & Chr(13) & Chr(10) & _
  400. "</LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  401. "<PARAMVALUE NAME=""ClassName"">" & GetClassBox.Text & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  402. "<PARAMVALUE NAME=""LocalOnly"">" & theLocalOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  403. "<PARAMVALUE NAME=""IncludeQualifiers"">" & theIncludeQualifierOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  404. "<PARAMVALUE NAME=""IncludeClassOrigin"">" & theIncludeClassOriginOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  405. "</IMETHODCALL>" & Chr(13) & Chr(10) & _
  406. "</SIMPLEREQ>" & Chr(13) & Chr(10) & _
  407. "</MESSAGE>" & Chr(13) & Chr(10) & _
  408. "</CIM>"
  409. ShowResults theRequest, theBody
  410. End Sub
  411. Private Sub GetInstance_Click()
  412. Dim theLocalOption As String
  413. Dim theIncludeQualifierOption As String
  414. Dim theIncludeClassOriginOption As String
  415. If (LocalOption.Value = 1) Then
  416. theLocalOption = "TRUE"
  417. Else
  418. theLocalOption = "FALSE"
  419. End If
  420. If (QualifiersOption.Value = 1) Then
  421. theIncludeQualifierOption = "TRUE"
  422. Else
  423. theIncludeQualifierOption = "FALSE"
  424. End If
  425. If (ClassOriginOption.Value = 1) Then
  426. theIncludeClassOriginOption = "TRUE"
  427. Else
  428. theIncludeClassOriginOption = "FALSE"
  429. End If
  430. If RequestXMLBox.Text = "" Then
  431. RequestXMLBox.Text = "<?xml version=""1.0"" ?>" & Chr(13) & Chr(10) & _
  432. "<CIM CIMVERSION=""2.0"" DTDVERSION=""2.0"">" & Chr(13) & Chr(10) & _
  433. "<MESSAGE ID=""877"" PROTOCOLVERSION=""1.0"">" & Chr(13) & Chr(10) & _
  434. "<SIMPLEREQ>" & Chr(13) & Chr(10) & _
  435. "<IMETHODCALL NAME=""GetInstance"">" & Chr(13) & Chr(10) & _
  436. "<LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  437. "<NAMESPACE NAME=""root\cimv2"" />" & Chr(13) & Chr(10) & _
  438. "</LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  439. "<PARAMVALUE.INSTNAME NAME=""InstanceName"">" & Chr(13) & Chr(10) & _
  440. "<INSTANCENAME CLASSNAME=""Win32_ComputerSystem"">" & Chr(13) & Chr(10) & _
  441. "<KEYBINDING NAME=""NAME"">" & Chr(13) & Chr(10) & _
  442. "<KEYVALUE>RAJESHR31</KEYVALUE>" & Chr(13) & Chr(10) & _
  443. "</KEYBINDING>" & Chr(13) & Chr(10) & _
  444. "</INSTANCENAME>" & Chr(13) & Chr(10) & _
  445. "</PARAMVALUE.INSTNAME>" & Chr(13) & Chr(10) & _
  446. "<PARAMVALUE NAME=""LocalOnly"">" & theLocalOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  447. "<PARAMVALUE NAME=""IncludeQualifiers"">" & theIncludeQualifierOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  448. "<PARAMVALUE NAME=""IncludeClassOrigin"">" & theIncludeClassOriginOption & "</PARAMVALUE>" & Chr(13) & Chr(10) & _
  449. "</IMETHODCALL>" & Chr(13) & Chr(10) & _
  450. "</SIMPLEREQ>" & Chr(13) & Chr(10) & _
  451. "</MESSAGE>" & Chr(13) & Chr(10) & _
  452. "</CIM>"
  453. Else
  454. ClearOutput
  455. Set theRequest = CreateObject("Microsoft.XMLHTTP")
  456. theRequest.open "M-POST", URLBox.Text, False
  457. theRequest.setRequestHeader "Content-Type", "application/xml;charset=""utf-8"""
  458. theRequest.setRequestHeader "Man", "http://www.dmtf.org/cim/operation;ns=73"
  459. theRequest.setRequestHeader "73-CIMOperation", "MethodCall"
  460. theRequest.setRequestHeader "73-CIMMethod", "GetInstance"
  461. theRequest.setRequestHeader "73-CIMObject", NamespaceBox.Text
  462. ShowResults theRequest, RequestXMLBox.Text
  463. End If
  464. End Sub
  465. Private Sub Form_Load()
  466. RequestXMLBox.Text = "<?xml version=""1.0"" ?>" & Chr(13) & Chr(10) & _
  467. "<CIM CIMVERSION=""2.0"" DTDVERSION=""2.0"">" & Chr(13) & Chr(10) & _
  468. "<MESSAGE ID=""877"" PROTOCOLVERSION=""1.0"">" & Chr(13) & Chr(10) & _
  469. "<SIMPLEREQ>" & Chr(13) & Chr(10) & _
  470. "<IMETHODCALL NAME=""GetInstance"">" & Chr(13) & Chr(10) & _
  471. "<LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  472. "<NAMESPACE NAME=""root\cimv2"" />" & Chr(13) & Chr(10) & _
  473. "</LOCALNAMESPACEPATH>" & Chr(13) & Chr(10) & _
  474. "<PARAMVALUE.INSTNAME NAME=""InstanceName"">" & Chr(13) & Chr(10) & _
  475. "<INSTANCENAME CLASSNAME=""Win32_ComputerSystem"">" & Chr(13) & Chr(10) & _
  476. "<KEYBINDING NAME=""NAME"">" & Chr(13) & Chr(10) & _
  477. "<KEYVALUE>RAJESHR31</KEYVALUE>" & Chr(13) & Chr(10) & _
  478. "</KEYBINDING>" & Chr(13) & Chr(10) & _
  479. "</INSTANCENAME>" & Chr(13) & Chr(10) & _
  480. "</PARAMVALUE.INSTNAME>" & Chr(13) & Chr(10) & _
  481. "<PARAMVALUE NAME=""LocalOnly"">FALSE</PARAMVALUE>" & Chr(13) & Chr(10) & _
  482. "</IMETHODCALL>" & Chr(13) & Chr(10) & _
  483. "</SIMPLEREQ>" & Chr(13) & Chr(10) & _
  484. "</MESSAGE>" & Chr(13) & Chr(10) & _
  485. "</CIM>"
  486. End Sub
  487. Private Sub ShowResults(xmlRequest, xmlBody)
  488. RequestXMLBox.Text = xmlBody
  489. xmlRequest.send (xmlBody)
  490. StatusBox.Text = xmlRequest.Status
  491. StatusTextBox.Text = xmlRequest.statusText
  492. XMLOutputBox.Text = xmlRequest.responseText
  493. LengthBox.Text = Len(xmlRequest.responseText)
  494. End Sub
  495. Private Sub TestInterOp_Click()
  496. ClearOutput
  497. Set theRequest = CreateObject("Microsoft.XMLHTTP")
  498. theRequest.open "M-POST", URLBox.Text, False
  499. theRequest.setRequestHeader "Content-Type", "application/xml;charset=""utf-8"""
  500. theRequest.setRequestHeader "Man", "http://www.dmtf.org/cim/operation;ns=73"
  501. theRequest.setRequestHeader "73-CIMOperation", "MethodCall"
  502. theRequest.setRequestHeader "73-CIMMethod", "EnumerateInstances"
  503. theRequest.setRequestHeader "73-CIMObject", NamespaceBox.Text
  504. Dim theLocalOption As String
  505. Dim theIncludeQualifierOption As String
  506. Dim theIncludeClassOriginOption As String
  507. If (LocalOption.Value = 1) Then
  508. theLocalOption = "TRUE"
  509. Else
  510. theLocalOption = "FALSE"
  511. End If
  512. If (QualifiersOption.Value = 1) Then
  513. theIncludeQualifierOption = "TRUE"
  514. Else
  515. theIncludeQualifierOption = "FALSE"
  516. End If
  517. If (ClassOriginOption.Value = 1) Then
  518. theIncludeClassOriginOption = "TRUE"
  519. Else
  520. theIncludeClassOriginOption = "FALSE"
  521. End If
  522. Dim theDeep As String
  523. theDeep = "TRUE"
  524. If DeepOption.Value = 0 Then
  525. theDeep = "FALSE"
  526. End If
  527. Dim theBody As String
  528. theBody = RequestXMLBox.Text
  529. ShowResults theRequest, theBody
  530. End Sub