WINCE: Fix compilation
This commit is contained in:
parent
82f4ee86a9
commit
bcef809e61
24 changed files with 116 additions and 142 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue