34 static const WCHAR captionW[] = {
'C',
'a',
'p',
't',
'i',
'o',
'n',0};
35 static const WCHAR descriptionW[] = {
'D',
'e',
's',
'c',
'r',
'i',
'p',
't',
'i',
'o',
'n',0};
66 hr = IWbemClassObject_GetQualifierSet(
obj, &qualifiers );
69 hr = IWbemQualifierSet_GetNames( qualifiers, 0, &
names );
73 IWbemQualifierSet_Release( qualifiers );
74 IWbemClassObject_Release(
obj );
85 static const WCHAR sqlW[] = {
'S',
'Q',
'L',0};
86 static const WCHAR query1[] =
87 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'H',
'O',
'T',
'F',
'I',
'X',
'I',
'D',
' ',
'F',
'R',
'O',
'M',
' ',
88 'W',
'i',
'n',
'3',
'2',
'_',
'Q',
'u',
'i',
'c',
'k',
'F',
'i',
'x',
'E',
'n',
'g',
'i',
'n',
'e',
'e',
'r',
'i',
'n',
'g',0};
89 static const WCHAR query2[] =
90 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
'B',
'I',
'O',
'S',0};
91 static const WCHAR query3[] =
92 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
93 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
' ',
'W',
'H',
'E',
'R',
'E',
' ',
94 '\"',
'N',
'T',
'F',
'S',
'\"',
' ',
'=',
' ',
'F',
'i',
'l',
'e',
'S',
'y',
's',
't',
'e',
'm',0};
95 static const WCHAR query4[] =
96 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'a',
' ',
'F',
'R',
'O',
'M',
' ',
'b',0};
97 static const WCHAR query5[] =
98 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'a',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
'B',
'i',
'o',
's',0};
99 static const WCHAR query6[] =
100 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'D',
'e',
's',
'c',
'r',
'i',
'p',
't',
'i',
'o',
'n',
' ',
'F',
'R',
'O',
'M',
' ',
101 'W',
'i',
'n',
'3',
'2',
'_',
'B',
'i',
'o',
's',0};
102 static const WCHAR query7[] =
103 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
104 'P',
'r',
'o',
'c',
'e',
's',
's',
' ',
'W',
'H',
'E',
'R',
'E',
' ',
'C',
'a',
'p',
't',
'i',
'o',
'n',
' ',
105 'L',
'I',
'K',
'E',
' ',
'\'',
'%',
'%',
'R',
'E',
'G',
'E',
'D',
'I',
'T',
'%',
'\'',0};
106 static const WCHAR query8[] =
107 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
108 'D',
'i',
's',
'k',
'D',
'r',
'i',
'v',
'e',
' ',
'W',
'H',
'E',
'R',
'E',
' ',
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'=',
109 '\"',
'\\',
'\\',
'\\',
'\\',
'.',
'\\',
'\\',
'P',
'H',
'Y',
'S',
'I',
'C',
'A',
'L',
'D',
'R',
'I',
'V',
'E',
'0',
'\"',0};
110 static const WCHAR query9[] =
111 {
'S',
'E',
'L',
'E',
'C',
'T',
'\n',
'a',
'\r',
'F',
'R',
'O',
'M',
'\t',
'b',0};
112 static const WCHAR query10[] =
113 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
114 'P',
'r',
'o',
'c',
'e',
's',
's',
' ',
'W',
'H',
'E',
'R',
'E',
' ',
'C',
'a',
'p',
't',
'i',
'o',
'n',
' ',
115 'L',
'I',
'K',
'E',
' ',
'"',
'%',
'f',
'i',
'r',
'e',
'f',
'o',
'x',
'.',
'e',
'x',
'e',
'"',0};
116 static const WCHAR query11[] =
117 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
118 'W',
'i',
'n',
'3',
'2',
'_',
'V',
'i',
'd',
'e',
'o',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'l',
'e',
'r',
' ',
'w',
'h',
'e',
'r',
'e',
' ',
119 'a',
'v',
'a',
'i',
'l',
'a',
'b',
'i',
'l',
'i',
't',
'y',
' ',
'=',
' ',
'\'',
'3',
'\'',0};
120 static const WCHAR query12[] =
121 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
'B',
'I',
'O',
'S',
122 ' ',
'W',
'H',
'E',
'R',
'E',
' ',
'N',
'A',
'M',
'E',
' ',
'<',
'>',
' ',
'N',
'U',
'L',
'L', 0};
123 static const WCHAR query13[] =
124 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
'B',
'I',
'O',
'S',
125 ' ',
'W',
'H',
'E',
'R',
'E',
' ',
'N',
'U',
'L',
'L',
' ',
'=',
' ',
'N',
'A',
'M',
'E', 0};
126 static const WCHAR query14[] =
127 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
128 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'T',
'o',
'P',
'a',
'r',
't',
'i',
't',
'i',
'o',
'n',0};
129 static const WCHAR query15[] =
130 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
131 'D',
'i',
's',
'k',
'D',
'r',
'i',
'v',
'e',
'T',
'o',
'D',
'i',
's',
'k',
'P',
'a',
'r',
't',
'i',
't',
'i',
'o',
'n',0};
132 static const WCHAR *
test[] = { query1, query2, query3, query4, query5, query6, query7, query8, query9, query10,
133 query11, query12, query13, query14, query15 };
164 ok(
hr ==
S_OK,
"query %u failed: %08x\n",
i,
hr );
175 static const WCHAR query1[] =
176 {
'A',
'S',
'S',
'O',
'C',
'I',
'A',
'T',
'O',
'R',
'S',
' ',
' ',
'O',
'F',
'{',
'W',
'i',
'n',
'3',
'2',
'_',
177 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'.',
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'=',
'"',
'C',
':',
'"',
'}',0};
178 static const WCHAR query2[] =
179 {
'A',
'S',
'S',
'O',
'C',
'I',
'A',
'T',
'O',
'R',
'S',
' ',
'O',
'F',
' ',
'{',
'W',
'i',
'n',
'3',
'2',
'_',
180 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'.',
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'=',
'"',
'C',
':',
'"',
'}',
' ',
181 'W',
'H',
'E',
'R',
'E',
' ',
'A',
's',
's',
'o',
'c',
'C',
'l',
'a',
's',
's',
'=',
'W',
'i',
'n',
'3',
'2',
'_',
182 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'T',
'o',
'P',
'a',
'r',
't',
'i',
't',
'i',
'o',
'n',0};
183 static const WCHAR query3[] =
184 {
'A',
'S',
'S',
'O',
'C',
'I',
'A',
'T',
'O',
'R',
'S',
' ',
' ',
'O',
'F',
' ',
'{',
'W',
'i',
'n',
'3',
'2',
'_',
185 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'.',
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'}',0};
186 static const WCHAR query4[] =
187 {
'A',
'S',
'S',
'O',
'C',
'I',
'A',
'T',
'O',
'R',
'S',
' ',
' ',
'O',
'F',
' ',
'{',
'W',
'i',
'n',
'3',
'2',
'_',
188 'D',
'i',
's',
'k',
'D',
'r',
'i',
'v',
'e',
'.',
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'=',
189 '\'',
'\\',
'\\',
'.',
'\\',
'P',
'H',
'Y',
'S',
'I',
'C',
'A',
'L',
'D',
'R',
'I',
'V',
'E',
'0',
'\'',
'}',0};
190 static const WCHAR query5[] =
191 {
'A',
'S',
'S',
'O',
'C',
'I',
'A',
'T',
'O',
'R',
'S',
' ',
'O',
'F',
' ',
'{',
'W',
'i',
'n',
'3',
'2',
'_',
192 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'.',
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'=',
'"',
'C',
':',
'"',
'}',
' ',
193 'W',
'H',
'E',
'R',
'E',
' ',
'A',
's',
's',
'o',
'c',
'C',
'l',
'a',
's',
's',
'=',
'W',
'i',
'n',
'3',
'2',
'_',
194 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'T',
'o',
'P',
'a',
'r',
't',
'i',
't',
'i',
'o',
'n',
' ',
195 'C',
'l',
'a',
's',
's',
'D',
'e',
'f',
's',
'O',
'n',
'l',
'y',0};
196 static const WCHAR query6[] =
197 {
'A',
'S',
'S',
'O',
'C',
'I',
'A',
'T',
'O',
'R',
'S',
' ',
'O',
'F',
' ',
'{',
'W',
'i',
'n',
'3',
'2',
'_',
198 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'.',
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'=',
'"',
'C',
':',
'"',
'}',
' ',
199 'W',
'H',
'E',
'R',
'E',
' ',
'C',
'l',
'a',
's',
's',
'D',
'e',
'f',
's',
'O',
'n',
'l',
'y',0};
200 static const WCHAR query7[] =
201 {
'A',
'S',
'S',
'O',
'C',
'I',
'A',
'T',
'O',
'R',
'S',
' ',
'O',
'F',
' ',
'{',
'W',
'i',
'n',
'3',
'2',
'_',
202 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'.',
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'=',
'"',
'C',
':',
'"',
'}',
' ',
203 'W',
'H',
'E',
'R',
'E',
' ',
'C',
'l',
'a',
's',
's',
'D',
'e',
'f',
's',
'O',
'n',
'l',
'y',
' ',
204 'A',
's',
's',
'o',
'c',
'C',
'l',
'a',
's',
's',
' ',
'=',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
205 'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'T',
'o',
'P',
'a',
'r',
't',
'i',
't',
'i',
'o',
'n',0};
206 static const WCHAR *
test[] = { query1, query2, query3, query4, query5, query6, query7 };
214 ok(
hr ==
S_OK,
"query %u failed: %08x\n",
i,
hr );
227 ok(
hr ==
S_OK,
"%u: failed to get description %08x\n",
line,
hr );
249#define check_property(a,b,c,d) _check_property(__LINE__,a,b,c,d)
253 static const WCHAR pauseserviceW[] = {
'P',
'a',
'u',
's',
'e',
'S',
'e',
'r',
'v',
'i',
'c',
'e',0};
254 static const WCHAR processidW[] = {
'P',
'r',
'o',
'c',
'e',
's',
's',
'I',
'D',0};
255 static const WCHAR resumeserviceW[] = {
'R',
'e',
's',
'u',
'm',
'e',
'S',
'e',
'r',
'v',
'i',
'c',
'e',0};
256 static const WCHAR returnvalueW[] = {
'R',
'e',
't',
'u',
'r',
'n',
'V',
'a',
'l',
'u',
'e',0};
257 static const WCHAR serviceW[] = {
'W',
'i',
'n',
'3',
'2',
'_',
'S',
'e',
'r',
'v',
'i',
'c',
'e',
'.',
258 'N',
'a',
'm',
'e',
'=',
'"',
'S',
'p',
'o',
'o',
'l',
'e',
'r',
'"',0};
259 static const WCHAR startserviceW[] = {
'S',
't',
'a',
'r',
't',
'S',
'e',
'r',
'v',
'i',
'c',
'e',0};
260 static const WCHAR stateW[] = {
'S',
't',
'a',
't',
'e',0};
261 static const WCHAR stoppedW[] = {
'S',
't',
'o',
'p',
'p',
'e',
'd',0};
262 static const WCHAR stopserviceW[] = {
'S',
't',
'o',
'p',
'S',
'e',
'r',
'v',
'i',
'c',
'e',0};
273 win_skip(
"Win32_Service not available\n" );
281 ok(
hr ==
S_OK,
"failed to get service state %08x\n",
hr );
290 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
294 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval,
NULL,
NULL );
295 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
296 ok( !
V_I4( &retval ),
"unexpected error %u\n",
V_UI4( &retval ) );
297 IWbemClassObject_Release(
out );
302 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
306 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval,
NULL,
NULL );
307 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
308 ok(
V_I4( &retval ),
"unexpected success\n" );
309 IWbemClassObject_Release(
out );
314 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
318 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval,
NULL,
NULL );
319 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
320 ok(
V_I4( &retval ),
"unexpected success\n" );
321 IWbemClassObject_Release(
out );
328 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
332 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval,
NULL,
NULL );
333 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
334 ok( !
V_I4( &retval ),
"unexpected error %u\n",
V_UI4( &retval ) );
335 IWbemClassObject_Release(
out );
338 IWbemClassObject_Release( service );
343 if (service) IWbemClassObject_Release( service );
348 if (service) IWbemClassObject_Release( service );
357 static const WCHAR queryW[] =
358 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
'B',
'i',
'o',
's',0};
359 static const WCHAR descriptionW[] = {
'D',
'e',
's',
'c',
'r',
'i',
'p',
't',
'i',
'o',
'n',0};
360 static const WCHAR identificationcodeW[] = {
'I',
'd',
'e',
'n',
't',
'i',
'f',
'i',
'c',
'a',
't',
'i',
'o',
'n',
'C',
'o',
'd',
'e',0};
361 static const WCHAR manufacturerW[] = {
'M',
'a',
'n',
'u',
'f',
'a',
'c',
't',
'u',
'r',
'e',
'r',0};
362 static const WCHAR nameW[] = {
'N',
'a',
'm',
'e',0};
363 static const WCHAR releasedateW[] = {
'R',
'e',
'l',
'e',
'a',
's',
'e',
'D',
'a',
't',
'e',0};
364 static const WCHAR serialnumberW[] = {
'S',
'e',
'r',
'i',
'a',
'l',
'N',
'u',
'm',
'b',
'e',
'r',0};
365 static const WCHAR smbiosbiosversionW[] = {
'S',
'M',
'B',
'I',
'O',
'S',
'B',
'I',
'O',
'S',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
366 static const WCHAR smbiosmajorversionW[] = {
'S',
'M',
'B',
'I',
'O',
'S',
'M',
'a',
'j',
'o',
'r',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
367 static const WCHAR smbiosminorversionW[] = {
'S',
'M',
'B',
'I',
'O',
'S',
'M',
'i',
'n',
'o',
'r',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
368 static const WCHAR versionW[] = {
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
378 ok(
hr ==
S_OK,
"IWbemServices_ExecQuery failed %08x\n",
hr );
381 ok(
hr ==
S_OK,
"IEnumWbemClassObject_Next failed %08x\n",
hr );
392 ok(
hr ==
S_OK,
"failed to get serial number %08x\n",
hr );
394 "unexpected variant type 0x%x\n",
V_VT( &
val ) );
403 IWbemClassObject_Release(
obj );
404 IEnumWbemClassObject_Release(
result );
411 static const WCHAR queryW[] =
412 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
'B',
'a',
's',
'e',
'b',
'o',
'a',
'r',
'd',0};
413 static const WCHAR manufacturerW[] = {
'M',
'a',
'n',
'u',
'f',
'a',
'c',
't',
'u',
'r',
'e',
'r',0};
414 static const WCHAR modelW[] = {
'M',
'o',
'd',
'e',
'l',0};
415 static const WCHAR nameW[] = {
'N',
'a',
'm',
'e',0};
416 static const WCHAR productW[] = {
'P',
'r',
'o',
'd',
'u',
'c',
't',0};
417 static const WCHAR tagW[] = {
'T',
'a',
'g',0};
418 static const WCHAR versionW[] = {
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
428 ok(
hr ==
S_OK,
"IWbemServices_ExecQuery failed %08x\n",
hr );
433 win_skip(
"Win32_Baseboard not available\n" );
436 ok(
hr ==
S_OK,
"IEnumWbemClassObject_Next failed %08x\n",
hr );
443 ok(
hr ==
S_OK,
"failed to get model %08x\n",
hr );
454 IWbemClassObject_Release(
obj );
455 IEnumWbemClassObject_Release(
result );
462 static const WCHAR returnvalueW[] = {
'R',
'e',
't',
'u',
'r',
'n',
'V',
'a',
'l',
'u',
'e',0};
463 static const WCHAR getownerW[] = {
'G',
'e',
't',
'O',
'w',
'n',
'e',
'r',0};
464 static const WCHAR userW[] = {
'U',
's',
'e',
'r',0};
465 static const WCHAR domainW[] = {
'D',
'o',
'm',
'a',
'i',
'n',0};
466 static const WCHAR processW[] = {
'W',
'i',
'n',
'3',
'2',
'_',
'P',
'r',
'o',
'c',
'e',
's',
's',0};
467 static const WCHAR idW[] = {
'I',
'D',0};
468 static const WCHAR fmtW[] = {
'W',
'i',
'n',
'3',
'2',
'_',
'P',
'r',
'o',
'c',
'e',
's',
's',
'.',
469 'H',
'a',
'n',
'd',
'l',
'e',
'=',
'"',
'%',
'u',
'"',0};
470 static const WCHAR full_path_fmt[] =
471 {
'\\',
'\\',
'%',
's',
'\\',
'R',
'O',
'O',
'T',
'\\',
'C',
'I',
'M',
'V',
'2',
':',0};
480 DWORD full_path_len = 0;
495 memcpy(
class, full_path, full_path_len *
sizeof(
WCHAR) );
501 win_skip(
"Win32_Process not available\n" );
504 sig_in = (
void*)0xdeadbeef;
505 hr = IWbemClassObject_GetMethod(
process, getownerW, 0, &sig_in,
NULL );
506 ok(
hr ==
S_OK,
"failed to get GetOwner method %08x\n",
hr );
507 ok( !sig_in,
"sig_in != NULL\n");
508 IWbemClassObject_Release(
process );
513 memcpy(
class, full_path, full_path_len *
sizeof(
WCHAR) );
516 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
522 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval, &
type,
NULL );
523 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
524 ok(
V_VT( &retval ) ==
VT_I4,
"unexpected variant type 0x%x\n",
V_VT( &retval ) );
525 ok( !
V_I4( &retval ),
"unexpected error %u\n",
V_I4( &retval ) );
531 hr = IWbemClassObject_GetPropertyQualifierSet(
out, userW, &qualifiers );
532 ok(
hr ==
S_OK,
"failed to get qualifier set %08x\n",
hr );
537 hr = IWbemQualifierSet_Get( qualifiers, idW, 0, &
val, &flavor );
539 ok( flavor == expected_flavor,
"got %d\n", flavor );
544 IWbemQualifierSet_Release( qualifiers );
545 hr = IWbemClassObject_GetPropertyQualifierSet(
out, domainW, &qualifiers );
546 ok(
hr ==
S_OK,
"failed to get qualifier set %08x\n",
hr );
551 hr = IWbemQualifierSet_Get( qualifiers, idW, 0, &
val, &flavor );
553 ok( flavor == expected_flavor,
"got %d\n", flavor );
558 IWbemQualifierSet_Release( qualifiers );
559 hr = IWbemClassObject_GetPropertyQualifierSet(
out, returnvalueW, &qualifiers );
560 ok(
hr ==
S_OK,
"failed to get qualifier set %08x\n",
hr );
562 hr = IWbemQualifierSet_Get( qualifiers, idW, 0, &
val, &flavor );
565 IWbemQualifierSet_Release( qualifiers );
566 IWbemClassObject_Release(
out );
572 static const WCHAR memorytypeW[] = {
'M',
'e',
'm',
'o',
'r',
'y',
'T',
'y',
'p',
'e',0};
573 static const WCHAR modelW[] = {
'M',
'o',
'd',
'e',
'l',0};
574 static const WCHAR nameW[] = {
'N',
'a',
'm',
'e',0};
575 static const WCHAR usernameW[] = {
'U',
's',
'e',
'r',
'N',
'a',
'm',
'e',0};
576 static const WCHAR numprocessorsW[] =
577 {
'N',
'u',
'm',
'b',
'e',
'r',
'O',
'f',
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',
's',0};
578 static const WCHAR numlogicalprocessorsW[] =
579 {
'N',
'u',
'm',
'b',
'e',
'r',
'O',
'f',
'L',
'o',
'g',
'i',
'c',
'a',
'l',
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',
's',0};
580 static const WCHAR queryW[] =
581 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
582 'C',
'o',
'm',
'p',
'u',
't',
'e',
'r',
'S',
'y',
's',
't',
'e',
'm',0};
605 skip(
"Failed to get user or computer name\n" );
612 win_skip(
"Win32_ComputerSystem not available\n" );
629 ok(
hr ==
S_OK,
"failed to get computer name %08x\n",
hr );
651 ok(
hr ==
S_OK,
"failed to get computer name %08x\n",
hr );
657 IWbemClassObject_Release(
obj );
658 IEnumWbemClassObject_Release(
result );
666 static const WCHAR queryW[] =
667 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
668 'S',
'y',
's',
't',
'e',
'm',
'E',
'n',
'c',
'l',
'o',
's',
'u',
'r',
'e',0};
669 static const WCHAR captionW[] = {
'C',
'a',
'p',
't',
'i',
'o',
'n',0};
670 static const WCHAR chassistypesW[] = {
'C',
'h',
'a',
's',
's',
'i',
's',
'T',
'y',
'p',
'e',
's',0};
671 static const WCHAR descriptionW[] = {
'D',
'e',
's',
'c',
'r',
'i',
'p',
't',
'i',
'o',
'n',0};
672 static const WCHAR lockpresentW[] = {
'L',
'o',
'c',
'k',
'P',
'r',
'e',
's',
'e',
'n',
't',0};
673 static const WCHAR manufacturerW[] = {
'M',
'a',
'n',
'u',
'f',
'a',
'c',
't',
'u',
'r',
'e',
'r',0};
674 static const WCHAR nameW[] = {
'N',
'a',
'm',
'e',0};
675 static const WCHAR tagW[] = {
'T',
'a',
'g',0};
686 ok(
hr ==
S_OK,
"IWbemServices_ExecQuery failed %08x\n",
hr );
689 ok(
hr ==
S_OK,
"IEnumWbemClassObject_Next failed %08x\n",
hr );
696 ok(
hr ==
S_OK,
"failed to get chassis types %08x\n",
hr );
700 ok(
hr ==
S_OK,
"SafeArrayAccessData failed %x\n",
hr );
703 LONG i, lower, upper;
706 ok(
hr ==
S_OK,
"SafeArrayGetLBound failed %x\n",
hr );
708 ok(
hr ==
S_OK,
"SafeArrayGetUBound failed %x\n",
hr );
711 for (
i = 0;
i < upper - lower + 1;
i++)
715 ok(
hr ==
S_OK,
"SafeArrayUnaccessData failed %x\n",
hr );
725 IWbemClassObject_Release(
obj );
726 IEnumWbemClassObject_Release(
result );
733 static const WCHAR createkeyW[] = {
'C',
'r',
'e',
'a',
't',
'e',
'K',
'e',
'y',0};
734 static const WCHAR enumkeyW[] = {
'E',
'n',
'u',
'm',
'K',
'e',
'y',0};
735 static const WCHAR enumvaluesW[] = {
'E',
'n',
'u',
'm',
'V',
'a',
'l',
'u',
'e',
's',0};
736 static const WCHAR getstringvalueW[] = {
'G',
'e',
't',
'S',
't',
'r',
'i',
'n',
'g',
'V',
'a',
'l',
'u',
'e',0};
737 static const WCHAR stdregprovW[] = {
'S',
't',
'd',
'R',
'e',
'g',
'P',
'r',
'o',
'v',0};
738 static const WCHAR defkeyW[] = {
'h',
'D',
'e',
'f',
'K',
'e',
'y',0};
739 static const WCHAR subkeynameW[] = {
's',
'S',
'u',
'b',
'K',
'e',
'y',
'N',
'a',
'm',
'e',0};
740 static const WCHAR returnvalueW[] = {
'R',
'e',
't',
'u',
'r',
'n',
'V',
'a',
'l',
'u',
'e',0};
741 static const WCHAR namesW[] = {
's',
'N',
'a',
'm',
'e',
's',0};
742 static const WCHAR typesW[] = {
'T',
'y',
'p',
'e',
's',0};
743 static const WCHAR valueW[] = {
's',
'V',
'a',
'l',
'u',
'e',0};
744 static const WCHAR valuenameW[] = {
's',
'V',
'a',
'l',
'u',
'e',
'N',
'a',
'm',
'e',0};
745 static const WCHAR programfilesW[] = {
'P',
'r',
'o',
'g',
'r',
'a',
'm',
'F',
'i',
'l',
'e',
's',
'D',
'i',
'r',0};
746 static const WCHAR windowsW[] =
747 {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
748 'W',
'i',
'n',
'd',
'o',
'w',
's',
'\\',
'C',
'u',
'r',
'r',
'e',
'n',
't',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
749 static const WCHAR regtestW[] =
750 {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'S',
't',
'd',
'R',
'e',
'g',
'P',
'r',
'o',
'v',
'T',
'e',
's',
't',0};
753 VARIANT defkey, subkey, retval, valuename;
761 win_skip(
"StdRegProv not available\n" );
765 hr = IWbemClassObject_BeginMethodEnumeration(
reg, 0 );
768 while (IWbemClassObject_NextMethod(
reg, 0, &
name, &sig_in, &sig_out ) ==
S_OK)
771 IWbemClassObject_Release( sig_in );
772 IWbemClassObject_Release( sig_out );
775 hr = IWbemClassObject_EndMethodEnumeration(
reg );
778 hr = IWbemClassObject_BeginEnumeration(
reg, 0 );
784 hr = IWbemClassObject_EndEnumeration(
reg );
787 hr = IWbemClassObject_GetMethod(
reg, createkeyW, 0, &sig_in,
NULL );
788 ok(
hr ==
S_OK,
"failed to get CreateKey method %08x\n",
hr );
790 hr = IWbemClassObject_SpawnInstance( sig_in, 0, &
in );
791 ok(
hr ==
S_OK,
"failed to spawn instance %08x\n",
hr );
794 V_I4( &defkey ) = 0x80000001;
795 hr = IWbemClassObject_Put(
in, defkeyW, 0, &defkey, 0 );
796 ok(
hr ==
S_OK,
"failed to set root %08x\n",
hr );
800 hr = IWbemClassObject_Put(
in, subkeynameW, 0, &subkey, 0 );
801 ok(
hr ==
S_OK,
"failed to set subkey %08x\n",
hr );
806 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
811 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval, &
type,
NULL );
812 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
813 ok(
V_VT( &retval ) ==
VT_I4,
"unexpected variant type 0x%x\n",
V_VT( &retval ) );
814 ok( !
V_I4( &retval ),
"unexpected error %u\n",
V_UI4( &retval ) );
821 IWbemClassObject_Release(
in );
822 IWbemClassObject_Release(
out );
823 IWbemClassObject_Release( sig_in );
825 hr = IWbemClassObject_GetMethod(
reg, enumkeyW, 0, &sig_in,
NULL );
826 ok(
hr ==
S_OK,
"failed to get EnumKey method %08x\n",
hr );
828 hr = IWbemClassObject_SpawnInstance( sig_in, 0, &
in );
829 ok(
hr ==
S_OK,
"failed to spawn instance %08x\n",
hr );
832 V_I4( &defkey ) = 0x80000002;
833 hr = IWbemClassObject_Put(
in, defkeyW, 0, &defkey, 0 );
834 ok(
hr ==
S_OK,
"failed to set root %08x\n",
hr );
838 hr = IWbemClassObject_Put(
in, subkeynameW, 0, &subkey, 0 );
839 ok(
hr ==
S_OK,
"failed to set subkey %08x\n",
hr );
844 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
849 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval, &
type,
NULL );
850 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
851 ok(
V_VT( &retval ) ==
VT_I4,
"unexpected variant type 0x%x\n",
V_VT( &retval ) );
852 ok( !
V_I4( &retval ),
"unexpected error %u\n",
V_UI4( &retval ) );
858 IWbemClassObject_Release(
in );
859 IWbemClassObject_Release(
out );
860 IWbemClassObject_Release( sig_in );
862 hr = IWbemClassObject_GetMethod(
reg, enumvaluesW, 0, &sig_in,
NULL );
863 ok(
hr ==
S_OK,
"failed to get EnumValues method %08x\n",
hr );
865 hr = IWbemClassObject_SpawnInstance( sig_in, 0, &
in );
866 ok(
hr ==
S_OK,
"failed to spawn instance %08x\n",
hr );
869 V_I4( &defkey ) = 0x80000002;
870 hr = IWbemClassObject_Put(
in, defkeyW, 0, &defkey, 0 );
871 ok(
hr ==
S_OK,
"failed to set root %08x\n",
hr );
875 hr = IWbemClassObject_Put(
in, subkeynameW, 0, &subkey, 0 );
876 ok(
hr ==
S_OK,
"failed to set subkey %08x\n",
hr );
881 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
886 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval, &
type,
NULL );
887 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
888 ok(
V_VT( &retval ) ==
VT_I4,
"unexpected variant type 0x%x\n",
V_VT( &retval ) );
889 ok( !
V_I4( &retval ),
"unexpected error %u\n",
V_I4( &retval ) );
896 IWbemClassObject_Release(
in );
897 IWbemClassObject_Release(
out );
898 IWbemClassObject_Release( sig_in );
900 hr = IWbemClassObject_GetMethod(
reg, getstringvalueW, 0, &sig_in,
NULL );
901 ok(
hr ==
S_OK,
"failed to get GetStringValue method %08x\n",
hr );
903 hr = IWbemClassObject_SpawnInstance( sig_in, 0, &
in );
904 ok(
hr ==
S_OK,
"failed to spawn instance %08x\n",
hr );
907 V_I4( &defkey ) = 0x80000002;
908 hr = IWbemClassObject_Put(
in, defkeyW, 0, &defkey, 0 );
909 ok(
hr ==
S_OK,
"failed to set root %08x\n",
hr );
913 hr = IWbemClassObject_Put(
in, subkeynameW, 0, &subkey, 0 );
914 ok(
hr ==
S_OK,
"failed to set subkey %08x\n",
hr );
918 hr = IWbemClassObject_Put(
in, valuenameW, 0, &valuename, 0 );
919 ok(
hr ==
S_OK,
"failed to set value name %08x\n",
hr );
924 ok(
hr ==
S_OK,
"failed to execute method %08x\n",
hr );
929 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval, &
type,
NULL );
930 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
931 ok(
V_VT( &retval ) ==
VT_I4,
"unexpected variant type 0x%x\n",
V_VT( &retval ) );
932 ok( !
V_I4( &retval ),
"unexpected error %u\n",
V_I4( &retval ) );
939 IWbemClassObject_Release(
in );
940 IWbemClassObject_Release(
out );
941 IWbemClassObject_Release( sig_in );
943 IWbemClassObject_Release(
reg );
954 IWbemObjectSink_AddRef( iface );
1001 static const WCHAR queryW[] =
1002 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1003 'D',
'e',
'v',
'i',
'c',
'e',
'C',
'h',
'a',
'n',
'g',
'e',
'E',
'v',
'e',
'n',
't',0};
1005 ULONG prev_sink_refs;
1025 static const WCHAR queryW[] =
1026 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1027 'P',
'r',
'o',
'c',
'e',
's',
's',0};
1049 static const WCHAR queryW[] =
1050 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
'D',
'u',
'm',
'm',
'y',0};
1062 obj = (
void *)0xdeadbeef;
1067 ok(
obj == (
void *)0xdeadbeef,
"Got object %p\n",
obj );
1069 IEnumWbemClassObject_Release(
result );
1077 static const WCHAR queryW[] =
1078 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1079 'O',
'p',
'e',
'r',
'a',
't',
'i',
'n',
'g',
'S',
'y',
's',
't',
'e',
'm',0};
1102 IWbemClassObject_Release(
obj );
1104 IEnumWbemClassObject_Release(
result );
1111 static const WCHAR systemsecurityW[] = {
'_',
'_',
'S',
'y',
's',
't',
'e',
'm',
'S',
'e',
'c',
'u',
'r',
'i',
't',
'y',0};
1112 static const WCHAR getsdW[] = {
'G',
'e',
't',
'S',
'D',0};
1113 static const WCHAR returnvalueW[] = {
'R',
'e',
't',
'u',
'r',
'n',
'V',
'a',
'l',
'u',
'e',0};
1114 static const WCHAR sdW[] = {
'S',
'D',0};
1123 SID *sid_admin = (
SID*)sid_admin_buffer;
1130 win_skip(
"__SystemSecurity not available\n" );
1133 IWbemClassObject_Release(
reg );
1135 sid_size =
sizeof(sid_admin_buffer);
1137 ok(
ret,
"CreateWellKnownSid failed\n" );
1149 hr = IWbemClassObject_Get(
out, returnvalueW, 0, &retval, &
type,
NULL );
1150 ok(
hr ==
S_OK,
"failed to get return value %08x\n",
hr );
1151 ok(
V_VT( &retval ) ==
VT_I4,
"unexpected variant type 0x%x\n",
V_VT( &retval ) );
1152 ok( !
V_I4( &retval ),
"unexpected error %u\n",
V_UI4( &retval ) );
1157 hr = IWbemClassObject_Get(
out, sdW, 0, &var_sd, &
type,
NULL );
1158 ok(
hr ==
S_OK,
"failed to get names %08x\n",
hr );
1163 ok(
hr ==
S_OK,
"SafeArrayAccessData failed %x\n",
hr );
1169 ok(
sd->Owner != 0,
"no owner SID\n");
1170 ok(
sd->Group != 0,
"no owner SID\n");
1175 ok(
hr ==
S_OK,
"SafeArrayUnaccessData failed %x\n",
hr );
1179 IWbemClassObject_Release(
out );
1182 win_skip(
"insufficient privs to test __SystemSecurity\n" );
1189 static const WCHAR queryW[] =
1190 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1191 'O',
'p',
'e',
'r',
'a',
't',
'i',
'n',
'g',
'S',
'y',
's',
't',
'e',
'm',0};
1192 static const WCHAR buildnumberW[] = {
'B',
'u',
'i',
'l',
'd',
'N',
'u',
'm',
'b',
'e',
'r',0};
1193 static const WCHAR captionW[] = {
'C',
'a',
'p',
't',
'i',
'o',
'n',0};
1194 static const WCHAR csdversionW[] = {
'C',
'S',
'D',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
1195 static const WCHAR csnameW[] = {
'C',
'S',
'N',
'a',
'm',
'e',0};
1196 static const WCHAR currenttimezoneW[] = {
'C',
'u',
'r',
'r',
'e',
'n',
't',
'T',
'i',
'm',
'e',
'Z',
'o',
'n',
'e',0};
1197 static const WCHAR freephysicalmemoryW[] = {
'F',
'r',
'e',
'e',
'P',
'h',
'y',
's',
'i',
'c',
'a',
'l',
'M',
'e',
'm',
'o',
'r',
'y',0};
1198 static const WCHAR manufacturerW[] = {
'M',
'a',
'n',
'u',
'f',
'a',
'c',
't',
'u',
'r',
'e',
'r',0};
1199 static const WCHAR nameW[] = {
'N',
'a',
'm',
'e',0};
1200 static const WCHAR operatingsystemskuW[] = {
'O',
'p',
'e',
'r',
'a',
't',
'i',
'n',
'g',
'S',
'y',
's',
't',
'e',
'm',
'S',
'K',
'U',0};
1201 static const WCHAR osproductsuiteW[] = {
'O',
'S',
'P',
'r',
'o',
'd',
'u',
'c',
't',
'S',
'u',
'i',
't',
'e',0};
1202 static const WCHAR ostypeW[] = {
'O',
'S',
'T',
'y',
'p',
'e',0};
1203 static const WCHAR suitemaskW[] = {
'S',
'u',
'i',
't',
'e',
'M',
'a',
's',
'k',0};
1204 static const WCHAR versionW[] = {
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
1205 static const WCHAR servicepackmajorW[] =
1206 {
'S',
'e',
'r',
'v',
'i',
'c',
'e',
'P',
'a',
'c',
'k',
'M',
'a',
'j',
'o',
'r',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
1207 static const WCHAR servicepackminorW[] =
1208 {
'S',
'e',
'r',
'v',
'i',
'c',
'e',
'P',
'a',
'c',
'k',
'M',
'i',
'n',
'o',
'r',
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
1210 {
'S',
'y',
's',
't',
'e',
'm',
'D',
'r',
'i',
'v',
'e',0};
1211 static const WCHAR totalvisiblememorysizeW[] =
1212 {
'T',
'o',
't',
'a',
'l',
'V',
'i',
's',
'i',
'b',
'l',
'e',
'M',
'e',
'm',
'o',
'r',
'y',
'S',
'i',
'z',
'e',0};
1213 static const WCHAR totalvirtualmemorysizeW[] =
1214 {
'T',
'o',
't',
'a',
'l',
'V',
'i',
'r',
't',
'u',
'a',
'l',
'M',
'e',
'm',
'o',
'r',
'y',
'S',
'i',
'z',
'e',0};
1224 ok(
hr ==
S_OK,
"IWbemServices_ExecQuery failed %08x\n",
hr );
1227 ok(
hr ==
S_OK,
"IEnumWbemClassObject_Next failed %08x\n",
hr );
1229 hr = IWbemClassObject_BeginEnumeration(
obj, 0 );
1234 hr = IWbemClassObject_EndEnumeration(
obj );
1243 ok(
hr ==
S_OK,
"failed to get csdversion %08x\n",
hr );
1254 hr = IWbemClassObject_Get(
obj, operatingsystemskuW, 0, &
val, &
type,
NULL );
1267 ok(
hr ==
S_OK,
"failed to get osproductsuite %08x\n",
hr );
1285 IWbemClassObject_Release(
obj );
1286 IEnumWbemClassObject_Release(
result );
1293 static const WCHAR identifyingnumberW[] =
1294 {
'I',
'd',
'e',
'n',
't',
'i',
'f',
'y',
'i',
'n',
'g',
'N',
'u',
'm',
'b',
'e',
'r',0};
1296 {
'N',
'a',
'm',
'e',0};
1297 static const WCHAR skunumberW[] =
1298 {
'S',
'K',
'U',
'N',
'u',
'm',
'b',
'e',
'r',0};
1299 static const WCHAR uuidW[] =
1300 {
'U',
'U',
'I',
'D',0};
1301 static const WCHAR vendorW[] =
1302 {
'V',
'e',
'n',
'd',
'o',
'r',0};
1304 {
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
1305 static const WCHAR queryW[] =
1306 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1307 'C',
'o',
'm',
'p',
'u',
't',
'e',
'r',
'S',
'y',
's',
't',
'e',
'm',
'P',
'r',
'o',
'd',
'u',
'c',
't',0};
1317 win_skip(
"Win32_ComputerSystemProduct not available\n" );
1331 IWbemClassObject_Release(
obj );
1332 IEnumWbemClassObject_Release(
result );
1339 static const WCHAR capacityW[] = {
'C',
'a',
'p',
'a',
'c',
'i',
't',
'y',0};
1340 static const WCHAR memorytypeW[] = {
'M',
'e',
'm',
'o',
'r',
'y',
'T',
'y',
'p',
'e',0};
1341 static const WCHAR devicelocatorW[] = {
'D',
'e',
'v',
'i',
'c',
'e',
'L',
'o',
'c',
'a',
't',
'o',
'r',0};
1342 static const WCHAR queryW[] =
1343 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1344 'P',
'h',
'y',
's',
'i',
'c',
'a',
'l',
'M',
'e',
'm',
'o',
'r',
'y',0};
1354 win_skip(
"Win32_PhysicalMemory not available\n" );
1366 IWbemClassObject_Release(
obj );
1368 IEnumWbemClassObject_Release(
result );
1375 static const WCHAR destinationW[] = {
'D',
'e',
's',
't',
'i',
'n',
'a',
't',
'i',
'o',
'n',0};
1376 static const WCHAR interfaceindexW[] = {
'I',
'n',
't',
'e',
'r',
'f',
'a',
'c',
'e',
'I',
'n',
'd',
'e',
'x',0};
1377 static const WCHAR nexthopW[] = {
'N',
'e',
'x',
't',
'H',
'o',
'p',0};
1378 static const WCHAR queryW[] =
1379 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1380 'I',
'P',
'4',
'R',
'o',
'u',
't',
'e',
'T',
'a',
'b',
'l',
'e',0};
1390 win_skip(
"Win32_IP4RouteTable not available\n" );
1402 IWbemClassObject_Release(
obj );
1405 IEnumWbemClassObject_Release(
result );
1412 static const WCHAR architectureW[] =
1413 {
'A',
'r',
'c',
'h',
'i',
't',
'e',
'c',
't',
'u',
'r',
'e',0};
1414 static const WCHAR captionW[] =
1415 {
'C',
'a',
'p',
't',
'i',
'o',
'n',0};
1416 static const WCHAR cpustatusW[] =
1417 {
'C',
'p',
'u',
'S',
't',
'a',
't',
'u',
's',0};
1418 static const WCHAR familyW[] =
1419 {
'F',
'a',
'm',
'i',
'l',
'y',0};
1420 static const WCHAR levelW[] =
1421 {
'L',
'e',
'v',
'e',
'l',0};
1422 static const WCHAR manufacturerW[] =
1423 {
'M',
'a',
'n',
'u',
'f',
'a',
'c',
't',
'u',
'r',
'e',
'r',0};
1425 {
'N',
'a',
'm',
'e',0};
1426 static const WCHAR numcoresW[] =
1427 {
'N',
'u',
'm',
'b',
'e',
'r',
'O',
'f',
'C',
'o',
'r',
'e',
's',0};
1428 static const WCHAR numlogicalprocessorsW[] =
1429 {
'N',
'u',
'm',
'b',
'e',
'r',
'O',
'f',
'L',
'o',
'g',
'i',
'c',
'a',
'l',
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',
's',0};
1430 static const WCHAR processoridW[] =
1431 {
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',
'I',
'd',0};
1432 static const WCHAR revisionW[] =
1433 {
'R',
'e',
'v',
'i',
's',
'i',
'o',
'n',0};
1435 {
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
1436 static const WCHAR queryW[] =
1437 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1438 'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',0};
1468 hr = IWbemClassObject_Get(
obj, numlogicalprocessorsW, 0, &
val, &
type,
NULL );
1488 IWbemClassObject_Release(
obj );
1491 IEnumWbemClassObject_Release(
result );
1498 static const WCHAR availabilityW[] =
1499 {
'A',
'v',
'a',
'i',
'l',
'a',
'b',
'i',
'l',
'i',
't',
'y',0};
1500 static const WCHAR configmanagererrorcodeW[] =
1501 {
'C',
'o',
'n',
'f',
'i',
'g',
'M',
'a',
'n',
'a',
'g',
'e',
'r',
'E',
'r',
'r',
'o',
'r',
'C',
'o',
'd',
'e',0};
1502 static const WCHAR driverdateW[] =
1503 {
'D',
'r',
'i',
'v',
'e',
'r',
'D',
'a',
't',
'e',0};
1504 static const WCHAR installeddisplaydriversW[]=
1505 {
'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'd',
'D',
'i',
's',
'p',
'l',
'a',
'y',
'D',
'r',
'i',
'v',
'e',
'r',
's',0};
1506 static const WCHAR statusW[] =
1507 {
'S',
't',
'a',
't',
'u',
's',0};
1508 static const WCHAR queryW[] =
1509 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1510 'V',
'i',
'd',
'e',
'o',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'l',
'e',
'r',0};
1522 win_skip(
"Win32_VideoController not available\n" );
1537 hr = IWbemClassObject_Get(
obj, installeddisplaydriversW, 0, &
val, &
type,
NULL );
1545 IWbemClassObject_Release(
obj );
1548 IEnumWbemClassObject_Release(
result );
1555 static const WCHAR attributesW[] =
1556 {
'A',
't',
't',
'r',
'i',
'b',
'u',
't',
'e',
's',0};
1557 static const WCHAR deviceidW[] =
1558 {
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'd',0};
1559 static const WCHAR horizontalresolutionW[] =
1560 {
'H',
'o',
'r',
'i',
'z',
'o',
'n',
't',
'a',
'l',
'R',
'e',
's',
'o',
'l',
'u',
't',
'i',
'o',
'n',0};
1561 static const WCHAR locationW[] =
1562 {
'L',
'o',
'c',
'a',
't',
'i',
'o',
'n',0};
1563 static const WCHAR portnameW[] =
1564 {
'P',
'o',
'r',
't',
'N',
'a',
'm',
'e',0};
1565 static const WCHAR queryW[] =
1566 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1567 'P',
'r',
'i',
'n',
't',
'e',
'r',0};
1579 win_skip(
"Win32_Printer not available\n" );
1602 IWbemClassObject_Release(
obj );
1605 IEnumWbemClassObject_Release(
result );
1620 static WCHAR win32_pnpentityW[] = {
'W',
'i',
'n',
'3',
'2',
'_',
'P',
'n',
'P',
'E',
'n',
't',
'i',
't',
'y',0};
1621 static const WCHAR deviceidW[] = {
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'd',0};
1625 hr = IWbemServices_CreateInstanceEnum(
services, bstr, 0,
NULL, &enm );
1633 hr = IEnumWbemClassObject_Next( enm, 1000, 1, &
obj, &
count );
1636 "got %08x with %u objects returned\n",
hr,
count );
1653 IWbemClassObject_Release(
obj );
1658 IEnumWbemClassObject_Release( enm );
1663 static const WCHAR cpuscoreW[] =
1664 {
'C',
'P',
'U',
'S',
'c',
'o',
'r',
'e',0};
1665 static const WCHAR d3dscoreW[] =
1666 {
'D',
'3',
'D',
'S',
'c',
'o',
'r',
'e',0};
1667 static const WCHAR diskscoreW[] =
1668 {
'D',
'i',
's',
'k',
'S',
'c',
'o',
'r',
'e',0};
1669 static const WCHAR graphicsscoreW[] =
1670 {
'G',
'r',
'a',
'p',
'h',
'i',
'c',
's',
'S',
'c',
'o',
'r',
'e',0};
1671 static const WCHAR memoryscoreW[] =
1672 {
'M',
'e',
'm',
'o',
'r',
'y',
'S',
'c',
'o',
'r',
'e',0};
1673 static const WCHAR winsatassessmentstateW[] =
1674 {
'W',
'i',
'n',
'S',
'A',
'T',
'A',
's',
's',
'e',
's',
's',
'm',
'e',
'n',
't',
'S',
't',
'a',
't',
'e',0};
1675 static const WCHAR winsprlevelW[] =
1676 {
'W',
'i',
'n',
'S',
'P',
'R',
'L',
'e',
'v',
'e',
'l',0};
1677 static const WCHAR queryW[] =
1678 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
'W',
'i',
'n',
'S',
'A',
'T',0};
1705 IWbemClassObject_Release(
obj );
1708 IEnumWbemClassObject_Release(
result );
1715 static const WCHAR bitsperpixelW[] =
1716 {
'B',
'i',
't',
's',
'P',
'e',
'r',
'P',
'i',
'x',
'e',
'l',0};
1717 static const WCHAR captionW[] =
1718 {
'C',
'a',
'p',
't',
'i',
'o',
'n',0};
1719 static const WCHAR horizontalresolutionW[] =
1720 {
'H',
'o',
'r',
'i',
'z',
'o',
'n',
't',
'a',
'l',
'R',
'e',
's',
'o',
'l',
'u',
't',
'i',
'o',
'n',0};
1722 {
'N',
'a',
'm',
'e',0};
1723 static const WCHAR queryW[] =
1724 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1725 'D',
'i',
's',
'p',
'l',
'a',
'y',
'C',
'o',
'n',
't',
'r',
'o',
'l',
'l',
'e',
'r',
1726 'C',
'o',
'n',
'f',
'i',
'g',
'u',
'r',
'a',
't',
'i',
'o',
'n',0};
1727 static const WCHAR verticalresolutionW[] =
1728 {
'V',
'e',
'r',
't',
'i',
'c',
'a',
'l',
'R',
'e',
's',
'o',
'l',
'u',
't',
'i',
'o',
'n',0};
1748 IWbemClassObject_Release(
obj );
1751 IEnumWbemClassObject_Release(
result );
1758 static const WCHAR captionW[] =
1759 {
'C',
'a',
'p',
't',
'i',
'o',
'n',0};
1760 static const WCHAR hotfixidW[] =
1761 {
'H',
'o',
't',
'F',
'i',
'x',
'I',
'D',0};
1762 static const WCHAR queryW[] =
1763 {
'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'W',
'i',
'n',
'3',
'2',
'_',
1764 'Q',
'u',
'i',
'c',
'k',
'F',
'i',
'x',
'E',
'n',
'g',
'i',
'n',
'e',
'e',
'r',
'i',
'n',
'g',0};
1783 hr = IWbemClassObject_Get(
obj, captionW, 0, &caption, &
type,
NULL );
1784 ok(
hr ==
S_OK,
"failed to get caption %08x\n",
hr );
1786 "unexpected variant type 0x%x\n",
V_VT( &caption ) );
1790 IWbemClassObject_Release(
obj );
1791 if (
total++ >= 10)
break;
1794 IEnumWbemClassObject_Release(
result );
1801 static const WCHAR cimv2W[] = {
'R',
'O',
'O',
'T',
'\\',
'C',
'I',
'M',
'V',
'2',0};
1814 win_skip(
"can't create instance of WbemLocator\n");
1818 ok(
hr ==
S_OK,
"failed to get IWbemServices interface %08x\n",
hr );
1822 ok(
hr ==
S_OK,
"failed to set proxy blanket %08x\n",
hr );
1855 IWbemLocator_Release(
locator );
static const WCHAR processW[]
static const WCHAR nameW[]
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
static const WCHAR backslashW[]
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
BOOL WINAPI GetUserNameW(LPWSTR lpszName, LPDWORD lpSize)
BOOL WINAPI EqualSid(PSID pSid1, PSID pSid2)
BOOL WINAPI CreateWellKnownSid(IN WELL_KNOWN_SID_TYPE WellKnownSidType, IN PSID DomainSid OPTIONAL, OUT PSID pSid, IN OUT DWORD *cbSid)
static const WCHAR empty[]
static const WCHAR descriptionW[]
static const WCHAR valueW[]
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoSetProxyBlanket(IUnknown *pProxy, DWORD AuthnSvc, DWORD AuthzSvc, OLECHAR *pServerPrincName, DWORD AuthnLevel, DWORD ImpLevel, void *pAuthInfo, DWORD Capabilities)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE *asAuthSvc, void *pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void *pReserved2, DWORD dwCapabilities, void *pReserved3)
HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY *psa, UINT nDim, LONG *plUbound)
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY *psa, UINT nDim, LONG *plLbound)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
static const WCHAR systemdriveW[]
static const WCHAR programfilesW[]
static const WCHAR versionW[]
HRESULT exec_query(const WCHAR *str, IEnumWbemClassObject **result)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum GLboolean sink
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const WCHAR emptyW[]
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
static const CLSID * objects[]
static void test_select(void)
static const struct StrToNameW namesW[]
static void test_associators(IWbemServices *services)
static void test_Win32_PhysicalMemory(IWbemServices *services)
static void test_notification_query_async(IWbemServices *services)
static void test_Win32_Processor(IWbemServices *services)
static void test_query_semisync(IWbemServices *services)
static void test_Win32_Service(IWbemServices *services)
static void test_GetNames(IWbemServices *services)
static void test_Win32_IP4RouteTable(IWbemServices *services)
static void test_Win32_ComputerSystemProduct(IWbemServices *services)
static void test_Win32_Process(IWbemServices *services, BOOL use_full_path)
static HRESULT WINAPI sink_QueryInterface(IWbemObjectSink *iface, REFIID riid, void **ppv)
static void test_Win32_QuickFixEngineering(IWbemServices *services)
static void test_StdRegProv(IWbemServices *services)
static void test_Win32_PnPEntity(IWbemServices *services)
static void test_Win32_ComputerSystem(IWbemServices *services)
static void test_Win32_Bios(IWbemServices *services)
static void test_Win32_WinSAT(IWbemServices *services)
static HRESULT WINAPI sink_Indicate(IWbemObjectSink *iface, LONG count, IWbemClassObject **objects)
static void _check_property(ULONG line, IWbemClassObject *obj, const WCHAR *prop, VARTYPE vartype, CIMTYPE cimtype)
static HRESULT WINAPI sink_SetStatus(IWbemObjectSink *iface, LONG flags, HRESULT hresult, BSTR str_param, IWbemClassObject *obj_param)
static ULONG WINAPI sink_Release(IWbemObjectSink *iface)
static void test_query_async(IWbemServices *services)
static const WCHAR wqlW[]
static void test_Win32_Printer(IWbemServices *services)
static void test_Win32_Baseboard(IWbemServices *services)
static void test_Win32_VideoController(IWbemServices *services)
#define check_property(a, b, c, d)
static IWbemObjectSinkVtbl sink_vtbl
static ULONG WINAPI sink_AddRef(IWbemObjectSink *iface)
static void test_Win32_DisplayControllerConfiguration(IWbemServices *services)
static void test_SystemSecurity(IWbemServices *services)
static void test_Win32_SystemEnclosure(IWbemServices *services)
static void test_Win32_OperatingSystem(IWbemServices *services)
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define IsEqualGUID(rguid1, rguid2)
#define RPC_C_AUTHN_LEVEL_DEFAULT
#define RPC_C_AUTHN_LEVEL_CALL
#define RPC_C_IMP_LEVEL_IMPERSONATE
#define RPC_C_AUTHN_WINNT
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
static rfbScreenInfoPtr server
@ WBEM_FLAG_RETURN_IMMEDIATELY
@ WBEM_FLAG_NONSYSTEM_ONLY
@ WBEM_FLAVOR_NOT_OVERRIDABLE
@ WBEM_FLAVOR_ORIGIN_PROPAGATED
@ WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE
@ WBEM_E_INVALID_PARAMETER
@ WBEM_E_INVALID_QUERY_TYPE
DWORD WINAPI GetCurrentProcessId(void)
#define MAX_COMPUTERNAME_LENGTH
#define HKEY_CURRENT_USER
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define SECURITY_MAX_SID_SIZE