From: Juanma Barranquero Date: Wed, 3 Dec 2008 14:13:42 +0000 (+0000) Subject: * w32.c (init_environment): Don't free handle to library shell32.dll. X-Git-Tag: emacs-pretest-23.0.90~1298 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8b8be8eb0e3ceeca481db18be44a24113b4a4860;p=emacs.git * w32.c (init_environment): Don't free handle to library shell32.dll. --- diff --git a/src/ChangeLog b/src/ChangeLog index 48448c3b95c..9a8f6384ae5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-12-03 Juanma Barranquero + + * w32.c (init_environment): Don't free handle to library shell32.dll. + 2008-12-03 Kenichi Handa * font.c (font_at): Set `multibyte' at first. diff --git a/src/w32.c b/src/w32.c index 1032ac57af6..c6660c0d3d6 100644 --- a/src/w32.c +++ b/src/w32.c @@ -1443,12 +1443,10 @@ init_environment (char ** argv) HRESULT profile_result; /* Dynamically load ShGetFolderPath, as it won't exist on versions of Windows 95 and NT4 that have not been updated to include - MSIE 5. Also we don't link with shell32.dll by default. */ - HMODULE shell32_dll; + MSIE 5. */ ShGetFolderPath_fn get_folder_path; - shell32_dll = GetModuleHandle ("shell32.dll"); get_folder_path = (ShGetFolderPath_fn) - GetProcAddress (shell32_dll, "SHGetFolderPathA"); + GetProcAddress (GetModuleHandle ("shell32.dll"), "SHGetFolderPathA"); if (get_folder_path != NULL) { @@ -1459,9 +1457,6 @@ init_environment (char ** argv) if (profile_result == S_OK) env_vars[0].def_value = default_home; } - - /* Unload shell32.dll, it is not needed anymore. */ - FreeLibrary (shell32_dll); } /* Get default locale info and use it for LANG. */