dbghelp: Implemented SymLoadModuleExW.

This commit is contained in:
Eric Pouech 2006-05-10 21:35:15 +02:00 committed by Alexandre Julliard
parent 4a80e63a29
commit 922a7bd191
3 changed files with 37 additions and 1 deletions

View File

@ -117,7 +117,7 @@
@ stdcall SymLoadModule(long long str str long long)
@ stdcall SymLoadModule64(long long str str double long)
@ stdcall SymLoadModuleEx(long long str str double long ptr long)
@ stub SymLoadModuleExW
@ stdcall SymLoadModuleExW(long long wstr wstr double long ptr long)
@ stdcall SymMatchFileName(str str ptr ptr)
@ stub SymMatchFileNameW
@ stdcall SymMatchString(str str long)

View File

@ -30,6 +30,7 @@
#include "winreg.h"
#include "winternl.h"
#include "wine/debug.h"
#include "winnls.h"
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
@ -462,6 +463,39 @@ DWORD64 WINAPI SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
(DWORD)BaseOfDll, DllSize);
}
/***********************************************************************
* SymLoadModuleExW (DBGHELP.@)
*/
DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageName,
PCWSTR wModuleName, DWORD64 BaseOfDll, DWORD DllSize,
PMODLOAD_DATA Data, DWORD Flags)
{
LPSTR ImageName, ModuleName;
unsigned len;
BOOL ret;
if (wImageName)
{
len = WideCharToMultiByte(CP_ACP,0, wImageName, -1, NULL, 0, NULL, NULL);
ImageName = HeapAlloc(GetProcessHeap(), 0, len);
WideCharToMultiByte(CP_ACP,0, wImageName, -1, ImageName, len, NULL, NULL);
}
else ImageName = NULL;
if (wModuleName)
{
len = WideCharToMultiByte(CP_ACP,0, wModuleName, -1, NULL, 0, NULL, NULL);
ModuleName = HeapAlloc(GetProcessHeap(), 0, len);
WideCharToMultiByte(CP_ACP,0, wModuleName, -1, ModuleName, len, NULL, NULL);
}
else ModuleName = NULL;
ret = SymLoadModuleEx(hProcess, hFile, ImageName, ModuleName,
BaseOfDll, DllSize, Data, Flags);
HeapFree(GetProcessHeap(), 0, ImageName);
HeapFree(GetProcessHeap(), 0, ModuleName);
return ret;
}
/***********************************************************************
* SymLoadModule64 (DBGHELP.@)
*/

View File

@ -763,6 +763,8 @@ DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD);
DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
PMODLOAD_DATA, DWORD);
DWORD64 WINAPI SymLoadModuleExW(HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD,
PMODLOAD_DATA, DWORD);
BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
BOOL WINAPI SymUnloadModule64(HANDLE, DWORD64);