Commit 82ca6773 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemdisp: Build without -DWINE_NO_LONG_TYPES.

parent ce22a025
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wbemdisp.dll
IMPORTS = oleaut32 ole32
......
......@@ -109,7 +109,7 @@ static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
hr = LoadRegTypeLib( &LIBID_WbemScripting, 1, 2, LOCALE_SYSTEM_DEFAULT, &typelib );
if (FAILED( hr ))
{
ERR( "LoadRegTypeLib failed: %08x\n", hr );
ERR( "LoadRegTypeLib failed: %#lx\n", hr );
return hr;
}
if (InterlockedCompareExchangePointer( (void **)&wbemdisp_typelib, typelib, NULL ))
......@@ -122,7 +122,7 @@ static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
hr = ITypeLib_GetTypeInfoOfGuid( wbemdisp_typelib, wbemdisp_tid_id[tid], &typeinfo );
if (FAILED( hr ))
{
ERR( "GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(wbemdisp_tid_id[tid]), hr );
ERR( "GetTypeInfoOfGuid(%s) failed: %#lx\n", debugstr_guid(wbemdisp_tid_id[tid]), hr );
return hr;
}
if (InterlockedCompareExchangePointer( (void **)(wbemdisp_typeinfo + tid), typeinfo, NULL ))
......@@ -199,7 +199,7 @@ static HRESULT WINAPI property_GetTypeInfo( ISWbemProperty *iface, UINT index,
LCID lcid, ITypeInfo **info )
{
struct property *property = impl_from_ISWbemProperty( iface );
TRACE( "%p, %u, %u, %p\n", property, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", property, index, lcid, info );
return get_typeinfo( ISWbemProperty_tid, info );
}
......@@ -211,7 +211,7 @@ static HRESULT WINAPI property_GetIDsOfNames( ISWbemProperty *iface, REFIID riid
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", property, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", property, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -232,7 +232,7 @@ static HRESULT WINAPI property_Invoke( ISWbemProperty *iface, DISPID member, REF
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", property, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", property, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemProperty_tid, &typeinfo );
......@@ -398,7 +398,7 @@ static HRESULT WINAPI propertyset_GetTypeInfo( ISWbemPropertySet *iface,
UINT index, LCID lcid, ITypeInfo **info )
{
struct propertyset *propertyset = impl_from_ISWbemPropertySet( iface );
TRACE( "%p, %u, %u, %p\n", propertyset, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", propertyset, index, lcid, info );
return get_typeinfo( ISWbemPropertySet_tid, info );
}
......@@ -410,7 +410,7 @@ static HRESULT WINAPI propertyset_GetIDsOfNames( ISWbemPropertySet *iface, REFII
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", propertyset, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", propertyset, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -431,7 +431,7 @@ static HRESULT WINAPI propertyset_Invoke( ISWbemPropertySet *iface, DISPID membe
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", propertyset, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", propertyset, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemPropertySet_tid, &typeinfo );
......@@ -457,7 +457,7 @@ static HRESULT WINAPI propertyset_Item( ISWbemPropertySet *iface, BSTR name,
HRESULT hr;
VARIANT var;
TRACE( "%p, %s, %08x, %p\n", propertyset, debugstr_w(name), flags, prop );
TRACE( "%p, %s, %#lx, %p\n", propertyset, debugstr_w(name), flags, prop );
hr = IWbemClassObject_Get( propertyset->object, name, 0, &var, NULL, NULL );
if (SUCCEEDED(hr))
......@@ -637,7 +637,7 @@ static HRESULT WINAPI method_GetTypeInfo(
{
struct method *method = impl_from_ISWbemMethod( iface );
TRACE( "%p, %u, %u, %p\n", method, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", method, index, lcid, info );
return get_typeinfo( ISWbemMethod_tid, info );
}
......@@ -654,7 +654,7 @@ static HRESULT WINAPI method_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", method, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", method, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -682,7 +682,7 @@ static HRESULT WINAPI method_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", method, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", method, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemMethod_tid, &typeinfo );
......@@ -858,7 +858,7 @@ static HRESULT WINAPI methodset_GetTypeInfo( ISWbemMethodSet *iface,
{
struct methodset *set = impl_from_ISWbemMethodSet( iface );
TRACE( "%p, %u, %u, %p\n", set, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", set, index, lcid, info );
return get_typeinfo( ISWbemMethodSet_tid, info );
}
......@@ -875,7 +875,7 @@ static HRESULT WINAPI methodset_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", set, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", set, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -903,7 +903,7 @@ static HRESULT WINAPI methodset_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", set, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", set, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemMethodSet_tid, &typeinfo );
......@@ -935,7 +935,7 @@ static HRESULT WINAPI methodset_Item(
IWbemClassObject *in_sign, *out_sign;
HRESULT hr;
TRACE("%p, %s, %#x, %p\n", set, debugstr_w(name), flags, method);
TRACE("%p, %s, %#lx, %p\n", set, debugstr_w(name), flags, method);
*method = NULL;
......@@ -1069,7 +1069,7 @@ static HRESULT WINAPI object_GetTypeInfo(
ITypeInfo **info )
{
struct object *object = impl_from_ISWbemObject( iface );
FIXME( "%p, %u, %u, %p\n", object, index, lcid, info );
FIXME( "%p, %u, %#lx, %p\n", object, index, lcid, info );
return E_NOTIMPL;
}
......@@ -1189,7 +1189,7 @@ static HRESULT WINAPI object_GetIDsOfNames(
UINT i;
ITypeInfo *typeinfo;
TRACE( "%p, %s, %p, %u, %u, %p\n", object, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", object, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -1251,7 +1251,7 @@ static VARTYPE to_vartype( CIMTYPE type )
case CIM_REAL32: return VT_R4;
default:
ERR("unhandled type %u\n", type);
ERR( "unhandled type %lu\n", type );
break;
}
return 0;
......@@ -1276,7 +1276,7 @@ static HRESULT WINAPI object_Invoke(
CIMTYPE type;
HRESULT hr;
TRACE( "%p, %x, %s, %u, %x, %p, %p, %p, %p\n", object, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", object, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
if (member <= DISPID_BASE_METHOD)
......@@ -1318,7 +1318,7 @@ static HRESULT WINAPI object_Invoke(
}
else
{
FIXME( "flags %x not supported\n", flags );
FIXME( "flags %#x not supported\n", flags );
return E_NOTIMPL;
}
}
......@@ -1486,7 +1486,7 @@ static HRESULT WINAPI object_ExecMethod_(
VARIANT path;
HRESULT hr;
TRACE( "%p, %s, %p, %#x, %p, %p\n", object, debugstr_w(method), in_params, flags, valueset, out_params );
TRACE( "%p, %s, %p, %#lx, %p, %p\n", object, debugstr_w(method), in_params, flags, valueset, out_params );
V_VT( &path ) = VT_EMPTY;
hr = IWbemClassObject_Get( object->object, L"__PATH", 0, &path, NULL, NULL );
......@@ -1536,7 +1536,7 @@ static HRESULT WINAPI object_GetObjectText_(
{
struct object *object = impl_from_ISWbemObject( iface );
TRACE( "%p, %#x, %p\n", object, flags, text );
TRACE( "%p, %#lx, %p\n", object, flags, text );
return IWbemClassObject_GetObjectText( object->object, flags, text );
}
......@@ -1769,7 +1769,7 @@ static HRESULT WINAPI objectset_GetTypeInfo(
ITypeInfo **info )
{
struct objectset *objectset = impl_from_ISWbemObjectSet( iface );
TRACE( "%p, %u, %u, %p\n", objectset, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", objectset, index, lcid, info );
return get_typeinfo( ISWbemObjectSet_tid, info );
}
......@@ -1786,7 +1786,7 @@ static HRESULT WINAPI objectset_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", objectset, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", objectset, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -1814,7 +1814,7 @@ static HRESULT WINAPI objectset_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", objectset, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", objectset, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemObjectSet_tid, &typeinfo );
......@@ -1886,7 +1886,7 @@ static HRESULT WINAPI objectset_ItemIndex(
IEnumVARIANT *enum_var;
VARIANT var;
TRACE( "%p, %d, %p\n", objectset, lIndex, objWbemObject );
TRACE( "%p, %ld, %p\n", objectset, lIndex, objWbemObject );
*objWbemObject = NULL;
hr = ISWbemObjectSet_get_Count( iface, &count );
......@@ -2025,7 +2025,7 @@ static HRESULT WINAPI enumvar_Next( IEnumVARIANT *iface, ULONG celt, VARIANT *va
IWbemClassObject *obj;
ULONG count = 0;
TRACE( "%p, %u, %p, %p\n", iface, celt, var, fetched );
TRACE( "%p, %lu, %p, %p\n", iface, celt, var, fetched );
if (celt) IEnumWbemClassObject_Next( enumvar->objectenum, WBEM_INFINITE, 1, &obj, &count );
if (count)
......@@ -2048,7 +2048,7 @@ static HRESULT WINAPI enumvar_Skip( IEnumVARIANT *iface, ULONG celt )
{
struct enumvar *enumvar = impl_from_IEnumVARIANT( iface );
TRACE( "%p, %u\n", iface, celt );
TRACE( "%p, %lu\n", iface, celt );
return IEnumWbemClassObject_Skip( enumvar->objectenum, WBEM_INFINITE, celt );
}
......@@ -2166,7 +2166,7 @@ static HRESULT WINAPI services_GetTypeInfo(
ITypeInfo **info )
{
struct services *services = impl_from_ISWbemServices( iface );
TRACE( "%p, %u, %u, %p\n", services, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", services, index, lcid, info );
return get_typeinfo( ISWbemServices_tid, info );
}
......@@ -2183,7 +2183,7 @@ static HRESULT WINAPI services_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", services, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", services, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -2211,7 +2211,7 @@ static HRESULT WINAPI services_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", services, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", services, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemServices_tid, &typeinfo );
......@@ -2235,7 +2235,7 @@ static HRESULT WINAPI services_Get(
IWbemClassObject *obj;
HRESULT hr;
TRACE( "%p, %s, %d, %p, %p\n", iface, debugstr_w(strObjectPath), iFlags, objWbemNamedValueSet,
TRACE( "%p, %s, %#lx, %p, %p\n", iface, debugstr_w(strObjectPath), iFlags, objWbemNamedValueSet,
objWbemObject );
if (objWbemNamedValueSet) FIXME( "ignoring context\n" );
......@@ -2303,7 +2303,7 @@ static HRESULT WINAPI services_InstancesOf(
BSTR query, wql = SysAllocString( L"WQL" );
HRESULT hr;
TRACE( "%p, %s, %x, %p, %p\n", iface, debugstr_w(strClass), iFlags, objWbemNamedValueSet,
TRACE( "%p, %s, %#lx, %p, %p\n", iface, debugstr_w(strClass), iFlags, objWbemNamedValueSet,
objWbemObjectSet );
if (!(query = build_query_string( strClass )))
......@@ -2364,7 +2364,7 @@ static HRESULT WINAPI services_ExecQuery(
IEnumWbemClassObject *iter;
HRESULT hr;
TRACE( "%p, %s, %s, %x, %p, %p\n", iface, debugstr_w(strQuery), debugstr_w(strQueryLanguage),
TRACE( "%p, %s, %s, %#lx, %p, %p\n", iface, debugstr_w(strQuery), debugstr_w(strQueryLanguage),
iFlags, objWbemNamedValueSet, objWbemObjectSet );
if (objWbemNamedValueSet) FIXME( "ignoring context\n" );
......@@ -2502,7 +2502,7 @@ static HRESULT WINAPI services_ExecMethod(
IWbemContext *context;
HRESULT hr;
TRACE( "%p, %s, %s, %p, %#x, %p, %p\n", services, debugstr_w(path), debugstr_w(method), in_sparams,
TRACE( "%p, %s, %s, %p, %#lx, %p, %p\n", services, debugstr_w(path), debugstr_w(method), in_sparams,
flags, valueset, out_sparams );
in_params = unsafe_object_impl_from_IDispatch( in_sparams );
......@@ -2671,7 +2671,7 @@ static HRESULT WINAPI locator_GetTypeInfo(
ITypeInfo **info )
{
struct locator *locator = impl_from_ISWbemLocator( iface );
TRACE( "%p, %u, %u, %p\n", locator, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", locator, index, lcid, info );
return get_typeinfo( ISWbemLocator_tid, info );
}
......@@ -2688,7 +2688,7 @@ static HRESULT WINAPI locator_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", locator, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", locator, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -2716,7 +2716,7 @@ static HRESULT WINAPI locator_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", locator, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", locator, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemLocator_tid, &typeinfo );
......@@ -2771,7 +2771,7 @@ static HRESULT WINAPI locator_ConnectServer(
BSTR resource;
HRESULT hr;
TRACE( "%p, %s, %s, %s, %p, %s, %s, 0x%08x, %p, %p\n", iface, debugstr_w(strServer),
TRACE( "%p, %s, %s, %s, %p, %s, %s, %#lx, %p, %p\n", iface, debugstr_w(strServer),
debugstr_w(strNamespace), debugstr_w(strUser), strPassword, debugstr_w(strLocale),
debugstr_w(strAuthority), iSecurityFlags, objWbemNamedValueSet, objWbemServices );
......@@ -2910,7 +2910,7 @@ static HRESULT WINAPI security_GetTypeInfo(
ITypeInfo **info )
{
struct security *security = impl_from_ISWbemSecurity( iface );
TRACE( "%p, %u, %u, %p\n", security, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", security, index, lcid, info );
return get_typeinfo( ISWbemSecurity_tid, info );
}
......@@ -2927,7 +2927,7 @@ static HRESULT WINAPI security_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", security, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", security, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -2955,7 +2955,7 @@ static HRESULT WINAPI security_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", security, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", security, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemSecurity_tid, &typeinfo );
......@@ -3143,7 +3143,7 @@ static HRESULT WINAPI namedvalue_GetTypeInfo(
{
struct namedvalue *value = impl_from_ISWbemNamedValue( iface );
TRACE( "%p, %u, %u, %p\n", value, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", value, index, lcid, info );
return get_typeinfo( ISWbemNamedValue_tid, info );
}
......@@ -3160,7 +3160,7 @@ static HRESULT WINAPI namedvalue_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", value, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", value, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -3188,7 +3188,7 @@ static HRESULT WINAPI namedvalue_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", set, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", set, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemNamedValue_tid, &typeinfo );
......@@ -3321,7 +3321,7 @@ static HRESULT WINAPI namedvalueset_GetTypeInfo(
{
struct namedvalueset *set = impl_from_ISWbemNamedValueSet( iface );
TRACE( "%p, %u, %u, %p\n", set, index, lcid, info );
TRACE( "%p, %u, %#lx, %p\n", set, index, lcid, info );
return get_typeinfo( ISWbemNamedValueSet_tid, info );
}
......@@ -3338,7 +3338,7 @@ static HRESULT WINAPI namedvalueset_GetIDsOfNames(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %s, %p, %u, %u, %p\n", set, debugstr_guid(riid), names, count, lcid, dispid );
TRACE( "%p, %s, %p, %u, %#lx, %p\n", set, debugstr_guid(riid), names, count, lcid, dispid );
if (!names || !count || !dispid) return E_INVALIDARG;
......@@ -3366,7 +3366,7 @@ static HRESULT WINAPI namedvalueset_Invoke(
ITypeInfo *typeinfo;
HRESULT hr;
TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", set, member, debugstr_guid(riid),
TRACE( "%p, %ld, %s, %#lx, %#x, %p, %p, %p, %p\n", set, member, debugstr_guid(riid),
lcid, flags, params, result, excep_info, arg_err );
hr = get_typeinfo( ISWbemNamedValueSet_tid, &typeinfo );
......@@ -3398,7 +3398,7 @@ static HRESULT WINAPI namedvalueset_Item(
VARIANT var;
HRESULT hr;
TRACE("%p, %s, %#x, %p\n", set, debugstr_w(name), flags, value);
TRACE("%p, %s, %#lx, %p\n", set, debugstr_w(name), flags, value);
if (SUCCEEDED(hr = IWbemContext_GetValue( set->context, name, flags, &var )))
{
......@@ -3428,7 +3428,7 @@ static HRESULT WINAPI namedvalueset_Add(
struct namedvalueset *set = impl_from_ISWbemNamedValueSet( iface );
HRESULT hr;
TRACE("%p, %s, %s, %#x, %p\n", set, debugstr_w(name), debugstr_variant(var), flags, value);
TRACE("%p, %s, %s, %#lx, %p\n", set, debugstr_w(name), debugstr_variant(var), flags, value);
if (!name || !var || !value)
return WBEM_E_INVALID_PARAMETER;
......@@ -3448,7 +3448,7 @@ static HRESULT WINAPI namedvalueset_Remove(
{
struct namedvalueset *set = impl_from_ISWbemNamedValueSet( iface );
TRACE("%p, %s, %#x\n", set, debugstr_w(name), flags);
TRACE("%p, %s, %#lx\n", set, debugstr_w(name), flags);
return IWbemContext_DeleteValue( set->context, name, flags );
}
......
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wbemdisp.dll
IMPORTS = oleaut32 ole32
......
......@@ -56,7 +56,8 @@ static void test_ParseDisplayName(void)
IMoniker *moniker;
IUnknown *obj;
BSTR str;
ULONG i, eaten, count;
ULONG i, eaten;
UINT count;
HRESULT hr;
CLSID clsid;
......@@ -68,7 +69,7 @@ static void test_ParseDisplayName(void)
}
hr = CreateBindCtx( 0, &ctx );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
for (i =0; i < ARRAY_SIZE( tests ); i++)
{
......@@ -77,17 +78,17 @@ static void test_ParseDisplayName(void)
moniker = NULL;
hr = IParseDisplayName_ParseDisplayName( displayname, NULL, str, &eaten, &moniker );
SysFreeString( str );
ok( hr == tests[i].hr, "%u: got %x\n", i, hr );
ok( eaten == tests[i].eaten, "%u: got %u\n", i, eaten );
ok( hr == tests[i].hr, "%lu: got %#lx\n", i, hr );
ok( eaten == tests[i].eaten, "%lu: got %lu\n", i, eaten );
if (moniker)
{
hr = IMoniker_GetClassID( moniker, &clsid );
ok( hr == S_OK, "%u: got %x\n", i, hr );
ok( IsEqualCLSID( &clsid, &CLSID_PointerMoniker ), "%u: got %s\n", i, wine_dbgstr_guid( &clsid ) );
ok( hr == S_OK, "%lu: got %#lx\n", i, hr );
ok( IsEqualCLSID( &clsid, &CLSID_PointerMoniker ), "%lu: got %s\n", i, wine_dbgstr_guid( &clsid ) );
obj = NULL;
hr = IMoniker_BindToObject( moniker, ctx, NULL, tests[i].iid, (void **)&obj );
ok( hr == S_OK, "%u: got %x\n", i, hr );
ok( hr == S_OK, "%lu: got %#lx\n", i, hr );
if (obj) IUnknown_Release( obj );
IMoniker_Release( moniker );
}
......@@ -98,18 +99,18 @@ static void test_ParseDisplayName(void)
moniker = NULL;
hr = IParseDisplayName_ParseDisplayName( displayname, NULL, str, &eaten, &moniker );
SysFreeString( str );
ok( hr == S_OK, "got %x\n", hr );
ok( eaten == lstrlenW(name1), "got %u\n", eaten );
ok( hr == S_OK, "got %#lx\n", hr );
ok( eaten == lstrlenW(name1), "got %lu\n", eaten );
if (moniker)
{
ISWbemServices *services = NULL;
hr = IMoniker_GetClassID( moniker, &clsid );
ok( hr == S_OK, "%u: got %x\n", i, hr );
ok( hr == S_OK, "%lu: got %#lx\n", i, hr );
ok( IsEqualCLSID( &clsid, &CLSID_PointerMoniker ), "got %s\n", wine_dbgstr_guid( &clsid ) );
hr = IMoniker_BindToObject( moniker, ctx, NULL, &IID_IUnknown, (void **)&services );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
if (services)
{
ISWbemObjectSet *objectset = NULL;
......@@ -117,17 +118,17 @@ static void test_ParseDisplayName(void)
str = SysAllocString( L"Win32_Bios" );
hr = ISWbemServices_InstancesOf( services, str, 0, NULL, &objectset );
SysFreeString( str );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
if (objectset)
{
hr = ISWbemObjectSet_get__NewEnum( objectset, &obj );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
if (obj)
{
IEnumVARIANT *enumvar = NULL;
hr = IUnknown_QueryInterface( obj, &IID_IEnumVARIANT, (void **)&enumvar );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
if (enumvar)
{
......@@ -140,51 +141,51 @@ static void test_ParseDisplayName(void)
fetched = 0xdeadbeef;
hr = IEnumVARIANT_Next( enumvar, 0, &var, &fetched );
ok( hr == S_OK, "got %x\n", hr );
ok( !fetched, "got %u\n", fetched );
ok( hr == S_OK, "got %#lx\n", hr );
ok( !fetched, "got %lu\n", fetched );
fetched = 0xdeadbeef;
V_VT( &var ) = VT_ERROR;
V_ERROR( &var ) = 0xdeadbeef;
hr = IEnumVARIANT_Next( enumvar, 1, &var, &fetched );
ok( hr == S_OK, "got %x\n", hr );
ok( fetched == 1, "got %u\n", fetched );
ok( V_VT( &var ) == VT_DISPATCH, "got %u\n", V_VT( &var ) );
ok( V_DISPATCH( &var ) != (IDispatch *)0xdeadbeef, "got %u\n", V_VT( &var ) );
ok( hr == S_OK, "got %#lx\n", hr );
ok( fetched == 1, "got %lu\n", fetched );
ok( V_VT( &var ) == VT_DISPATCH, "got %#x\n", V_VT( &var ) );
ok( V_DISPATCH( &var ) != (IDispatch *)0xdeadbeef, "got %#x\n", V_VT( &var ) );
dispatch = V_DISPATCH( &var );
count = 0;
hr = IDispatch_GetTypeInfoCount( dispatch, &count );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( count == 1, "got %u\n", count );
str = SysAllocString( L"Manufacturer" );
dispid = 0xdeadbeef;
hr = IDispatch_GetIDsOfNames( dispatch, &IID_NULL, &str, 1, english, &dispid );
SysFreeString( str );
ok( hr == S_OK, "got %x\n", hr );
ok( dispid == 0x1800001 || dispid == 0x10b /* win2k */, "got %x\n", dispid );
ok( hr == S_OK, "got %#lx\n", hr );
ok( dispid == 0x1800001 || dispid == 0x10b /* win2k */, "got %#lx\n", dispid );
str = SysAllocString( L"version" );
dispid = 0xdeadbeef;
hr = IDispatch_GetIDsOfNames( dispatch, &IID_NULL, &str, 1, english, &dispid );
SysFreeString( str );
ok( hr == S_OK, "got %x\n", hr );
ok( dispid == 0x1800002 || dispid == 0x119 /* win2k */, "got %x\n", dispid );
ok( hr == S_OK, "got %#lx\n", hr );
ok( dispid == 0x1800002 || dispid == 0x119 /* win2k */, "got %#lx\n", dispid );
str = SysAllocString( L"NoSuch" );
dispid = 0xdeadbeef;
hr = IDispatch_GetIDsOfNames( dispatch, &IID_NULL, &str, 1, english, &dispid );
SysFreeString( str );
ok( hr == DISP_E_UNKNOWNNAME, "got %x\n", hr );
ok( dispid == DISPID_UNKNOWN, "got %x\n", dispid );
ok( hr == DISP_E_UNKNOWNNAME, "got %#lx\n", hr );
ok( dispid == DISPID_UNKNOWN, "got %#lx\n", dispid );
str = SysAllocString( L"Manufacturer" );
dispid = 0xdeadbeef;
hr = IDispatch_GetIDsOfNames( dispatch, &IID_NULL, &str, 1, english, &dispid );
SysFreeString( str );
ok( hr == S_OK, "got %x\n", hr );
ok( dispid == 0x1800001 || dispid == 0x10b /* win2k */, "got %x\n", dispid );
ok( hr == S_OK, "got %#lx\n", hr );
ok( dispid == 0x1800001 || dispid == 0x10b /* win2k */, "got %#lx\n", dispid );
if (dispid == 0x1800001) /* crashes on win2k */
{
......@@ -197,7 +198,7 @@ static void test_ParseDisplayName(void)
hr = IDispatch_Invoke( dispatch, DISPID_UNKNOWN, &IID_NULL, english,
DISPATCH_METHOD|DISPATCH_PROPERTYGET,
&params, &res, NULL, &arg_err );
ok( hr == DISP_E_MEMBERNOTFOUND || hr == S_OK /* winxp */, "got %x\n", hr );
ok( hr == DISP_E_MEMBERNOTFOUND || hr == S_OK /* winxp */, "got %#lx\n", hr );
ok( params.rgvarg == (VARIANTARG *)0xdeadbeef, "got %p\n", params.rgvarg );
ok( params.rgdispidNamedArgs == (DISPID *)0xdeadbeef, "got %p\n", params.rgdispidNamedArgs );
ok( params.cArgs == 0xdeadbeef, "got %u\n", params.cArgs );
......@@ -214,7 +215,7 @@ static void test_ParseDisplayName(void)
hr = IDispatch_Invoke( dispatch, dispid, &IID_NULL, english,
DISPATCH_METHOD|DISPATCH_PROPERTYGET,
&params, &res, NULL, NULL );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( params.rgvarg == NULL, "got %p\n", params.rgvarg );
ok( params.rgdispidNamedArgs == NULL, "got %p\n", params.rgdispidNamedArgs );
ok( !params.cArgs, "got %u\n", params.cArgs );
......@@ -226,8 +227,8 @@ static void test_ParseDisplayName(void)
fetched = 0xdeadbeef;
hr = IEnumVARIANT_Next( enumvar, 1, &var, &fetched );
ok( hr == S_FALSE, "got %x\n", hr );
ok( !fetched, "got %u\n", fetched );
ok( hr == S_FALSE, "got %#lx\n", hr );
ok( !fetched, "got %lu\n", fetched );
IEnumVARIANT_Release( enumvar );
}
......@@ -243,11 +244,11 @@ static void test_ParseDisplayName(void)
IBindCtx_Release( ctx );
hr = CreateBindCtx( 0, &ctx );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
str = SysAllocString( L"winmgmts:\\\\.\\root\\default:StdRegProv" );
hr = IParseDisplayName_ParseDisplayName( displayname, NULL, str, &eaten, &moniker );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( str );
if (moniker)
......@@ -255,19 +256,19 @@ static void test_ParseDisplayName(void)
ISWbemObject *sobj = NULL;
hr = IMoniker_GetClassID( moniker, &clsid );
ok( hr == S_OK, "%u: got %x\n", i, hr );
ok( hr == S_OK, "%lu: got %#lx\n", i, hr );
ok( IsEqualCLSID( &clsid, &CLSID_PointerMoniker ), "got %s\n", wine_dbgstr_guid( &clsid ) );
hr = IMoniker_BindToObject( moniker, ctx, NULL, &IID_ISWbemObject, (void **)&sobj );
ok( hr == S_OK, "got %x\n",hr );
ok( hr == S_OK, "got %#lx\n",hr );
if (sobj)
{
DISPID dispid = 0xdeadbeef;
str = SysAllocString( L"GetStringValue" );
hr = ISWbemObject_GetIDsOfNames( sobj, &IID_NULL, &str, 1, english, &dispid );
ok( hr == S_OK, "got %x\n", hr );
ok( dispid == 0x1000001, "got %x\n", dispid );
ok( hr == S_OK, "got %#lx\n", hr );
ok( dispid == 0x1000001, "got %#lx\n", dispid );
ISWbemObject_Release( sobj );
SysFreeString( str );
......@@ -285,7 +286,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line)
ULONG rc;
IUnknown_AddRef(obj);
rc = IUnknown_Release(obj);
ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc);
ok_(__FILE__,line)(rc == ref, "expected refcount %ld, got %lu\n", ref, rc);
}
static void test_locator(void)
......@@ -307,12 +308,12 @@ static void test_locator(void)
WbemAuthenticationLevelEnum auth_level;
hr = CoCreateInstance( &CLSID_SWbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_ISWbemLocator, (void **)&locator );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
host_bstr = SysAllocString( L"localhost" );
root_bstr = SysAllocString( L"root\\CIMV2" );
hr = ISWbemLocator_ConnectServer( locator, host_bstr, root_bstr, NULL, NULL, NULL, NULL, 0, NULL, &services);
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( root_bstr );
SysFreeString( host_bstr );
......@@ -320,87 +321,87 @@ static void test_locator(void)
query_bstr = SysAllocString( L"Select ProcessorId from Win32_Processor" );
lang_bstr = SysAllocString( L"WQL" );
hr = ISWbemServices_ExecQuery( services, query_bstr, lang_bstr, wbemFlagForwardOnly, NULL, &object_set);
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( lang_bstr );
SysFreeString( query_bstr );
EXPECT_REF( services, 2 );
hr = ISWbemLocator_get_Security_( locator, &security );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
imp_level = 0xdeadbeef;
hr = ISWbemSecurity_get_ImpersonationLevel( security, &imp_level );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( imp_level == wbemImpersonationLevelImpersonate, "got %u\n", imp_level );
hr = ISWbemSecurity_put_ImpersonationLevel( security, wbemImpersonationLevelAnonymous );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
imp_level = 0xdeadbeef;
hr = ISWbemSecurity_get_ImpersonationLevel( security, &imp_level );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( imp_level == wbemImpersonationLevelAnonymous, "got %u\n", imp_level );
auth_level = 0xdeadbeef;
hr = ISWbemSecurity_get_AuthenticationLevel( security, &auth_level );
todo_wine {
ok( hr == WBEM_E_FAILED, "got %x\n", hr );
ok( hr == WBEM_E_FAILED, "got %#lx\n", hr );
ok( auth_level == 0xdeadbeef, "got %u\n", auth_level );
}
hr = ISWbemSecurity_put_AuthenticationLevel( security, wbemAuthenticationLevelNone );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
auth_level = 0xdeadbeef;
hr = ISWbemSecurity_get_AuthenticationLevel( security, &auth_level );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( auth_level == wbemAuthenticationLevelNone, "got %u\n", auth_level );
ISWbemSecurity_Release( security );
security = NULL;
hr = ISWbemObjectSet_get__NewEnum( object_set, (IUnknown**)&enum_var );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
VariantInit( &var );
hr = IEnumVARIANT_Next( enum_var, 1, &var, NULL );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( V_VT(&var) == VT_DISPATCH, "got %x\n", V_VT(&var));
props_bstr = SysAllocString( L"Properties_" );
hr = IDispatch_GetIDsOfNames( V_DISPATCH(&var), &IID_NULL, &props_bstr, 1, english, &id );
ok( hr == S_OK, "got %x\n", hr );
ok( id == 21, "got %d\n", id );
ok( hr == S_OK, "got %#lx\n", hr );
ok( id == 21, "got %ld\n", id );
hr = IDispatch_QueryInterface( V_DISPATCH(&var), &IID_ISWbemObject, (void**)&object );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
VariantClear( &var );
hr = ISWbemObject_get_Properties_( object, &prop_set );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
hr = ISWbemPropertySet_Item( prop_set, props_bstr, 0, &prop );
ok( hr == WBEM_E_NOT_FOUND, "got %x\n", hr );
ok( hr == WBEM_E_NOT_FOUND, "got %#lx\n", hr );
SysFreeString( props_bstr );
procid_bstr = SysAllocString( L"ProcessorId" );
hr = ISWbemPropertySet_Item( prop_set, procid_bstr, 0, &prop );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
SysFreeString( procid_bstr );
count = 0;
hr = ISWbemPropertySet_get_Count( prop_set, &count );
ok( hr == S_OK, "got %x\n", hr );
ok( count > 0, "got %d\n", count );
ok( hr == S_OK, "got %#lx\n", hr );
ok( count > 0, "got %lu\n", count );
hr = ISWbemProperty_get_Value( prop, &var );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( V_VT(&var) == VT_BSTR, "got %x\n", V_VT(&var) );
VariantClear( &var );
hr = ISWbemServices_get_Security_( services, &security );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
imp_level = 0xdeadbeef;
hr = ISWbemSecurity_get_ImpersonationLevel( security, &imp_level );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( imp_level == wbemImpersonationLevelImpersonate, "got %u\n", imp_level );
auth_level = 0xdeadbeef;
hr = ISWbemSecurity_get_AuthenticationLevel( security, &auth_level );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
ok( auth_level == wbemAuthenticationLevelPktPrivacy, "got %u\n", auth_level );
ISWbemSecurity_Release(security);
......@@ -424,33 +425,33 @@ static void test_namedvalueset(void)
LONG count;
hr = CoCreateInstance( &CLSID_SWbemNamedValueSet, NULL, CLSCTX_INPROC_SERVER, &IID_ISWbemNamedValueSet, (void **)&set );
ok( hr == S_OK, "got %x\n", hr );
ok( hr == S_OK, "got %#lx\n", hr );
name = SysAllocString( L"name" );
V_VT(&var) = VT_I4;
V_I4(&var) = 10;
hr = ISWbemNamedValueSet_Add( set, name, &var, 0, NULL );
ok( hr == WBEM_E_INVALID_PARAMETER, "Unexpected hr %#x.\n", hr );
ok( hr == WBEM_E_INVALID_PARAMETER, "Unexpected hr %#lx.\n", hr );
hr = ISWbemNamedValueSet_Add( set, name, &var, 0, &value );
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
/* New instance is returned, referencing same entry. */
hr = ISWbemNamedValueSet_Item( set, name, 0, &value2 );
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
ok( value != value2, "Unexpected value instance.\n" );
V_I4(&var) = 20;
hr = ISWbemNamedValue_put_Value( value2, &var );
todo_wine
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
V_I4(&var) = 0;
hr = ISWbemNamedValue_get_Value( value, &var );
todo_wine {
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( V_I4(&var) == 20, "Unexpected value %d.\n", V_I4(&var) );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
ok( V_I4(&var) == 20, "Unexpected value %ld.\n", V_I4(&var) );
}
ISWbemNamedValue_Release( value );
ISWbemNamedValue_Release( value2 );
......@@ -460,39 +461,39 @@ todo_wine {
/* Embedded nulls in names */
name = SysAllocStringLen(nameW, ARRAY_SIZE(nameW));
hr = ISWbemNamedValueSet_Item( set, name, 0, &value );
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
ISWbemNamedValue_Release( value );
V_I4(&var) = 11;
hr = ISWbemNamedValueSet_Add( set, name, &var, 0, &value );
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
count = 0;
hr = ISWbemNamedValueSet_get_Count( set, &count );
todo_wine {
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( count == 1, "Unexpected count %d.\n", count );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
ok( count == 1, "Unexpected count %ld.\n", count );
}
hr = ISWbemNamedValueSet_DeleteAll( set );
todo_wine
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
count = 1;
hr = ISWbemNamedValueSet_get_Count( set, &count );
todo_wine {
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( count == 0, "Unexpected count %d.\n", count );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
ok( count == 0, "Unexpected count %ld.\n", count );
}
V_I4(&var) = 20;
hr = ISWbemNamedValue_put_Value( value, &var );
todo_wine
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
count = 0;
hr = ISWbemNamedValueSet_get_Count( set, &count );
todo_wine {
ok( hr == S_OK, "Unexpected hr %#x.\n", hr );
ok( count == 1, "Unexpected count %d.\n", count );
ok( hr == S_OK, "Unexpected hr %#lx.\n", hr );
ok( count == 1, "Unexpected count %ld.\n", count );
}
ISWbemNamedValue_Release( value );
SysFreeString( name );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment