[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / platform / win32 / dxerr.h
blobf6956a611c2eab0ce58826e85d35ced790184e69
1 /*
2 * File: DXErr.h
4 * DirectX Error Library
6 * Copyright (C) Microsoft Corporation. All rights reserved.
8 * SPDX-License-Identifier: MIT
9 * See LICENSES/README.md for more information.
12 // This version only supports UNICODE.
14 #pragma once
16 #if !defined(NOMINMAX)
17 #define NOMINMAX
18 #endif
20 #include <windows.h>
21 #include <sal.h>
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 //--------------------------------------------------------------------------------------
28 // DXGetErrorString
29 //--------------------------------------------------------------------------------------
30 const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );
32 #define DXGetErrorString DXGetErrorStringW
34 //--------------------------------------------------------------------------------------
35 // DXGetErrorDescription has to be modified to return a copy in a buffer rather than
36 // the original static string.
37 //--------------------------------------------------------------------------------------
38 void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* desc, _In_ size_t count );
40 #define DXGetErrorDescription DXGetErrorDescriptionW
42 //--------------------------------------------------------------------------------------
43 // DXTrace
45 // Desc: Outputs a formatted error message to the debug stream
47 // Args: WCHAR* strFile The current file, typically passed in using the
48 // __FILEW__ macro.
49 // DWORD dwLine The current line number, typically passed in using the
50 // __LINE__ macro.
51 // HRESULT hr An HRESULT that will be traced to the debug stream.
52 // CHAR* strMsg A string that will be traced to the debug stream (may be NULL)
53 // BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info.
55 // Return: The hr that was passed in.
56 //--------------------------------------------------------------------------------------
57 HRESULT WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_opt_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
59 #define DXTrace DXTraceW
61 //--------------------------------------------------------------------------------------
63 // Helper macros
65 //--------------------------------------------------------------------------------------
66 #if defined(DEBUG) || defined(_DEBUG)
67 #define DXTRACE_MSG(str) DXTrace( __FILEW__, (DWORD)__LINE__, 0, str, false )
68 #define DXTRACE_ERR(str,hr) DXTrace( __FILEW__, (DWORD)__LINE__, hr, str, false )
69 #define DXTRACE_ERR_MSGBOX(str,hr) DXTrace( __FILEW__, (DWORD)__LINE__, hr, str, true )
70 #else
71 #define DXTRACE_MSG(str) (0L)
72 #define DXTRACE_ERR(str,hr) (hr)
73 #define DXTRACE_ERR_MSGBOX(str,hr) (hr)
74 #endif
76 #ifdef __cplusplus
78 #endif //__cplusplus