- Fix error spotted by winetest: some status codes need to be normalized in CreateNam...
[reactos.git] / reactos / lib / kernel32 / file / npipe.c
index 1ba72cf..a3e47c5 100644 (file)
@@ -207,6 +207,13 @@ CreateNamedPipeW(LPCWSTR lpName,
                                    nOutBufferSize,
                                    &DefaultTimeOut);
 
+    /* Normalize special error codes */
+    if ((Status == STATUS_INVALID_DEVICE_REQUEST) ||
+        (Status == STATUS_NOT_SUPPORTED))
+    {
+        Status = STATUS_OBJECT_NAME_INVALID;
+    }
+
     /* Free the name */
     RtlFreeUnicodeString(&NamedPipeName);