[KERNEL32] - Fix DuplicateHandle return value
authorThomas Faber <thomas.faber@reactos.org>
Thu, 4 Aug 2011 22:53:57 +0000 (22:53 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Thu, 4 Aug 2011 22:53:57 +0000 (22:53 +0000)
[WIN32CSR] - Fix DPRINT

svn path=/trunk/; revision=53071

reactos/dll/win32/kernel32/client/handle.c
reactos/subsystems/win32/csrss/win32csr/console.c

index 9cd1759..8c18a87 100644 (file)
@@ -197,7 +197,7 @@ DuplicateHandle(IN HANDLE hSourceProcessHandle,
                                dwDesiredAccess,
                                bInheritHandle ? OBJ_INHERIT : 0,
                                dwOptions);
-    if (NT_SUCCESS(Status)) return Status;
+    if (NT_SUCCESS(Status)) return TRUE;
 
     BaseSetLastNTError(Status);
     return FALSE;
index 99a622b..f74cd28 100644 (file)
@@ -286,7 +286,7 @@ CSR_API(CsrAllocConsole)
                          FALSE,
                          0))
     {
-        DPRINT1("DuplicateHandle() failed: %d\n", GetLastError);
+        DPRINT1("DuplicateHandle() failed: %lu\n", GetLastError());
         ConioDeleteConsole((Object_t *) Console);
         if (NewConsole || !ProcessData->bInheritHandles)
         {