WINCE: Fix compilation

This commit is contained in:
Cameron Cawley 2019-03-31 19:07:40 +01:00 committed by Filippos Karapetis
parent 82f4ee86a9
commit bcef809e61
24 changed files with 116 additions and 142 deletions

View file

@ -36,7 +36,7 @@
class Win32Plugin : public DynamicPlugin {
private:
static const TCHAR* toUnicode(const char *x) {
#ifndef _WIN32_WCE
#ifndef UNICODE
return (const TCHAR *)x;
#else
static TCHAR unicodeString[MAX_PATH];
@ -50,11 +50,7 @@ protected:
void *_dlHandle;
virtual VoidFunc findSymbol(const char *symbol) {
#ifndef _WIN32_WCE
FARPROC func = GetProcAddress((HMODULE)_dlHandle, symbol);
#else
FARPROC func = GetProcAddress((HMODULE)_dlHandle, toUnicode(symbol));
#endif
if (!func)
debug("Failed loading symbol '%s' from plugin '%s'", symbol, _filename.c_str());
@ -67,11 +63,7 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
#ifndef _WIN32_WCE
_dlHandle = LoadLibrary(_filename.c_str());
#else
_dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
#endif
if (!_dlHandle) {
debug("Failed loading plugin '%s' (error code %d)", _filename.c_str(), (int32) GetLastError());