Artifact ceb1fd2634da5b6ac27f839f685cc8ebf4c86b12
- File
src/win32/directx/dxerr9.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.
/***********************************************************************\
* dxerr9.d *
* *
* Windows API header module *
* *
* Translated from MinGW Windows headers *
* *
* Placed into public domain *
\***********************************************************************/
module win32.directx.dxerr9;
/*
dxerr9.h - Header file for the DirectX 9 Error API
Written by Filip Navara <xnavara@volny.cz>
Ported to D by James Pelcis <jpelcis@gmail.com>
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.
*/
private import win32.windef;
extern (Windows) {
char* DXGetErrorString9A(HRESULT);
WCHAR* DXGetErrorString9W(HRESULT);
char* DXGetErrorDescription9A(HRESULT);
WCHAR* DXGetErrorDescription9W(HRESULT);
HRESULT DXTraceA(char*, DWORD, HRESULT, char*, BOOL);
HRESULT DXTraceW(char*, DWORD, HRESULT, WCHAR*, BOOL);
}
version (Unicode) {
alias DXGetErrorString9W DXGetErrorString9;
alias DXGetErrorDescription9W DXGetErrorDescription9;
alias DXTraceW DXTrace;
} else {
alias DXGetErrorString9A DXGetErrorString9;
alias DXGetErrorDescription9A DXGetErrorDescription9;
alias DXTraceA DXTrace;
}
debug (dxerr) {
HRESULT DXTRACE_MSG(TCHAR* str) {
return DXTrace(__FILE__, cast(DWORD)__LINE__, 0, str, FALSE);
}
HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
return DXTrace(__FILE__, cast(DWORD)__LINE__, hr, str, FALSE);
}
HRESULT DXTRACE_ERR_NOMSGBOX(TCHAR* str, HRESULT hr) {
return DXTrace(__FILE__, cast(DWORD)__LINE__, hr, str, TRUE);
}
} else {
HRESULT DXTRACE_MSG(TCHAR* str) {
return 0;
}
HRESULT DXTRACE_ERR(TCHAR* str, HRESULT hr) {
return hr;
}
HRESULT DXTRACE_ERR_NOMSGBOX(TCHAR* str, HRESULT hr) {
return hr;
}
}