[5/5] comctl32: Implement the TaskDialog function

Nikolay Sivov bunglehead at gmail.com
Thu Feb 19 06:59:05 CST 2015


On 19.02.2015 15:23, Joachim Priesner wrote:

>   }
>
>   /***********************************************************************
> + * TaskDialog [COMCTL32.@]
> + */
> +HRESULT WINAPI TaskDialog(HWND hWndParent, HINSTANCE hInstance, PCWSTR pszWindowTitle,
> +                          PCWSTR pszMainInstruction, PCWSTR pszContent,
> +                          TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons, PCWSTR pszIcon,
> +                          int *pnButton)

Please don't use prefixed notation for names.

> +static void test_TaskDialog_ProcAddr(void)
> +{
> +    void *ptr = GetProcAddress(hComctl32, (const CHAR*)344);
> +    ok(ptr == pTaskDialog, "got wrong pointer for ordinal 344, %p expected %p\n", ptr, pTaskDialog);
> +}
> +

This doesn't need its own test function.

>   START_TEST(taskdialog)
>   {
>       ULONG_PTR ctx_cookie;
> @@ -80,11 +87,22 @@ START_TEST(taskdialog)
>       if (!pTaskDialogIndirect)
>       {
>           win_skip("TaskDialogIndirect() is missing. Skipping the tests\n");
> -        return;
> +    }
> +    else
> +    {
> +        test_TaskDialogIndirect_ProcAddr();
> +        test_TaskDialogIndirect_InvalidParameters();
>       }
>
> -    test_TaskDialogIndirect_ProcAddr();
> -    test_TaskDialogIndirect_InvalidParameters();
> +    pTaskDialog = (void*)GetProcAddress(hComctl32, "TaskDialog");
> +    if (!pTaskDialog)
> +    {
> +        win_skip("TaskDialog() is missing. Skipping the tests\n");
> +    }
> +    else
> +    {
> +        test_TaskDialog_ProcAddr();
> +    }
>

I don't think you need two win_skip()'s here. If TaskDialogIndirect() is 
available, TaskDialog() is here too, right?




More information about the wine-devel mailing list