diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/Executable_odbcconfig.mk | 5 | ||||
-rw-r--r-- | dbaccess/win32/source/odbcconfig/odbcconfig.cxx | 12 |
2 files changed, 6 insertions, 11 deletions
diff --git a/dbaccess/Executable_odbcconfig.mk b/dbaccess/Executable_odbcconfig.mk index 862c77b3b5af..2156128469e3 100644 --- a/dbaccess/Executable_odbcconfig.mk +++ b/dbaccess/Executable_odbcconfig.mk @@ -15,11 +15,6 @@ $(eval $(call gb_Executable_use_libraries,odbcconfig,\ comphelper \ )) -$(eval $(call gb_Executable_use_system_win32_libs,odbcconfig,\ - legacy_stdio_definitions \ - odbccp32 \ -)) - $(eval $(call gb_Library_use_sdk_api,odbcconfig)) $(eval $(call gb_Executable_add_exception_objects,odbcconfig,\ diff --git a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx index 0cc48725c5e1..127d840c839e 100644 --- a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx +++ b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx @@ -18,11 +18,9 @@ */ -#if !defined WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -#endif -#include <windows.h> -#include <odbcinst.h> +#include <sal/config.h> + +#include <systools/win32/odbccp32.hxx> // displays the error text for the last error (GetLastError), and returns this error value static int displayLastError() @@ -102,7 +100,9 @@ extern "C" int APIENTRY wWinMain( HINSTANCE _hAppInstance, HINSTANCE, LPWSTR, in if ( !IsWindow( hAppWindow ) ) return displayLastError(); - if (!SQLManageDataSources(hAppWindow)) + // Have a odbccp32 variable, to not call FreeLibrary before displayLastError + sal::systools::odbccp32 odbccp32; + if (!odbccp32.SQLManageDataSources(hAppWindow)) return displayLastError(); return 0; |