Commit 922a7bd1 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Implemented SymLoadModuleExW.

parent 4a80e63a
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
@ stdcall SymLoadModule(long long str str long long) @ stdcall SymLoadModule(long long str str long long)
@ stdcall SymLoadModule64(long long str str double long) @ stdcall SymLoadModule64(long long str str double long)
@ stdcall SymLoadModuleEx(long long str str double long ptr 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) @ stdcall SymMatchFileName(str str ptr ptr)
@ stub SymMatchFileNameW @ stub SymMatchFileNameW
@ stdcall SymMatchString(str str long) @ stdcall SymMatchString(str str long)
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "winreg.h" #include "winreg.h"
#include "winternl.h" #include "winternl.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "winnls.h"
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
...@@ -463,6 +464,39 @@ DWORD64 WINAPI SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, ...@@ -463,6 +464,39 @@ DWORD64 WINAPI SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
} }
/*********************************************************************** /***********************************************************************
* 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.@) * SymLoadModule64 (DBGHELP.@)
*/ */
DWORD64 WINAPI SymLoadModule64(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, DWORD64 WINAPI SymLoadModule64(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
......
...@@ -763,6 +763,8 @@ DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD); ...@@ -763,6 +763,8 @@ DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD); DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD);
DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD, DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
PMODLOAD_DATA, DWORD); PMODLOAD_DATA, DWORD);
DWORD64 WINAPI SymLoadModuleExW(HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD,
PMODLOAD_DATA, DWORD);
BOOL WINAPI SymUnloadModule(HANDLE, DWORD); BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
BOOL WINAPI SymUnloadModule64(HANDLE, DWORD64); BOOL WINAPI SymUnloadModule64(HANDLE, DWORD64);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment