ChangeSet ID: 21194 CVSROOT: /opt/cvs-commit Module name: wine Changes by: julliard@winehq.org 2005/11/09 06:55:01
Modified files: dlls/commdlg : filedlg.c Makefile.in
Log message: Michael Jung mjung@iss.tu-darmstadt.de Initialize COM prior to displaying the file dialog.
Patch: http://cvs.winehq.org/patch.py?id=21194
Old revision New revision Changes Path 1.115 1.116 +6 -0 wine/dlls/commdlg/filedlg.c 1.44 1.45 +1 -0 wine/dlls/commdlg/Makefile.in
Index: wine/dlls/commdlg/filedlg.c diff -u -p wine/dlls/commdlg/filedlg.c:1.115 wine/dlls/commdlg/filedlg.c:1.116 --- wine/dlls/commdlg/filedlg.c:1.115 9 Nov 2005 12:55: 1 -0000 +++ wine/dlls/commdlg/filedlg.c 9 Nov 2005 12:55: 1 -0000 @@ -250,6 +250,7 @@ static BOOL WINAPI GetFileName95(FileOpe LPCVOID template; HRSRC hRes; HANDLE hDlgTmpl = 0; + HRESULT hr;
/* test for missing functionality */ if (fodInfos->ofnInfos->Flags & UNIMPLEMENTED_FLAGS) @@ -281,11 +282,16 @@ static BOOL WINAPI GetFileName95(FileOpe fodInfos->HookMsg.sharevistring = RegisterWindowMessageA(SHAREVISTRINGA); }
+ /* Some shell namespace extensions depend on COM being initialized. */ + hr = CoInitialize(NULL); + lRes = DialogBoxIndirectParamA(COMDLG32_hInstance, (LPDLGTEMPLATEA) template, fodInfos->ofnInfos->hwndOwner, FileOpenDlgProc95, (LPARAM) fodInfos); + if (SUCCEEDED(hr)) + CoUninitialize();
/* Unable to create the dialog */ if( lRes == -1) Index: wine/dlls/commdlg/Makefile.in diff -u -p wine/dlls/commdlg/Makefile.in:1.44 wine/dlls/commdlg/Makefile.in:1.45 --- wine/dlls/commdlg/Makefile.in:1.44 9 Nov 2005 12:55: 1 -0000 +++ wine/dlls/commdlg/Makefile.in 9 Nov 2005 12:55: 1 -0000 @@ -5,6 +5,7 @@ VPATH = @srcdir@ MODULE = comdlg32.dll IMPORTLIB = libcomdlg32.$(IMPLIBEXT) IMPORTS = shell32 shlwapi comctl32 winspool user32 gdi32 advapi32 kernel32 ntdll +DELAYIMPORTS = ole32 EXTRALIBS = -luuid
C_SRCS = \