29DEFINE_GUID(CLSID_WINMGMTS,0x172bddf8,0xceea,0x11d1,0x8b,0x05,0x00,0x60,0x08,0x06,0xd9,0xb6);
30DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
36 static const WCHAR biosW[] = {
'W',
'i',
'n',
'3',
'2',
'_',
'B',
'i',
'o',
's',0};
37 static const WCHAR manufacturerW[] = {
'M',
'a',
'n',
'u',
'f',
'a',
'c',
't',
'u',
'r',
'e',
'r',0};
38 static const WCHAR versionW[] = {
'v',
'e',
'r',
's',
'i',
'o',
'n',0};
39 static const WCHAR nosuchW[] = {
'N',
'o',
'S',
'u',
'c',
'h',0};
41 {
'w',
'i',
'n',
'm',
'g',
'm',
't',
's',
':',0};
43 {
'w',
'i',
'n',
'm',
'g',
'm',
't',
's',
':',
'\\',
'\\',
'.',
'\\',
'r',
'o',
'o',
't',
'\\',
'c',
'i',
'm',
'v',
'2',0};
45 {
'w',
'i',
'n',
'm',
'g',
'm',
't',
's',
':',
'\\',
'\\',
'.',
'\\',
'r',
'o',
'o',
't',
'\\',
'c',
'i',
'm',
'v',
'2',
':',
46 'W',
'i',
'n',
'3',
'2',
'_',
'L',
'o',
'g',
'i',
'c',
'a',
'l',
'D',
'i',
's',
'k',
'.',
47 'D',
'e',
'v',
'i',
'c',
'e',
'I',
'D',
'=',
'\'',
'C',
':',
'\'',0};
49 {
'w',
'i',
'n',
'm',
'g',
'm',
't',
's',
':',
'\\',
'\\',
'.',
'\\',
'r',
'o',
'o',
't',
'\\',
'c',
'i',
'm',
'v',
'2',
':',
50 'W',
'i',
'n',
'3',
'2',
'_',
'S',
'e',
'r',
'v',
'i',
'c',
'e',0};
51 static const WCHAR stdregprovW[] =
52 {
'w',
'i',
'n',
'm',
'g',
'm',
't',
's',
':',
'\\',
'\\',
'.',
'\\',
'r',
'o',
'o',
't',
'\\',
'd',
'e',
'f',
'a',
'u',
'l',
't',
':',
53 'S',
't',
'd',
'R',
'e',
'g',
'P',
'r',
'o',
'v',0};
54 static const WCHAR getstringvalueW[] =
55 {
'G',
'e',
't',
'S',
't',
'r',
'i',
'n',
'g',
'V',
'a',
'l',
'u',
'e',0};
80 win_skip(
"can't create instance of WINMGMTS\n" );
92 hr = IParseDisplayName_ParseDisplayName( displayname,
NULL,
str, &eaten, &
moniker );
95 ok( eaten ==
tests[
i].eaten,
"%u: got %u\n",
i, eaten );
101 if (
obj) IUnknown_Release(
obj );
109 hr = IParseDisplayName_ParseDisplayName( displayname,
NULL,
str, &eaten, &
moniker );
135 hr = IUnknown_QueryInterface(
obj, &IID_IEnumVARIANT, (
void **)&
enumvar );
147 fetched = 0xdeadbeef;
150 ok( !fetched,
"got %u\n", fetched );
152 fetched = 0xdeadbeef;
157 ok( fetched == 1,
"got %u\n", fetched );
172 ok( dispid == 0x1800001 || dispid == 0x10b ,
"got %x\n", dispid );
179 ok( dispid == 0x1800002 || dispid == 0x119 ,
"got %x\n", dispid );
186 ok( dispid == DISPID_UNKNOWN,
"got %x\n", dispid );
193 ok( dispid == 0x1800001 || dispid == 0x10b ,
"got %x\n", dispid );
195 if (dispid == 0x1800001)
202 arg_err = 0xdeadbeef;
210 ok(
params.cNamedArgs == 0xdeadbeef,
"got %u\n",
params.cNamedArgs );
213 ok( arg_err == 0xdeadbeef,
"got %u\n", arg_err );
233 fetched = 0xdeadbeef;
236 ok( !fetched,
"got %u\n", fetched );
238 IEnumVARIANT_Release(
enumvar );
240 IUnknown_Release(
obj );
249 IBindCtx_Release(
ctx );
255 hr = IParseDisplayName_ParseDisplayName( displayname,
NULL,
str, &eaten, &
moniker );
261 ISWbemObject *sobj =
NULL;
262 hr = IMoniker_BindToObject(
moniker,
ctx,
NULL, &IID_ISWbemObject, (
void **)&sobj );
266 DISPID dispid = 0xdeadbeef;
271 ok( dispid == 0x1000001,
"got %x\n", dispid );
273 ISWbemObject_Release( sobj );
279 IBindCtx_Release(
ctx);
280 IParseDisplayName_Release( displayname );
284static const WCHAR root[] = {
'r',
'o',
'o',
't',
'\\',
'C',
'I',
'M',
'V',
'2',0};
285static const WCHAR query[] = {
'S',
'e',
'l',
'e',
'c',
't',
' ',
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',
'I',
'd',
' ',
'f',
'r',
'o',
'm',
286 ' ',
'W',
'i',
'n',
'3',
'2',
'_',
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',0};
288static const WCHAR props[] = {
'P',
'r',
'o',
'p',
'e',
'r',
't',
'i',
'e',
's',
'_',0};
289static const WCHAR procid[] = {
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',
'I',
'd',0};
295 BSTR host_bstr, root_bstr, query_bstr, lang_bstr, props_bstr, procid_bstr;
298 ISWbemObjectSet *object_set;
301 ISWbemPropertySet *prop_set;
302 ISWbemProperty *prop;
306 WbemImpersonationLevelEnum imp_level;
307 WbemAuthenticationLevelEnum auth_level;
321 hr = ISWbemServices_ExecQuery(
services, query_bstr, lang_bstr, wbemFlagForwardOnly,
NULL, &object_set);
328 imp_level = 0xdeadbeef;
329 hr = ISWbemSecurity_get_ImpersonationLevel(
security, &imp_level );
331 ok( imp_level == wbemImpersonationLevelImpersonate,
"got %u\n", imp_level );
332 hr = ISWbemSecurity_put_ImpersonationLevel(
security, wbemImpersonationLevelAnonymous );
334 imp_level = 0xdeadbeef;
335 hr = ISWbemSecurity_get_ImpersonationLevel(
security, &imp_level );
337 ok( imp_level == wbemImpersonationLevelAnonymous,
"got %u\n", imp_level );
339 auth_level = 0xdeadbeef;
340 hr = ISWbemSecurity_get_AuthenticationLevel(
security, &auth_level );
343 ok( auth_level == 0xdeadbeef,
"got %u\n", auth_level );
345 hr = ISWbemSecurity_put_AuthenticationLevel(
security, wbemAuthenticationLevelNone );
347 auth_level = 0xdeadbeef;
348 hr = ISWbemSecurity_get_AuthenticationLevel(
security, &auth_level );
350 ok( auth_level == wbemAuthenticationLevelNone,
"got %u\n", auth_level );
354 hr = ISWbemObjectSet_get__NewEnum( object_set, (
IUnknown**)&enum_var );
358 hr = IEnumVARIANT_Next( enum_var, 1, &
var,
NULL );
365 ok(
id == 21,
"got %d\n",
id );
367 hr = IDispatch_QueryInterface(
V_DISPATCH(&
var), &IID_ISWbemObject, (
void**)&
object );
371 hr = ISWbemObject_get_Properties_(
object, &prop_set );
374 hr = ISWbemPropertySet_Item( prop_set, props_bstr, 0, &prop );
379 hr = ISWbemPropertySet_Item( prop_set, procid_bstr, 0, &prop );
384 hr = ISWbemPropertySet_get_Count( prop_set, &
count );
388 hr = ISWbemProperty_get_Value( prop, &
var );
395 imp_level = 0xdeadbeef;
396 hr = ISWbemSecurity_get_ImpersonationLevel(
security, &imp_level );
398 ok( imp_level == wbemImpersonationLevelImpersonate,
"got %u\n", imp_level );
399 auth_level = 0xdeadbeef;
400 hr = ISWbemSecurity_get_AuthenticationLevel(
security, &auth_level );
402 ok( auth_level == wbemAuthenticationLevelPktPrivacy,
"got %u\n", auth_level );
405 ISWbemProperty_Release( prop );
406 ISWbemPropertySet_Release( prop_set );
407 ISWbemObject_Release(
object );
408 IEnumVARIANT_Release( enum_var );
409 ISWbemObjectSet_Release( object_set );
411 ISWbemLocator_Release(
locator );
static const WCHAR biosW[]
void dispatch(HANDLE hStopEvent)
static const WCHAR name4[]
static const WCHAR name3[]
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
static const WCHAR versionW[]
GLuint GLuint GLsizei count
GLenum const GLfloat * params
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 struct test_info tests[]
static VARIANTARG static DISPID
#define MAKELCID(lgid, srtid)
HRESULT WINAPI CreateBindCtx(DWORD reserved, LPBC *ppbc)
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define DISPATCH_PROPERTYGET
const GUID IID_IParseDisplayName
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define SUBLANG_ENGLISH_US
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
static const WCHAR procid[]
static void test_ParseDisplayName(void)
static const WCHAR lang[]
static const WCHAR localhost[]
static void test_locator(void)
static const WCHAR props[]
static const LCID english
#define DISP_E_MEMBERNOTFOUND
#define DISP_E_UNKNOWNNAME