diff options
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r-- | src/corelib/plugin/qsystemlibrary.cpp | 13 | ||||
-rw-r--r-- | src/corelib/plugin/qsystemlibrary_p.h | 6 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp index 7e9fdde..f781770 100644 --- a/src/corelib/plugin/qsystemlibrary.cpp +++ b/src/corelib/plugin/qsystemlibrary.cpp @@ -36,6 +36,13 @@ in the documentation for LoadLibrary for Windows CE at MSDN. (http://msdn.microsoft.com/en-us/library/ms886736.aspx) */ +#if defined(Q_OS_WINCE) +HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory/*= true*/) +{ + return ::LoadLibrary(libraryName); +} +#else + #if !defined(QT_BOOTSTRAPPED) extern QString qAppFileName(); #endif @@ -55,9 +62,6 @@ static QString qSystemDirectory() HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory/*= true*/) { -#if defined(Q_OS_WINCE) - return ::LoadLibrary(lpFileName); -#else QStringList searchOrder; #if !defined(QT_BOOTSTRAPPED) @@ -85,6 +89,7 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect return inst; } return 0; -#endif + } +#endif //Q_OS_WINCE diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h index 60c59e2..5d925ca 100644 --- a/src/corelib/plugin/qsystemlibrary_p.h +++ b/src/corelib/plugin/qsystemlibrary_p.h @@ -41,7 +41,11 @@ public: load(); if (!m_handle) return 0; - return (void*)GetProcAddress(m_handle, symbol); +#ifdef Q_OS_WINCE + return (void*)GetProcAddress(m_handle, (const wchar_t*)QString::fromLatin1(symbol).utf16()); +#else + return (void*)GetProcAddress(m_handle, symbol); +#endif } static void *resolve(const QString &libraryName, const char *symbol) |