Mercurial > mplayer.hg
changeset 30597:0dbb798e67b0
Add a GetModuleHandleW implementation.
author | reimar |
---|---|
date | Thu, 18 Feb 2010 20:23:05 +0000 |
parents | 8806ec11a250 |
children | a9eac13b820a |
files | loader/win32.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/loader/win32.c Thu Feb 18 20:20:23 2010 +0000 +++ b/loader/win32.c Thu Feb 18 20:23:05 2010 +0000 @@ -596,6 +596,19 @@ 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 @@ FF(UnmapViewOfFile, -1) FF(Sleep, -1) FF(GetModuleHandleA, -1) + FF(GetModuleHandleW, -1) FF(GetProfileIntA, -1) FF(GetPrivateProfileIntA, -1) FF(GetPrivateProfileStringA, -1)