added stubs for SetFileBandwidthReservation(), GetFileBandwidthReservation(), SetFileCompletionNotificationModes() and OpenFileById(). Thanks also to Alex
Modified: trunk/reactos/lib/kernel32/file/file.c
Modified: trunk/reactos/lib/kernel32/kernel32.def
Modified: trunk/reactos/w32api/include/winbase.h
Modified: trunk/reactos/w32api/include/winnt.h

Modified: trunk/reactos/lib/kernel32/file/file.c
--- trunk/reactos/lib/kernel32/file/file.c	2006-01-14 22:18:07 UTC (rev 20867)
+++ trunk/reactos/lib/kernel32/file/file.c	2006-01-14 22:25:20 UTC (rev 20868)
@@ -1679,8 +1679,85 @@
                           IN DWORD cchFilePath,
                           IN DWORD dwFlags)
 {
+    if (dwFlags & ~(VOLUME_NAME_DOS | VOLUME_NAME_GUID | VOLUME_NAME_NT |
+                    VOLUME_NAME_NONE | FILE_NAME_NORMALIZED | FILE_NAME_OPENED))
+    {
+        SetLastError(ERROR_INVALID_PARAMETER);
+        return 0;
+    }
+
     UNIMPLEMENTED;
     return 0;
 }
 
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetFileBandwidthReservation(IN HANDLE hFile,
+                            IN DWORD nPeriodMilliseconds,
+                            IN DWORD nBytesPerPeriod,
+                            IN BOOL bDiscardable,
+                            OUT LPDWORD lpTransferSize,
+                            OUT LPDWORD lpNumOutstandingRequests)
+{
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+GetFileBandwidthReservation(IN HANDLE hFile,
+                            OUT LPDWORD lpPeriodMilliseconds,
+                            OUT LPDWORD lpBytesPerPeriod,
+                            OUT LPBOOL pDiscardable,
+                            OUT LPDWORD lpTransferSize,
+                            OUT LPDWORD lpNumOutstandingRequests)
+{
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetFileCompletionNotificationModes(IN HANDLE FileHandle,
+                                   IN UCHAR Flags)
+{
+    if (Flags & ~(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS | FILE_SKIP_SET_EVENT_ON_HANDLE))
+    {
+        SetLastError(ERROR_INVALID_PARAMETER);
+        return FALSE;
+    }
+
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+
+/*
+ * @unimplemented
+ */
+HANDLE
+WINAPI
+OpenFileById(IN HANDLE hFile,
+             IN LPFILE_ID_DESCRIPTOR lpFileID,
+             IN DWORD dwDesiredAccess,
+             IN DWORD dwShareMode,
+             IN LPSECURITY_ATTRIBUTES lpSecurityAttributes  OPTIONAL,
+             IN DWORD dwFlags)
+{
+    UNIMPLEMENTED;
+    return INVALID_HANDLE_VALUE;
+}
+
 /* EOF */

Modified: trunk/reactos/lib/kernel32/kernel32.def
--- trunk/reactos/lib/kernel32/kernel32.def	2006-01-14 22:18:07 UTC (rev 20867)
+++ trunk/reactos/lib/kernel32/kernel32.def	2006-01-14 22:25:20 UTC (rev 20868)
@@ -382,6 +382,7 @@
 GetFileAttributesByHandle@12
 GetFileAttributesExA@12
 GetFileAttributesExW@12
+GetFileBandwidthReservation@24
 GetFileInformationByHandle@8
 GetFileSize@8
 GetFileSizeEx@8
@@ -663,6 +664,7 @@
 OpenEventA@12
 OpenEventW@12
 OpenFile@12
+OpenFileById@24
 OpenFileMappingA@12
 OpenFileMappingW@12
 OpenJobObjectA@12
@@ -822,6 +824,8 @@
 SetFileAttributesA@8
 SetFileAttributesW@8
 SetFileAttributesByHandle@12
+SetFileBandwidthReservation@24
+SetFileCompletionNotificationModes@8
 SetFilePointer@16
 SetFilePointerEx@20
 SetFileShortNameA@8

Modified: trunk/reactos/w32api/include/winbase.h
--- trunk/reactos/w32api/include/winbase.h	2006-01-14 22:18:07 UTC (rev 20867)
+++ trunk/reactos/w32api/include/winbase.h	2006-01-14 22:25:20 UTC (rev 20868)
@@ -519,6 +519,14 @@
 #define RESTART_CYCLICAL 0x1
 #define RESTART_NOTIFY_SOLUTION 0x2
 #define RESTART_NOTIFY_FAULT 0x4
+#define VOLUME_NAME_DOS 0x0
+#define VOLUME_NAME_GUID 0x1
+#define VOLUME_NAME_NT 0x2
+#define VOLUME_NAME_NONE 0x4
+#define FILE_NAME_NORMALIZED 0x0
+#define FILE_NAME_OPENED 0x8
+#define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1
+#define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
 #endif
 #if (_WIN32_WINNT >= 0x0500)
 #define GET_MODULE_HANDLE_EX_FLAG_PIN 0x1
@@ -808,6 +816,19 @@
 	DWORD dwStreamNameSize;
 	WCHAR cStreamName[ANYSIZE_ARRAY];
 } WIN32_STREAM_ID, *LPWIN32_STREAM_ID;
+#if (_WIN32_WINNT >= 0x0600)
+typedef enum _FILE_ID_TYPE {
+	FileIdType,
+	MaximumFileIdType
+} FILE_ID_TYPE, *PFILE_ID_TYPE;
+typedef struct _FILE_ID_DESCRIPTOR {
+	DWORD dwSize;
+	FILE_ID_TYPE Type;
+	_ANONYMOUS_UNION union {
+		LARGE_INTEGER FileID;
+	} DUMMYUNIONNAME;
+} FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR;
+#endif
 typedef enum _FINDEX_INFO_LEVELS {
 	FindExInfoStandard,
 	FindExInfoMaxInfoLevel
@@ -1374,6 +1395,9 @@
 DWORD WINAPI GetFileAttributesW(LPCWSTR);
 BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,PVOID);
 BOOL WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,PVOID);
+#if (_WIN32_WINNT >= 0x0600)
+BOOL WINAPI GetFileBandwidthReservation(HANDLE,LPDWORD,LPDWORD,LPBOOL,LPDWORD,LPDWORD);
+#endif
 BOOL WINAPI GetFileInformationByHandle(HANDLE,LPBY_HANDLE_FILE_INFORMATION);
 BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
 BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
@@ -1703,6 +1727,9 @@
 HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR);
 HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
 HFILE WINAPI OpenFile(LPCSTR,LPOFSTRUCT,UINT);
