XamContentCreateEx - Extended Error Support

This commit is contained in:
Gliniak 2021-01-03 18:21:08 +01:00
parent 1513a81a30
commit 98b063b346
1 changed files with 6 additions and 2 deletions

View File

@ -204,8 +204,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;