ReactOS  0.4.14-dev-317-g96040ec
errors.h File Reference
#include <vfwmsgs.h>
Include dependency graph for errors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AMOVIEAPI
 
#define VFW_FIRST_CODE   0x200
 
#define MAX_ERROR_TEXT_LEN   160
 
#define AMGetErrorText   WINELIB_NAME_AW(AMGetErrorText)
 

Typedefs

typedef BOOL(WINAPIAMGETERRORTEXTPROCA) (HRESULT, char *, DWORD)
 
typedef BOOL(WINAPIAMGETERRORTEXTPROCW) (HRESULT, WCHAR *, DWORD)
 

Functions

DWORD WINAPI AMGetErrorTextA (HRESULT, LPSTR, DWORD)
 
DWORD WINAPI AMGetErrorTextW (HRESULT, LPWSTR, DWORD)
 

Macro Definition Documentation

◆ AMGetErrorText

#define AMGetErrorText   WINELIB_NAME_AW(AMGetErrorText)

Definition at line 39 of file errors.h.

◆ AMOVIEAPI

#define AMOVIEAPI

Definition at line 26 of file errors.h.

◆ MAX_ERROR_TEXT_LEN

#define MAX_ERROR_TEXT_LEN   160

Definition at line 29 of file errors.h.

◆ VFW_FIRST_CODE

#define VFW_FIRST_CODE   0x200

Definition at line 28 of file errors.h.

Typedef Documentation

◆ AMGETERRORTEXTPROCA

typedef BOOL(WINAPI* AMGETERRORTEXTPROCA) (HRESULT, char *, DWORD)

Definition at line 33 of file errors.h.

◆ AMGETERRORTEXTPROCW

typedef BOOL(WINAPI* AMGETERRORTEXTPROCW) (HRESULT, WCHAR *, DWORD)

Definition at line 34 of file errors.h.

Function Documentation

◆ AMGetErrorTextA()

DWORD WINAPI AMGetErrorTextA ( HRESULT  ,
LPSTR  ,
DWORD   
)

Definition at line 307 of file main.c.

308 {
309  DWORD res;
311 
312  TRACE("(%x,%p,%d)\n", hr, buffer, maxlen);
313  if (!buffer)
314  return 0;
315 
316  res = AMGetErrorTextW(hr, errorW, sizeof(errorW)/sizeof(*errorW));
317  return WideCharToMultiByte(CP_ACP, 0, errorW, res, buffer, maxlen, 0, 0);
318 }
#define WideCharToMultiByte
Definition: compat.h:101
HRESULT hr
Definition: shlfolder.c:183
#define CP_ACP
Definition: compat.h:99
GLuint buffer
Definition: glext.h:5915
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD WINAPI AMGetErrorTextW(HRESULT hr, LPWSTR buffer, DWORD maxlen)
Definition: main.c:323
GLuint res
Definition: glext.h:9613
static const WCHAR errorW[]
Definition: htmlevent.c:61
#define MAX_ERROR_TEXT_LEN
Definition: errors.h:29

◆ AMGetErrorTextW()

DWORD WINAPI AMGetErrorTextW ( HRESULT  ,
LPWSTR  ,
DWORD   
)

Definition at line 323 of file main.c.

324 {
325  unsigned int len;
326  static const WCHAR format[] = {'E','r','r','o','r',':',' ','0','x','%','l','x',0};
328 
329  FIXME("(%x,%p,%d) stub\n", hr, buffer, maxlen);
330 
331  if (!buffer) return 0;
333  if ((len = strlenW(error)) >= maxlen) return 0;
335  return len;
336 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
HRESULT hr
Definition: shlfolder.c:183
#define error(str)
Definition: mkdosfs.c:1605
GLuint buffer
Definition: glext.h:5915
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define FIXME(fmt,...)
Definition: debug.h:110
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLenum GLsizei len
Definition: glext.h:6722
#define lstrcpyW
Definition: compat.h:406
#define MAX_ERROR_TEXT_LEN
Definition: errors.h:29

Referenced by AMGetErrorTextA().