dbghelp: Implemented SymSearchW.

This commit is contained in:
Eric Pouech 2006-05-10 21:35:44 +02:00 committed by Alexandre Julliard
parent 208e701a7b
commit c25d3ac7d5
3 changed files with 37 additions and 1 deletions

View File

@ -134,7 +134,7 @@
@ stdcall SymRegisterFunctionEntryCallback(ptr ptr ptr) @ stdcall SymRegisterFunctionEntryCallback(ptr ptr ptr)
@ stdcall SymRegisterFunctionEntryCallback64(ptr ptr double) @ stdcall SymRegisterFunctionEntryCallback64(ptr ptr double)
@ stdcall SymSearch(long double long long str double ptr ptr long) @ 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) @ stdcall SymSetContext(long ptr ptr)
@ stub SymSetHomeDirectory @ stub SymSetHomeDirectory
@ stub SymSetHomeDirectoryW @ stub SymSetHomeDirectoryW

View File

@ -1538,3 +1538,38 @@ BOOL WINAPI SymSearch(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
return sym_enum(hProcess, BaseOfDll, Mask, &se); 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;
}

View File

@ -942,6 +942,7 @@ DWORD WINAPI UnDecorateSymbolName(LPCSTR, LPSTR, DWORD, DWORD);
BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL); BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL);
BOOL WINAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL); BOOL WINAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL);
BOOL WINAPI SymSearch(HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD); 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); DWORD WINAPI UnDecorateSymbolName(PCSTR, PSTR, DWORD, DWORD);
BOOL WINAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO); BOOL WINAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
BOOL WINAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO); BOOL WINAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);