[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27456 - Extractor/src/main
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27456 - Extractor/src/main |
Date: |
Sun, 16 Jun 2013 05:55:25 +0200 |
Author: LRN
Date: 2013-06-16 05:55:25 +0200 (Sun, 16 Jun 2013)
New Revision: 27456
Modified:
Extractor/src/main/extractor_plugpath.c
Log:
[W32] Get module name relative to the dll, not exe
Modified: Extractor/src/main/extractor_plugpath.c
===================================================================
--- Extractor/src/main/extractor_plugpath.c 2013-06-15 21:32:12 UTC (rev
27455)
+++ Extractor/src/main/extractor_plugpath.c 2013-06-16 03:55:25 UTC (rev
27456)
@@ -158,6 +158,23 @@
#if WINDOWS
+static HMODULE le_dll = NULL;
+
+BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+ DWORD fdwReason,
+ LPVOID lpvReserved)
+{
+ switch (fdwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ le_dll = (HMODULE) hinstDLL;
+ break;
+ }
+
+ return TRUE;
+}
+
/**
* Try to determine path with win32-specific function
*/
@@ -170,7 +187,7 @@
if (NULL == (path = malloc (4103))) /* 4096+nil+6 for "/lib/" catenation */
return NULL;
- GetModuleFileName (NULL, path, 4096);
+ GetModuleFileName (le_dll, path, 4096);
idx = path + strlen (path);
while ( (idx > path) &&
('\\' != *idx) &&
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27456 - Extractor/src/main,
gnunet <=