X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23ee4b4874aa32111eca609bfe4c9e62e6ca5a6a..9aaf11927c8f43dcf296563c6a62707d625c2356:/src/msw/dlmsw.cpp diff --git a/src/msw/dlmsw.cpp b/src/msw/dlmsw.cpp index 177dd7e202..9f904a240c 100644 --- a/src/msw/dlmsw.cpp +++ b/src/msw/dlmsw.cpp @@ -121,8 +121,10 @@ HMODULE wxGetModuleHandle(const char *name, void *addr) return hmod; } - // if failed, try by name - return ::GetModuleHandleA(name); + // Windows CE only has Unicode API, so even we have an ANSI string here, we + // still need to use GetModuleHandleW() there and so do it everywhere to + // avoid #ifdefs -- this code is not performance-critical anyhow... + return ::GetModuleHandle(wxString::FromAscii((char *)name)); } // ============================================================================