+#if (_WIN32_WINNT >= 0x0600)
+HANDLE WINAPI OpenFileById(HANDLE,LPFILE_ID_DESCRIPTOR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD);
+#endif
 HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
 HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
 HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
@@ -1814,6 +1841,10 @@
 BOOL WINAPI SetFileAttributesByHandle(HANDLE,DWORD,DWORD);
 #endif
 BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD);
+#if (_WIN32_WINNT >= 0x0600)
+BOOL WINAPI SetFileBandwidthReservation(HANDLE,DWORD,DWORD,BOOL,LPDWORD,LPDWORD);
+BOOL WINAPI SetFileCompletionNotificationModes(HANDLE,UCHAR);
+#endif
 DWORD WINAPI SetFilePointer(HANDLE,LONG,PLONG,DWORD);
 BOOL WINAPI SetFilePointerEx(HANDLE,LARGE_INTEGER,PLARGE_INTEGER,DWORD);
 BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);

Modified: trunk/reactos/w32api/include/winnt.h
--- trunk/reactos/w32api/include/winnt.h	2006-01-14 22:18:07 UTC (rev 20867)
+++ trunk/reactos/w32api/include/winnt.h	2006-01-14 22:25:20 UTC (rev 20868)
@@ -2171,29 +2171,29 @@
 	PCONTEXT ContextRecord;
 } EXCEPTION_POINTERS,*PEXCEPTION_POINTERS,*LPEXCEPTION_POINTERS;
 typedef union _LARGE_INTEGER {
-  struct {
-    DWORD LowPart;
-    LONG  HighPart;
-  } u;
 #if ! defined(NONAMELESSUNION) || defined(__cplusplus)
   _ANONYMOUS_STRUCT struct {
     DWORD LowPart;
     LONG  HighPart;
   };
 #endif /* NONAMELESSUNION */
+  struct {
+    DWORD LowPart;
+    LONG  HighPart;
+  } u;
   LONGLONG QuadPart;
 } LARGE_INTEGER, *PLARGE_INTEGER;
 typedef union _ULARGE_INTEGER {
-  struct {
-    DWORD LowPart;
-    DWORD HighPart;
-  } u;
 #if ! defined(NONAMELESSUNION) || defined(__cplusplus)
   _ANONYMOUS_STRUCT struct {
     DWORD LowPart;
     DWORD HighPart;
   };
 #endif /* NONAMELESSUNION */
+  struct {
+    DWORD LowPart;
+    DWORD HighPart;
+  } u;
   ULONGLONG QuadPart;
 } ULARGE_INTEGER, *PULARGE_INTEGER;
 typedef struct _LUID {