ole32/tests: Add tests for IRunnableObject_Run call.

Dmitry Timoshkov dmitry at baikal.ru
Sun Oct 14 21:35:22 CDT 2012


Roman Dadkov <romand at etersoft.ru> wrote:

> +    hr = CLSIDFromProgID(WordApp, &clsid);
> +    if (SUCCEEDED(hr))
> +    {
> +        hr = CoCreateInstance(&clsid, NULL, CLSCTX_ALL, &IID_IUnknown, (void **)&pUnknown);
> +        ok_ole_success(hr, "CoCreateInstance");
> +
> +        hr = IUnknown_QueryInterface(pUnknown, &IID_IRunnableObject, (void**)&pRunnableObject);
> +        ok_ole_success(hr, "IUnknown_QueryInterface");
> +        if (FAILED(hr))

Shouldn't 'SUCCEEDED(hr)' be used here instead?

> +        {
> +            hr = IRunnableObject_Run(pRunnableObject, NULL);
> +            ok_ole_success(hr, "IRunnableObject_Run");
> +        }
> +    }

Probably you should add Release() calls where appropriate.

-- 
Dmitry.



More information about the wine-devel mailing list