This commit is contained in:
orbitcowboy 2018-05-24 15:27:40 +02:00
parent 8b94bfaf0a
commit 792d5a7cf4
1 changed files with 26 additions and 0 deletions

View File

@ -5353,4 +5353,30 @@ HFONT CreateFont(
<define name="SUCCEEDED(hr)" value="(((HRESULT)(hr)) &gt;= 0)"/>
<!-- BOOL FAILED(HRESULT hr); -->
<define name="FAILED(hr)" value="(((HRESULT)(hr)) &lt; 0)"/>
<!-- WORD HRESULT_CODE( HRESULT hr ); -->
<define name="HRESULT_CODE(hr)" value="((hr) &amp; 0xFFFF)"/>
<!-- WORD HRESULT_FACILITY( HRESULT hr ); -->
<define name="HRESULT_FACILITY(hr)" value="(((hr) &gt;&gt; 16) &amp; 0x1fff)"/>
<!-- HRESULT HRESULT_FROM_NT( DWORD x ); -->
<define name="HRESULT_FROM_NT(x)" value="((HRESULT) ((x) | FACILITY_NT_BIT))"/>
<!-- HRESULT HRESULT_FROM_WIN32( DWORD x); -->
<define name="HRESULT_FROM_WIN32(x)" value="((HRESULT)(x) &lt;= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) &amp; 0x0000FFFF) | (FACILITY_WIN32 &lt;&lt; 16) | 0x80000000)))"/>
<!-- HRESULT __HRESULT_FROM_WIN32( DWORD x); -->
<define name="__HRESULT_FROM_WIN32(x)" value="((HRESULT)(x) &lt;= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) &amp; 0x0000FFFF) | (FACILITY_WIN32 &lt;&lt; 16) | 0x80000000)))"/>
<!-- DWORD HRESULT_SEVERITY(HRESULT hr); -->
<define name="HRESULT_SEVERITY(hr)" value="(((hr) &gt;&gt; 31) &amp; 0x1)"/>
<!-- DBOOL IS_ERROR( HRESULT Status); -->
<define name="IS_ERROR(Status)" value="(((unsigned long)(Status)) &gt;&gt; 31 == 1)"/>
<!-- HRESULT MAKE_HRESULT( WORD sev, WORD fac, WORD code); -->
<define name="MAKE_HRESULT(sev,fac,code)" value="((HRESULT) (((unsigned long)(sev) &lt;&lt; 31) | ((unsigned long)(fac)&lt;&lt;16) | ((unsigned long)(code))) )"/>
<!-- SCODE MAKE_SCODE( WORD sev, WORD fac, WORD code);-->
<define name="MAKE_SCODE(sev,fac,code)" value="((SCODE) (((unsigned long)(sev) &lt;&lt; 31) | ((unsigned long)(fac) &lt;&lt; 16) | ((unsigned long)(code))) )"/>
<!-- LPWSTR OLESTR( LPSTR str );-->
<define name="OLESTR(str)" value="L##str"/>
<!-- WORD SCODE_CODE(SCODE sc);-->
<define name="SCODE_CODE(sc)" value="((sc) &amp; 0xFFFF)"/>
<!-- WORD SCODE_FACILITY(SCODE sc);-->
<define name="SCODE_FACILITY(sc)" value="(((sc) &gt;&gt; 16) &amp; 0x1fff)"/>
<!-- DWORD SCODE_SEVERITY( SCODE sc );-->
<define name="SCODE_SEVERITY(sc)" value="(((sc) &gt;&gt; 31) &amp; 0x1)"/>
</def>