summaryrefslogtreecommitdiff
path: root/dll.c
diff options
context:
space:
mode:
Diffstat (limited to 'dll.c')
-rw-r--r--dll.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dll.c b/dll.c
index b0d4d2a..ef724bf 100644
--- a/dll.c
+++ b/dll.c
@@ -88,8 +88,14 @@ DllMain (
_pthread_h_kernel32 = LoadLibrary(TEXT("KERNEL32.DLL"));
_pthread_try_enter_critical_section =
(BOOL (PT_STDCALL *)(LPCRITICAL_SECTION))
+
+#if defined(NEED_UNICODE_CONSTS)
+ GetProcAddress(_pthread_h_kernel32,
+ (const TCHAR *)TEXT("TryEnterCriticalSection"));
+#else
GetProcAddress(_pthread_h_kernel32,
(LPCSTR) "TryEnterCriticalSection");
+#endif
if (_pthread_try_enter_critical_section != NULL)
{