RFC: comdlg32: Fix null lpstrFile uses in FILEDLG95_OnOpen

Bruno Jesus 00cpxxx at gmail.com
Thu Jun 14 20:15:43 CDT 2012

Hi, I have written a patch to fix bug 17229 and would like to request
help to complete the test part.

The test creates a common dialog and select a filename (file does not
need to exist), it was copied from other tests in the same file
(comdlg32/tests/filedlg.c). It's not possible to have a default file
name because lpstrFile is used to do this and it's NULL. To fill a
filename in the common dialog control that appears I have used
EnumChildWindows to find the textbox and set the filename in it. The
main problem is how to detect that a HWND is a textbox? Currently I'm
sending SetWindowText to every control and that does work but I think
the patch may be rejected by that.

The patch can be downloaded at:

The problem is in the line 56.

Thanks in advance,

More information about the wine-devel mailing list