quartz: Implement AMGetErrorTextA on top of AMGetErrorTextW.
This commit is contained in:
parent
89161a8ded
commit
883ca4d9d0
|
@ -297,17 +297,15 @@ LONG WINAPI DBToAmpFactor(LONG db)
|
|||
*/
|
||||
DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen)
|
||||
{
|
||||
unsigned int len;
|
||||
static const char format[] = "Error: 0x%x";
|
||||
char error[MAX_ERROR_TEXT_LEN];
|
||||
DWORD res;
|
||||
WCHAR errorW[MAX_ERROR_TEXT_LEN];
|
||||
|
||||
FIXME("(%x,%p,%d) stub\n", hr, buffer, maxlen);
|
||||
TRACE("(%x,%p,%d)\n", hr, buffer, maxlen);
|
||||
if (!buffer)
|
||||
return 0;
|
||||
|
||||
if (!buffer) return 0;
|
||||
wsprintfA(error, format, hr);
|
||||
if ((len = strlen(error)) >= maxlen) return 0;
|
||||
lstrcpyA(buffer, error);
|
||||
return len;
|
||||
res = AMGetErrorTextW(hr, errorW, sizeof(errorW)/sizeof(*errorW));
|
||||
return WideCharToMultiByte(CP_ACP, 0, errorW, res, buffer, maxlen, 0, 0);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue