Boost logo

Boost :

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


Please submit a Trac ticket at http://svn.boost.org

Thanks

Thomas

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: http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
Thomas Witt
witt_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk