[PATCH] wbemprox: Return WBEM_E_ACCESS_DENIED from IEnumWbemClassObject::Next() if the object is empty.

Hans Leidekker hans at codeweavers.com
Mon Jul 8 03:46:20 CDT 2019


On Mon, 2019-07-08 at 13:07 +0800, Dmitry Timoshkov wrote:
> +static void test_Win32_QuickFixEngineering( IWbemServices *services )
> +{
> +    static const WCHAR queryW[] =
> +        {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
> +         'W','i','n','3','2','_','Q','u','i','c','k','F','i','x','E','n','g','i','n','e','e','r','i','n','g',' ',
> +         'W','H','E','R','E',' ','H','o','t','F','i','x','I','D','=','\"','0','x','d','e','a','d','b','e','e','f','\"',0};
> +    BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
> +    HRESULT hr;
> +    IEnumWbemClassObject *result;
> +    IWbemClassObject *obj;
> +    ULONG count;
> +
> +    hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
> +    ok( hr == S_OK, "got %08x\n", hr );
> +
> +    count = 0xdeadbeef;
> +    hr = IEnumWbemClassObject_Next( result, 1000, 1, &obj, &count );
> +    ok( hr == WBEM_E_ACCESS_DENIED || broken(hr == WBEM_S_FALSE || hr == WBEM_S_TIMEDOUT) /* before Win7 SP1 */, "got %08x\n", hr );
> +    ok( !count, "got %u\n", count );

I don't see this. Even up-to-date Windows 10 returns WBEM_S_FALSE here.





More information about the wine-devel mailing list