(try 5) comdlg32/tests: Windows XP+ cannot do a CreateViewWindow2 twice in rapid seccesion. handle this error.
Paul Vriens
paul.vriens.wine at gmail.com
Mon Nov 17 12:32:10 CST 2008
Alexandre Julliard wrote:
> Aric Stewart <aric at codeweavers.com> writes:
>
>> @@ -182,19 +182,26 @@ static UINT CALLBACK create_view_window2_hook(HWND dlg, UINT msg, WPARAM wParam,
>>
>> hr = IShellView2_GetCurrentInfo(shell_view2, &folder_settings);
>> ok(SUCCEEDED(hr), "GetCurrentInfo returned %#x\n", hr);
>> - ok(folder_settings.ViewMode == FVM_LIST, "view mode is %d, expected %d\n", folder_settings.ViewMode, FVM_LIST);
>> + ok(folder_settings.ViewMode == FVM_DETAILS, "view mode is %d, expected %d\n", folder_settings.ViewMode, FVM_DETAILS);
>>
>> hr = IShellView2_DestroyViewWindow(shell_view2);
>> ok(SUCCEEDED(hr), "DestroyViewWindow returned %#x\n", hr);
>>
>> - view_params.pvid = &VID_Details;
>> + folder_settings.ViewMode = FVM_LIST;
>> + folder_settings.fFlags = 0;
>> + view_params.pvid = NULL;
>> hr = IShellView2_CreateViewWindow2(shell_view2, &view_params);
>> - ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#x\n", hr);
>> + /*
>> + * Windows XP is unable to recreate the ViewWindow2 returning
>> + * A Catastrophic failure error
>> + */
>
> So why can't it recreate it? Do you need to clean up something else beforehand?
>
Hi,
In an effort to squash the last test failures (W2K3), I had a go at this one.
When I add a DestroyWindow() the tests succeed on my W2K3. I'm however not sure
it's the correct way or if I'm even close:
hr = IShellView2_DestroyViewWindow(shell_view2);
ok(SUCCEEDED(hr), "DestroyViewWindow returned %#x\n", hr);
+ DestroyWindow(view_params.hwndView);
+
view_params.pvid = &VID_Details;
hr = IShellView2_CreateViewWindow2(shell_view2, &view_params);
ok(SUCCEEDED(hr), "CreateViewWindow2 returned %#x\n", hr);
The DestroyWindow() succeeds on W2K3 and Vista but fails
(ERROR_INVALID_WINDOW_HANDLE) on W2K.
(Even though DestroyWindow() succeeds on Vista is doesn't fix the failure on
that platform).
--
Cheers,
Paul.
More information about the wine-devel
mailing list