Author: cwittich
Date: Sat Nov 17 21:23:16 2007
New Revision: 30525
URL:
http://svn.reactos.org/svn/reactos?rev=30525&view=rev
Log:
initialize DirectoryHandle, add a DPRINT which displays the status returned by
NtCreateFile in case of error
Modified:
trunk/reactos/dll/win32/kernel32/file/dir.c
Modified: trunk/reactos/dll/win32/kernel32/file/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/di…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/dir.c (original)
+++ trunk/reactos/dll/win32/kernel32/file/dir.c Sat Nov 17 21:23:16 2007
@@ -94,7 +94,7 @@
OBJECT_ATTRIBUTES ObjectAttributes;
IO_STATUS_BLOCK IoStatusBlock;
UNICODE_STRING NtPathU;
- HANDLE DirectoryHandle;
+ HANDLE DirectoryHandle = NULL;
NTSTATUS Status;
DPRINT ("lpPathName %S lpSecurityAttributes %p\n",
@@ -134,6 +134,7 @@
if (!NT_SUCCESS(Status))
{
+ DPRINT("NtCreateFile failed with Status %lx\n", Status);
SetLastErrorByStatus(Status);
return FALSE;
}
@@ -522,7 +523,7 @@
OBJECT_ATTRIBUTES ObjectAttributes;
IO_STATUS_BLOCK IoStatusBlock;
UNICODE_STRING NtPathU;
- HANDLE DirectoryHandle;
+ HANDLE DirectoryHandle = NULL;
NTSTATUS Status;
DPRINT("lpPathName %S\n", lpPathName);