Boost logo

Boost :

From: Thomas Witt (witt_at_[hidden])
Date: 2007-05-23 20:46:05

Please submit a Trac ticket at



Krzysztof Kowalczyk wrote:
> in mutex.inl:
> if (HMODULE kernel_module = GetModuleHandle(TEXT("KERNEL32.DLL")))
> g_TryEnterCriticalSection =
> reinterpret_cast<TryEnterCriticalSection_type>(GetProcAddress(kernel_module,
> TEXT("TryEnterCriticalSection")));
> The problem is that GetProcAddress() on windows only has ascii version
> and takes lpcstr as the name of the function to lookup, so if you
> define UNICODE to do windows unicode build, compiler complains that
> you're trying to pass WCHAR* as char*.
> A complication here is with wince, which is the opposite and only
> takes WCHAR* as the name of the function so the correct code should
> pass "TryEnterCriticalSection" on non-wince and
> L"TryEnterCriticalSection" on wince.
> It also means that successful windows unicode build of boost doesn't
> seem to be part of release criteria.
> -- krzysztof kowalczyk
> _______________________________________________
> Unsubscribe & other changes:

Thomas Witt

Boost list run by bdawes at, gregod at, cpdaniel at, john at