Sync aclui, advapi32, atl, authz, kernel32, msi, oledlg, powrprof, qmgr, riched20...
[reactos.git] / reactos / dll / win32 / kernel32 / file / create.c
index f5c9fab..d2fe40f 100644 (file)
@@ -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 */