mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-30 19:30:06 +00:00
COM & Audio useful bindings
This commit is contained in:
@@ -173,6 +173,9 @@ FACILITY :: enum DWORD {
|
||||
EAS = 85,
|
||||
WEB = 885,
|
||||
WEB_SOCKET = 886,
|
||||
XAUDIO2 = 896,
|
||||
XAPO = 897,
|
||||
GAMEINPUT = 906,
|
||||
MOBILE = 1793,
|
||||
SQLITE = 1967,
|
||||
SERVICE_FABRIC = 1968,
|
||||
@@ -231,6 +234,7 @@ ERROR_PIPE_BUSY : DWORD : 231
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/seccrypto/common-hresult-values
|
||||
S_OK :: 0x00000000 // Operation successful
|
||||
S_FALSE :: 0x00000001
|
||||
E_NOTIMPL :: 0x80004001 // Not implemented
|
||||
E_NOINTERFACE :: 0x80004002 // No such interface supported
|
||||
E_POINTER :: 0x80004003 // Pointer that is not valid
|
||||
@@ -270,6 +274,10 @@ MAKE_HRESULT :: #force_inline proc "contextless" (#any_int sev: int, #any_int fa
|
||||
return HRESULT((uint(sev)<<31) | (uint(fac)<<16) | (uint(code)))
|
||||
}
|
||||
|
||||
HRESULT_FROM_WIN32 :: #force_inline proc "contextless" (#any_int code: int) -> HRESULT {
|
||||
return HRESULT(code) <= 0 ? HRESULT(code) : HRESULT((code & 0x0000FFFF) | (int(FACILITY.WIN32) << 16) | 0x80000000)
|
||||
}
|
||||
|
||||
DECODE_HRESULT :: #force_inline proc "contextless" (#any_int hr: int) -> (SEVERITY, FACILITY, int) {
|
||||
return HRESULT_SEVERITY(hr), HRESULT_FACILITY(hr), HRESULT_CODE(hr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user