dbghelp: Implement SymMatchStringW.

This commit is contained in:
André Hentschel 2011-10-31 20:08:00 +01:00 committed by Alexandre Julliard
parent 7e3fe1975a
commit d6fadb882f
2 changed files with 30 additions and 1 deletions

View File

@ -139,7 +139,7 @@
@ stdcall SymMatchFileNameW(wstr wstr ptr ptr)
@ stdcall SymMatchString(str str long) SymMatchStringA
@ stdcall SymMatchStringA(str str long)
@ stub SymMatchStringW
@ stdcall SymMatchStringW(wstr wstr long)
@ stub SymNext
@ stub SymNextW
@ stub SymPrev

View File

@ -1890,6 +1890,35 @@ BOOL WINAPI SymMatchStringA(PCSTR string, PCSTR re, BOOL _case)
return ret;
}
/******************************************************************
* SymMatchStringW (DBGHELP.@)
*
* FIXME: SymMatchStringA should convert and pass the strings to SymMatchStringW,
* but that needs a unicode RE library.
*/
BOOL WINAPI SymMatchStringW(PCWSTR string, PCWSTR re, BOOL _case)
{
BOOL ret;
LPSTR s, r;
DWORD len;
TRACE("%s %s %c\n", debugstr_w(string), debugstr_w(re), _case ? 'Y' : 'N');
len = WideCharToMultiByte( CP_ACP, 0, string, -1, NULL, 0, NULL, NULL );
s = HeapAlloc( GetProcessHeap(), 0, len );
WideCharToMultiByte( CP_ACP, 0, string, -1, s, len, NULL, NULL );
len = WideCharToMultiByte( CP_ACP, 0, re, -1, NULL, 0, NULL, NULL );
r = HeapAlloc( GetProcessHeap(), 0, len );
WideCharToMultiByte( CP_ACP, 0, re, -1, r, len, NULL, NULL );
ret = SymMatchStringA(s, r, _case);
HeapFree( GetProcessHeap(), 0, r );
HeapFree( GetProcessHeap(), 0, s );
return ret;
}
/******************************************************************
* SymSearch (DBGHELP.@)
*/