[Kernel/XAM] XamContentCreateEx - Extended Error Support

This commit is contained in:
Gliniak 2021-01-03 18:21:08 +01:00 committed by Rick Gibbed
parent 690b0d9197
commit a6954aced3
1 changed files with 6 additions and 2 deletions

View File

@ -202,8 +202,12 @@ dword_result_t XamContentCreateEx(dword_t user_index, lpstring_t root_name,
}
if (overlapped_ptr) {
kernel_state()->CompleteOverlappedImmediateEx(overlapped_ptr, result, 0,
disposition);
X_RESULT extended_error = X_HRESULT_FROM_WIN32(result);
if (int32_t(extended_error) < 0) {
result = X_ERROR_FUNCTION_FAILED;
}
kernel_state()->CompleteOverlappedImmediateEx(overlapped_ptr, result,
extended_error, disposition);
return X_ERROR_IO_PENDING;
} else {
return result;