[PATCH] ole32/tests: OleGetClipboard natively succeeds when COM/OLE is not inited

Huw Davies huw at codeweavers.com
Fri Jan 15 04:36:59 CST 2016


On Thu, Jan 14, 2016 at 01:49:39PM +0300, Paul Gofman wrote:
> Signed-off-by: Paul Gofman <gofmanp at gmail.com>
> ---
>  dlls/ole32/tests/clipboard.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
> index 83994f3..48ca891 100644
> --- a/dlls/ole32/tests/clipboard.c
> +++ b/dlls/ole32/tests/clipboard.c
> @@ -455,6 +455,17 @@ static HRESULT DataObjectImpl_CreateComplex(LPDATAOBJECT *lplpdataobj)
>      return S_OK;
>  }
>  
> +static void test_get_clipboard_unitialized()

You're missing a 'void'.
clipboard.c:1574:13: warning: function declaration isn’t a prototype

> +{
> +    HRESULT hr;
> +    IDataObject *pDObj;
> +
> +    pDObj = (IDataObject *)0xdeadbeef;
> +    hr = OleGetClipboard(&pDObj);
> +    todo_wine ok(hr == S_OK, "OleGetClipboard() got 0x%08x instead of 0x%08x\n", hr, S_OK);
> +    if (pDObj && pDObj != (IDataObject *)0xdeadbeef) IUnknown_Release((IUnknown*)pDObj);
> +}
> +
>  static void test_get_clipboard(void)
>  {
>      HRESULT hr;
> @@ -1592,6 +1603,7 @@ static void test_get_clipboard_locked()
>  
>  START_TEST(clipboard)
>  {
> +    test_get_clipboard_unitialized();
>      test_set_clipboard();
>      test_consumer_refs();
>      test_flushed_getdata();
> -- 
> 2.5.0
> 
> 
> 



More information about the wine-devel mailing list