summaryrefslogtreecommitdiff
path: root/pthread_win32_attach_detach_np.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread_win32_attach_detach_np.c')
-rw-r--r--pthread_win32_attach_detach_np.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c
index bd52a7f..f8940e5 100644
--- a/pthread_win32_attach_detach_np.c
+++ b/pthread_win32_attach_detach_np.c
@@ -67,6 +67,7 @@ pthread_win32_process_attach_np ()
/*
* Load QUSEREX.DLL and try to get address of QueueUserAPCEx
*/
+ SetDllDirectory(""); /* Don't search in current directory */
ptw32_h_quserex = LoadLibrary (TEXT ("QUSEREX.DLL"));
if (ptw32_h_quserex != NULL)
@@ -112,6 +113,8 @@ pthread_win32_process_attach_np ()
}
}
+ SetDllDirectory(NULL); /* Reset DLL search path to default */
+
if (ptw32_h_quserex)
{
ptw32_features |= PTW32_ALERTABLE_ASYNC_CANCEL;