From b010bce1af756d007d194eba16202dd9dcba80c7 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 27 Sep 2010 14:57:53 +0000 Subject: Fixed unbalanced Windows OleInitialize/OleUnitialize calls when loading/unloading the FLTK dll (STR #2417) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Native_File_Chooser_WIN32.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Fl_Native_File_Chooser_WIN32.cxx') diff --git a/src/Fl_Native_File_Chooser_WIN32.cxx b/src/Fl_Native_File_Chooser_WIN32.cxx index 063c1e532..750a36d66 100644 --- a/src/Fl_Native_File_Chooser_WIN32.cxx +++ b/src/Fl_Native_File_Chooser_WIN32.cxx @@ -47,6 +47,8 @@ char *wchartoutf8(LPCWSTR in); //MG #define RBRACKET_CHR ']' #define MAXFILTERS 80 +void fl_OleInitialize(); // in Fl.cxx (Windows only) + // STATIC: PRINT WINDOWS 'DOUBLE NULL' STRING (DEBUG) static void dnullprint(char *wp) { if ( ! wp ) return; @@ -464,7 +466,8 @@ int CALLBACK Fl_Native_File_Chooser::Dir_CB(HWND win, UINT msg, LPARAM param, LP // SHOW DIRECTORY BROWSER int Fl_Native_File_Chooser::showdir() { - OleInitialize(NULL); // init needed by BIF_USENEWUI + // initialize OLE only once + fl_OleInitialize(); // init needed by BIF_USENEWUI ClearBINF(); clear_pathnames(); // PARENT WINDOW -- cgit v1.2.3