Commit c25d3ac7 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Implemented SymSearchW.

parent 208e701a
......@@ -134,7 +134,7 @@
@ stdcall SymRegisterFunctionEntryCallback(ptr ptr ptr)
@ stdcall SymRegisterFunctionEntryCallback64(ptr ptr double)
@ stdcall SymSearch(long double long long str double ptr ptr long)
@ stub SymSearchW
@ stdcall SymSearchW(long double long long wstr double ptr ptr long)
@ stdcall SymSetContext(long ptr ptr)
@ stub SymSetHomeDirectory
@ stub SymSetHomeDirectoryW
......
......@@ -1538,3 +1538,38 @@ BOOL WINAPI SymSearch(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
return sym_enum(hProcess, BaseOfDll, Mask, &se);
}
/******************************************************************
* SymSearchW (DBGHELP.@)
*/
BOOL WINAPI SymSearchW(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
DWORD SymTag, PCWSTR Mask, DWORD64 Address,
PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback,
PVOID UserContext, DWORD Options)
{
struct sym_enumW sew;
BOOL ret = FALSE;
char* maskA = NULL;
TRACE("(%p %s %lu %lu %s %s %p %p %lx)\n",
hProcess, wine_dbgstr_longlong(BaseOfDll), Index, SymTag, debugstr_w(Mask),
wine_dbgstr_longlong(Address), EnumSymbolsCallback,
UserContext, Options);
sew.ctx = UserContext;
sew.cb = EnumSymbolsCallback;
sew.sym_info = (PSYMBOL_INFOW)sew.buffer;
if (Mask)
{
unsigned len = WideCharToMultiByte(CP_ACP, 0, Mask, -1, NULL, 0, NULL, NULL);
maskA = HeapAlloc(GetProcessHeap(), 0, len);
if (!maskA) return FALSE;
WideCharToMultiByte(CP_ACP, 0, Mask, -1, maskA, len, NULL, NULL);
}
ret = SymSearch(hProcess, BaseOfDll, Index, SymTag, maskA, Address,
sym_enumW, &sew, Options);
HeapFree(GetProcessHeap(), 0, maskA);
return ret;
}
......@@ -942,6 +942,7 @@ DWORD WINAPI UnDecorateSymbolName(LPCSTR, LPSTR, DWORD, DWORD);
BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL);
BOOL WINAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL);
BOOL WINAPI SymSearch(HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD);
BOOL WINAPI SymSearchW(HANDLE, ULONG64, DWORD, DWORD, PCWSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID, DWORD);
DWORD WINAPI UnDecorateSymbolName(PCSTR, PSTR, DWORD, DWORD);
BOOL WINAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
BOOL WINAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
......
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