diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-18 20:23:05 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-18 20:23:05 +0000 |
commit | 87edb382c68161f5f23bf2061a93bf684690e870 (patch) | |
tree | 89bdf9adb78c67902156ecc2d09eb821f71dbda2 /loader | |
parent | 2903a8583f568508236f74d522d2f3a6676e3479 (diff) |
Add a GetModuleHandleW implementation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30639 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r-- | loader/win32.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/loader/win32.c b/loader/win32.c index 8e314d5935..100c1f3c89 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -596,6 +596,19 @@ static HMODULE WINAPI expGetModuleHandleA(const char* name) return result; } +static HMODULE WINAPI expGetModuleHandleW(const uint16_t* name) +{ + char aname[256]; + int pos = 0; + while (*name) { + if (*name > 256 || pos >= sizeof(aname) - 1) + return NULL; + aname[pos++] = *name++; + } + aname[pos] = 0; + return expGetModuleHandleA(aname); +} + static void* WINAPI expCreateThread(void* pSecAttr, long dwStackSize, void* lpStartAddress, void* lpParameter, long dwFlags, long* dwThreadId) @@ -5030,6 +5043,7 @@ struct exports exp_kernel32[]= FF(UnmapViewOfFile, -1) FF(Sleep, -1) FF(GetModuleHandleA, -1) + FF(GetModuleHandleW, -1) FF(GetProfileIntA, -1) FF(GetPrivateProfileIntA, -1) FF(GetPrivateProfileStringA, -1) |