Paul Gofman (@gofman) commented about dlls/kernelbase/kernelbase.h:
return !status;}
+static inline DWORD set_ntwaitstatus( NTSTATUS status ) +{
- if (NT_ERROR(status))
- {
SetLastError( RtlNtStatusToDosError( status ));return WAIT_FAILED;- }
- return (DWORD)status;
+}
I doubt we need to factor out such a helper for just two wait functions, if we cannot use existing one it is probably better to duplicate this part. Probably changing to NT_ERROR() as Dmirty initially suggested.