Commit 1f35ff59 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

quartz: Add stub implementation for AMGetErrorText{A,W}.

parent 7b861b3c
......@@ -268,3 +268,33 @@ LONG WINAPI DBToAmpFactor(LONG db)
return 0;
return 100;
}
DWORD WINAPI AMGetErrorTextA(HRESULT hr, char *buffer, DWORD maxlen)
{
int len;
static const char format[] = "Error: 0x%lx";
char error[MAX_ERROR_TEXT_LEN];
FIXME("(%lx,%p,%ld) stub\n", hr, buffer, maxlen);
if (!buffer) return 0;
wsprintfA(error, format, hr);
if ((len = lstrlenA(error)) >= maxlen) return 0;
lstrcpyA(buffer, error);
return len;
}
DWORD WINAPI AMGetErrorTextW(HRESULT hr, WCHAR *buffer, DWORD maxlen)
{
int len;
static const WCHAR format[] = {'E','r','r','o','r',':',' ','0','x','%','l','x',0};
WCHAR error[MAX_ERROR_TEXT_LEN];
FIXME("(%lx,%p,%ld) stub\n", hr, buffer, maxlen);
if (!buffer) return 0;
wsprintfW(error, format, hr);
if ((len = lstrlenW(error)) >= maxlen) return 0;
lstrcpyW(buffer, error);
return len;
}
@ stub AMGetErrorTextA
@ stub AMGetErrorTextW
@ stdcall AMGetErrorTextA(long ptr long)
@ stdcall AMGetErrorTextW(long ptr long)
@ stdcall AmpFactorToDB(long)
@ stdcall DBToAmpFactor(long)
@ stdcall -private DllCanUnloadNow()
......
......@@ -131,6 +131,7 @@ WINDOWS_INCLUDES = \
dxerr8.h \
dxerr9.h \
dxfile.h \
errors.h \
evcode.h \
evntrace.h \
excpt.h \
......
......@@ -37,7 +37,7 @@
#include <control.h>
/*#include <evcode.h>*/
#include <uuids.h>
/*#include <errors.h>*/
#include <errors.h>
#include <audevcod.h>
#ifndef OATRUE
......
/*
* Copyright (C) 2006 Hans Leidekker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __ERRORS__
#define __ERRORS__
#ifdef __cplusplus
extern "C" {
#endif
#define VFW_FIRST_CODE 0x200
#define MAX_ERROR_TEXT_LEN 160
#include <vfwmsgs.h>
DWORD WINAPI AMGetErrorTextA(HRESULT hr, char *buffer, DWORD maxlen);
DWORD WINAPI AMGetErrorTextW(HRESULT hr, WCHAR *buffer, DWORD maxlen);
#define AMGetErrorText WINELIB_NAME_AW(AMGetErrorText)
#ifdef __cplusplus
}
#endif
#endif /* __ERRORS__ */
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