Sync with trunk (r48545)
[reactos.git] / dll / win32 / kernel32 / file / create.c
index f5c9fab..894970a 100644 (file)
@@ -15,9 +15,9 @@
 /* INCLUDES *****************************************************************/
 
 #include <k32.h>
-#include <wine/debug.h>
-
-WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
+#define NDEBUG
+#include <debug.h>
+static ULONG gDebugChannel = kernel32file;
 
 #define SYMLINK_FLAG_RELATIVE   1
 
@@ -102,6 +102,12 @@ HANDLE WINAPI CreateFileW (LPCWSTR                 lpFileName,
    PVOID EaBuffer = NULL;
    ULONG EaLength = 0;
 
+   if (!lpFileName || !lpFileName[0])
+   {
+       SetLastError( ERROR_PATH_NOT_FOUND );
+       return INVALID_HANDLE_VALUE;
+   }
+
    TRACE("CreateFileW(lpFileName %S)\n",lpFileName);
 
    /* validate & translate the creation disposition */