# HG changeset patch # User Daniel Atallah # Date 1283215995 0 # Node ID 31c2dd632ffa6df1e3c8ce3bcff41c388418b69f # Parent 7be961ff3fa2eed33c4b7e6bdb2aec37162d02f6 Make wpurple_install_dir() (DATADIR) relative to the libpurple dll instead of the executable file that launched the process diff -r 7be961ff3fa2 -r 31c2dd632ffa libpurple/win32/win32dep.c --- a/libpurple/win32/win32dep.c Tue Aug 31 00:51:41 2010 +0000 +++ b/libpurple/win32/win32dep.c Tue Aug 31 00:53:15 2010 +0000 @@ -35,7 +35,7 @@ static char *app_data_dir = NULL, *install_dir = NULL, *lib_dir = NULL, *locale_dir = NULL; -static HINSTANCE libpurpledll_hInstance = 0; +static HINSTANCE libpurpledll_hInstance = NULL; /* * PUBLIC CODE @@ -130,7 +130,7 @@ if (!initialized) { char *tmp = NULL; wchar_t winstall_dir[MAXPATHLEN]; - if (GetModuleFileNameW(NULL, winstall_dir, + if (GetModuleFileNameW(libpurpledll_hInstance, winstall_dir, MAXPATHLEN) > 0) { tmp = g_utf16_to_utf8(winstall_dir, -1, NULL, NULL, NULL);