Artifact 9090410cc0efe452797055c378402f4660d4c47d
- File
src/win32/directx/dxerr.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
/***********************************************************************\ * dxerr.d * * * * Windows API header module * * * * Placed into public domain * \***********************************************************************/ module win32.directx.dxerr; import win32.windows; pragma(lib, "dxerr.lib"); extern (Windows) { CHAR* DXGetErrorStringA(HRESULT hr); WCHAR* DXGetErrorStringW(HRESULT hr); CHAR* DXGetErrorDescriptionA(HRESULT hr); WCHAR* DXGetErrorDescriptionW(HRESULT hr); HRESULT DXTraceA(CHAR* strFile, DWORD dwLine, HRESULT hr, CHAR* strMsg, BOOL bPopMsgBox); HRESULT DXTraceW(CHAR* strFile, DWORD dwLine, HRESULT hr, WCHAR* strMsg, BOOL bPopMsgBox); } version (Unicode) { alias DXGetErrorStringW DXGetErrorString; alias DXGetErrorDescriptionW DXGetErrorDescription; alias DXTraceW DXTrace; } else { alias DXGetErrorStringA DXGetErrorString; alias DXGetErrorDescriptionA DXGetErrorDescription; alias DXTraceA DXTrace; } debug (dxerr) { HRESULT DXTRACE_MSG(TCHAR* str) { return DXTrace(__FILE__, __LINE__, 0, str, false); } HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) { return DXTrace(__FILE__, __LINE__, hr, str, false); } HRESULT DXTRACE_ERR_MSGBOX(TCHAR* str, HRESULT hr) { return DXTrace(__FILE__, __LINE__, hr, str, true); } } else { HRESULT DXTRACE_MSG(TCHAR* str) { return 0; } HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) { return hr; } HRESULT DXTRACE_ERR_MSGBOX(TCHAR* str, HRESULT hr) { return hr; } }