Added: branches/new_headers/reactos/include/fmifs.h
Modified: branches/new_headers/reactos/include/ndk/rtlfuncs.h
Modified: branches/new_headers/reactos/include/ndk/umtypes.h
Modified: branches/new_headers/reactos/lib/fslib/vfatlib/fat12.c
Modified: branches/new_headers/reactos/lib/fslib/vfatlib/fat16.c
Modified: branches/new_headers/reactos/lib/fslib/vfatlib/fat32.c
Modified: branches/new_headers/reactos/lib/fslib/vfatlib/vfatlib.c
Modified: branches/new_headers/reactos/lib/fslib/vfatlib/vfatlib.h
Modified: branches/new_headers/reactos/lib/rossym/initkm.c
Modified: branches/new_headers/reactos/lib/wdmguid/wdmguid.c
--- branches/new_headers/reactos/include/fmifs.h 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/include/fmifs.h 2005-05-08 18:58:22 UTC (rev 15146)
@@ -0,0 +1,126 @@
+#ifndef _FMIFS_H
+#define _FMIFS_H
+/* $Id: fmifs.h 12852 2005-01-06 13:58:04Z mf $
+ *
+ * fmifs.h
+ *
+ * Copyright (c) 1998 Mark Russinovich
+ * Systems Internals
+ * http://www.sysinternals.com
+ *
+ * Typedefs and definitions for using chkdsk and formatex
+ * functions exported by the fmifs.dll library.
+ *
+ * ---
+ *
+ * 1999-02-18 (Emanuele Aliberti)
+ * Normalized function names.
+ *
+ */
+
+/* Output command */
+typedef
+struct
+{
+ ULONG Lines;
+ PCHAR Output;
+
+} TEXTOUTPUT, *PTEXTOUTPUT;
+
+
+/* Callback command types */
+typedef
+enum
+{
+ PROGRESS,
+ DONEWITHSTRUCTURE,
+ UNKNOWN2,
+ UNKNOWN3,
+ UNKNOWN4,
+ UNKNOWN5,
+ INSUFFICIENTRIGHTS,
+ UNKNOWN7,
+ UNKNOWN8,
+ UNKNOWN9,
+ UNKNOWNA,
+ DONE,
+ UNKNOWNC,
+ UNKNOWND,
+ OUTPUT,
+ STRUCTUREPROGRESS
+
+} CALLBACKCOMMAND;
+
+
+/* FMIFS callback definition */
+typedef
+BOOLEAN
+(STDCALL * PFMIFSCALLBACK) (
+ CALLBACKCOMMAND Command,
+ ULONG SubAction,
+ PVOID ActionInfo
+ );
+
+/* Chkdsk command in FMIFS */
+VOID
+STDCALL
+Chkdsk(
+ PWCHAR DriveRoot,
+ PWCHAR Format,
+ BOOLEAN CorrectErrors,
+ BOOLEAN Verbose,
+ BOOLEAN CheckOnlyIfDirty,
+ BOOLEAN ScanDrive,
+ PVOID Unused2,
+ PVOID Unused3,
+ PFMIFSCALLBACK Callback
+ );
+
+/* ChkdskEx command in FMIFS (not in the original) */
+VOID
+STDCALL
+ChkDskEx(
+ PWCHAR DriveRoot,
+ PWCHAR Format,
+ BOOLEAN CorrectErrors,
+ BOOLEAN Verbose,
+ BOOLEAN CheckOnlyIfDirty,
+ BOOLEAN ScanDrive,
+ PVOID Unused2,
+ PVOID Unused3,
+ PFMIFSCALLBACK Callback
+ );
+
+/* DiskCopy command in FMIFS */
+
+VOID
+STDCALL
+DiskCopy(VOID);
+
+/* Enable/Disable volume compression */
+BOOL
+STDCALL
+EnableVolumeCompression(
+ PWCHAR DriveRoot,
+ USHORT Compression
+ );
+
+/* Format command in FMIFS */
+
+/* media flags */
+#define FMIFS_HARDDISK 0xC
+#define FMIFS_FLOPPY 0x8
+
+VOID
+STDCALL
+FormatEx(
+ PWCHAR DriveRoot,
+ ULONG MediaFlag,
+ PWCHAR Format,
+ PWCHAR Label,
+ BOOLEAN QuickFormat,
+ ULONG ClusterSize,
+ PFMIFSCALLBACK Callback
+ );
+
+#endif /* ndef _FMIFS_H */
--- branches/new_headers/reactos/include/ndk/rtlfuncs.h 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/include/ndk/rtlfuncs.h 2005-05-08 18:58:22 UTC (rev 15146)
@@ -531,6 +531,12 @@
RtlFreeUnicodeString(
IN PUNICODE_STRING UnicodeString);
+VOID
+STDCALL
+RtlFreeOemString(
+ IN POEM_STRING OemString
+);
+
NTSTATUS
STDCALL
RtlGetCompressionWorkSpaceSize (
@@ -776,6 +782,14 @@
IN PUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
+
+NTSTATUS
+STDCALL
+RtlUnicodeStringToOemString (
+ IN OUT POEM_STRING DestinationString,
+ IN PUNICODE_STRING SourceString,
+ IN BOOLEAN AllocateDestinationString
+ );
NTSTATUS
STDCALL
--- branches/new_headers/reactos/include/ndk/umtypes.h 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/include/ndk/umtypes.h 2005-05-08 18:58:22 UTC (rev 15146)
@@ -99,6 +99,10 @@
#endif /* DBG */
+#define FILE_ANY_ACCESS 0
+#define FILE_SPECIAL_ACCESS FILE_ANY_ACCESS
+#define FILE_READ_ACCESS 1
+#define FILE_WRITE_ACCESS 2
#define METHOD_BUFFERED 0
#define METHOD_IN_DIRECT 1
@@ -269,6 +273,13 @@
#define IOCTL_REDIR_QUERY_PATH CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 99, METHOD_NEITHER, FILE_ANY_ACCESS)
+#define IOCTL_DISK_BASE FILE_DEVICE_DISK
+#define IOCTL_DISK_GET_DRIVE_GEOMETRY \
+ CTL_CODE(IOCTL_DISK_BASE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define IOCTL_DISK_GET_PARTITION_INFO \
+ CTL_CODE(IOCTL_DISK_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
+
#define NtCurrentProcess() ( (HANDLE)(LONG_PTR) -1 )
#define ZwCurrentProcess() NtCurrentProcess()
#define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 )
@@ -1076,6 +1087,49 @@
typedef OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW;
typedef LPOSVERSIONINFOEXW PRTL_OSVERSIONINFOEXW;
+typedef enum _MEDIA_TYPE {
+ Unknown,
+ F5_1Pt2_512,
+ F3_1Pt44_512,
+ F3_2Pt88_512,
+ F3_20Pt8_512,
+ F3_720_512,
+ F5_360_512,
+ F5_320_512,
+ F5_320_1024,
+ F5_180_512,
+ F5_160_512,
+ RemovableMedia,
+ FixedMedia,
+ F3_120M_512,
+ F3_640_512,
+ F5_640_512,
+ F5_720_512,
+ F3_1Pt2_512,
+ F3_1Pt23_1024,
+ F5_1Pt23_1024,
+ F3_128Mb_512,
+ F3_230Mb_512,
+ F8_256_128
+} MEDIA_TYPE, *PMEDIA_TYPE;
+typedef struct _PARTITION_INFORMATION {
+ LARGE_INTEGER StartingOffset;
+ LARGE_INTEGER PartitionLength;
+ DWORD HiddenSectors;
+ DWORD PartitionNumber;
+ BYTE PartitionType;
+ BOOLEAN BootIndicator;
+ BOOLEAN RecognizedPartition;
+ BOOLEAN RewritePartition;
+} PARTITION_INFORMATION, *PPARTITION_INFORMATION;
+
+typedef struct _DISK_GEOMETRY {
+ LARGE_INTEGER Cylinders;
+ MEDIA_TYPE MediaType;
+ ULONG TracksPerCylinder;
+ ULONG SectorsPerTrack;
+ ULONG BytesPerSector;
+} DISK_GEOMETRY, *PDISK_GEOMETRY;
#endif
--- branches/new_headers/reactos/lib/fslib/vfatlib/fat12.c 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/lib/fslib/vfatlib/fat12.c 2005-05-08 18:58:22 UTC (rev 15146)
@@ -8,13 +8,10 @@
* REVISIONS:
* EK 05/04-2003 Created
*/
+#include "vfatlib.h"
+
#define NDEBUG
#include <debug.h>
-#define NTOS_MODE_USER
-#include <ntos.h>
-#include <ddk/ntddscsi.h>
-#include <mem.h>
-#include "vfatlib.h"
static ULONG
--- branches/new_headers/reactos/lib/fslib/vfatlib/fat16.c 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/lib/fslib/vfatlib/fat16.c 2005-05-08 18:58:22 UTC (rev 15146)
@@ -8,13 +8,10 @@
* REVISIONS:
* EK 05/04-2003 Created
*/
+#include "vfatlib.h"
+
#define NDEBUG
#include <debug.h>
-#define NTOS_MODE_USER
-#include <ntos.h>
-#include <ddk/ntddscsi.h>
-#include <mem.h>
-#include "vfatlib.h"
static ULONG
--- branches/new_headers/reactos/lib/fslib/vfatlib/fat32.c 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/lib/fslib/vfatlib/fat32.c 2005-05-08 18:58:22 UTC (rev 15146)
@@ -8,13 +8,10 @@
* REVISIONS:
* EK 05/04-2003 Created
*/
+#include "vfatlib.h"
+
#define NDEBUG
#include <debug.h>
-#define NTOS_MODE_USER
-#include <ntos.h>
-#include <ddk/ntddscsi.h>
-#include <mem.h>
-#include "vfatlib.h"
static ULONG
--- branches/new_headers/reactos/lib/fslib/vfatlib/vfatlib.c 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/lib/fslib/vfatlib/vfatlib.c 2005-05-08 18:58:22 UTC (rev 15146)
@@ -7,10 +7,6 @@
* REVISIONS:
* CSH 05/04-2003 Created
*/
-#define NTOS_MODE_USER
-#include <ntos.h>
-#include <ddk/ntddscsi.h>
-#include <fslib/vfatlib.h>
#include "vfatlib.h"
#define NDEBUG
--- branches/new_headers/reactos/lib/fslib/vfatlib/vfatlib.h 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/lib/fslib/vfatlib/vfatlib.h 2005-05-08 18:58:22 UTC (rev 15146)
@@ -3,12 +3,10 @@
* PROJECT: ReactOS VFAT filesystem library
* FILE: vfatlib.h
*/
-#define NDEBUG
-#include <debug.h>
+#include <windows.h>
+#include <fmifs.h>
#define NTOS_MODE_USER
-#include <ntos.h>
-#include <fslib/vfatlib.h>
-
+#include <ndk/ntndk.h>
#define SECTORSIZE 512
typedef struct _FAT16_BOOT_SECTOR
--- branches/new_headers/reactos/lib/rossym/initkm.c 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/lib/rossym/initkm.c 2005-05-08 18:58:22 UTC (rev 15146)
@@ -7,8 +7,7 @@
* PROGRAMMERS: Ge van Geldorp (gvg@reactos.com)
*/
-#define NTOSAPI
-#include <roskrnl.h>
+#include <ddk/ntddk.h>
#include <reactos/rossym.h>
#include "rossympriv.h"
--- branches/new_headers/reactos/lib/wdmguid/wdmguid.c 2005-05-08 18:32:57 UTC (rev 15145)
+++ branches/new_headers/reactos/lib/wdmguid/wdmguid.c 2005-05-08 18:58:22 UTC (rev 15146)
@@ -5,7 +5,5 @@
#include "initguid.h"
#include <ddk/wdmguid.h>
-#define __GUIDS_ONLY__
-#include <ntos/ntpnp.h>
/* EOF */