Added stubs for missing partition functions
[reactos.git] / reactos / include / ddk / iofuncs.h
index 2a9409d..3482c49 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef _INCLUDE_DDK_IOFUNCS_H
 #define _INCLUDE_DDK_IOFUNCS_H
-/* $Id: iofuncs.h,v 1.14 2000/06/13 15:50:51 ekohl Exp $ */
+/* $Id: iofuncs.h,v 1.24 2001/06/08 15:06:51 ekohl Exp $ */
 
 /* --- EXPORTED BY NTOSKRNL --- */
 
@@ -213,8 +213,8 @@ IoAllocateMdl (
  *             PUNICODE_STRING DeviceName
  *             );
  */
-#define IoAssignArcName (ArcName, DeviceName) \
-       (IoCreateSymbolicLink ((ArcName), (DeviceName)))
+#define IoAssignArcName(ArcName,DeviceName) \
+       (IoCreateSymbolicLink((ArcName),(DeviceName)))
 
 /**********************************************************************
  * NAME                                                        EXPORTED
@@ -429,6 +429,7 @@ IoConnectInterrupt (
        KAFFINITY               ProcessorEnableMask,
        BOOLEAN                 FloatingSave
        );
+
 PCONTROLLER_OBJECT
 STDCALL
 IoCreateController (
@@ -590,6 +591,11 @@ IoGetAttachedDevice (
        );
 PDEVICE_OBJECT
 STDCALL
+IoGetAttachedDeviceReference (
+       PDEVICE_OBJECT  DeviceObject
+       );
+PDEVICE_OBJECT
+STDCALL
 IoGetBaseFileSystemDeviceObject (
        IN      PFILE_OBJECT    FileObject
        );
@@ -618,7 +624,17 @@ IoGetConfigurationInformation (
 #define IoGetCurrentIrpStackLocation(Irp) \
        ((Irp)->Tail.Overlay.CurrentStackLocation)
 */
-PEPROCESS
+
+#define IoCopyCurrentIrpStackLocationToNext(Irp) { \
+  PIO_STACK_LOCATION IrpSp; \
+  PIO_STACK_LOCATION NextIrpSp; \
+  IrpSp = IoGetCurrentIrpStackLocation((Irp)); \
+  NextIrpSp = IoGetNextIrpStackLocation((Irp)); \
+  RtlCopyMemory(NextIrpSp, IrpSp, \
+    FIELD_OFFSET(IO_STACK_LOCATION, CompletionRoutine)); \
+  NextIrpSp->Control = 0; }
+
+struct _EPROCESS*
 STDCALL
 IoGetCurrentProcess (
        VOID
@@ -634,7 +650,7 @@ IoGetDeviceObjectPointer (
 PDEVICE_OBJECT
 STDCALL
 IoGetDeviceToVerify (
-       PETHREAD        Thread
+       struct _ETHREAD*        Thread
        );
 PGENERIC_MAPPING
 STDCALL
@@ -676,24 +692,26 @@ STDCALL
 IoGetRelatedDeviceObject (
        PFILE_OBJECT    FileObject
        );
-PEPROCESS
+struct _EPROCESS*
 STDCALL
 IoGetRequestorProcess (
        IN      PIRP    Irp
        );
+
 VOID
 STDCALL
 IoGetStackLimits (
-       PVOID   * Minimum, /* guess */
-       PVOID   * Maximum  /* guess */
+       PULONG  LowLimit,
+       PULONG  HighLimit
        );
+
 PIRP
 STDCALL
 IoGetTopLevelIrp (
        VOID
        );
 
-#define IoInitializeDpcRequest(DeviceObject, DpcRoutine) \
+#define IoInitializeDpcRequest(DeviceObject,DpcRoutine) \
        (KeInitializeDpc(&(DeviceObject)->Dpc, \
                         (PKDEFERRED_ROUTINE)(DpcRoutine), \
                         (DeviceObject)))
@@ -775,14 +793,6 @@ IoOpenDeviceInstanceKey (
        );
 NTSTATUS
 STDCALL
-IoPageRead (
-       PFILE_OBJECT            FileObject,
-       PMDL                    Mdl,
-       PLARGE_INTEGER          Offset,
-       PIO_STATUS_BLOCK        StatusBlock
-       );
-NTSTATUS
-STDCALL
 IoQueryDeviceDescription (
        PINTERFACE_TYPE                 BusType,
        PULONG                          BusNumber,
@@ -835,7 +845,7 @@ STDCALL
 IoRaiseInformationalHardError (
        NTSTATUS        ErrorStatus,
        PUNICODE_STRING String,
-       PKTHREAD        Thread
+       struct _KTHREAD*        Thread
        );
 VOID
 STDCALL
@@ -900,14 +910,14 @@ IoReportResourceUsage (
        PBOOLEAN                ConflictDetected
        );
 
-#define IoRequestDpc(DeviceObject, Irp, Context) \
+#define IoRequestDpc(DeviceObject,Irp,Context) \
        (KeInsertQueueDpc(&(DeviceObject)->Dpc,(Irp),(Context)))
 
-#define IoSetCancelRoutine(Irp, NewCancelRoutine) \
+#define IoSetCancelRoutine(Irp,NewCancelRoutine) \
        ((PDRIVER_CANCEL)InterlockedExchange((PULONG)&(Irp)->CancelRoutine, \
                                             (ULONG)(NewCancelRoutine)));
 
-#define IoSetCompletionRoutine (Irp,Routine,Context,Success,Error,Cancel) \
+#define IoSetCompletionRoutine(Irp,Routine,Context,Success,Error,Cancel) \
        { \
                PIO_STACK_LOCATION param; \
                assert((Success)||(Error)||(Cancel)?(Routine)!=NULL:TRUE); \
@@ -923,17 +933,14 @@ IoReportResourceUsage (
                        param->Control |= SL_INVOKE_ON_CANCEL; \
        } 
 
-VOID
-STDCALL
-IoSetDeviceToVerify (
-       DWORD   Unknown0,
-       DWORD   Unknown1
-       );
+VOID STDCALL
+IoSetDeviceToVerify (IN struct _ETHREAD* Thread,
+                    IN PDEVICE_OBJECT DeviceObject);
 VOID
 STDCALL
 IoSetHardErrorOrVerifyDevice (
-       PIRP            Irp,
-       PDEVICE_OBJECT  DeviceObject
+       IN      PIRP            Irp,
+       IN      PDEVICE_OBJECT  DeviceObject
        );
 NTSTATUS
 STDCALL
@@ -1042,11 +1049,7 @@ IoSynchronousPageWrite (
        DWORD   Unknown3,
        DWORD   Unknown4
        );
-PEPROCESS
-STDCALL
-IoThreadToProcess (
-       IN      PETHREAD        Thread
-       );
+struct _EPROCESS* STDCALL IoThreadToProcess (struct _ETHREAD*  Thread);
 VOID
 STDCALL
 IoUnregisterFileSystem (
@@ -1111,11 +1114,12 @@ IofCompleteRequest (
 VOID
 STDCALL
 IoAssignDriveLetters (
-       DWORD   Unknown0,
-       DWORD   Unknown1,
-       DWORD   Unknown2,
-       DWORD   Unknown3
+       IN      PLOADER_PARAMETER_BLOCK LoaderBlock,
+       IN      PSTRING                 NtDeviceName,
+       OUT     PUCHAR                  NtSystemPath,
+       OUT     PSTRING                 NtSystemPathString
        );
+
 BOOLEAN
 STDCALL
 IoFlushAdapterBuffers (
@@ -1126,11 +1130,13 @@ IoFlushAdapterBuffers (
        ULONG           Length,
        BOOLEAN         WriteToDevice
        );
+
 VOID
 STDCALL
 IoFreeAdapterChannel (
        PADAPTER_OBJECT AdapterObject
        );
+
 VOID
 STDCALL
 IoFreeMapRegisters (
@@ -1138,6 +1144,7 @@ IoFreeMapRegisters (
        PVOID           MapRegisterBase,
        ULONG           NumberOfMapRegisters
        );
+
 PHYSICAL_ADDRESS
 STDCALL
 IoMapTransfer (
@@ -1148,14 +1155,16 @@ IoMapTransfer (
        PULONG          Length,
        BOOLEAN         WriteToDevice
        );
+
 NTSTATUS
 STDCALL
 IoReadPartitionTable (
-       PDEVICE_OBJECT                          DeviceObject,
-       ULONG                                   SectorSize,
-       BOOLEAN                                 ReturnedRecognizedPartitions,
-       struct _DRIVE_LAYOUT_INFORMATION        ** PBuffer
+       PDEVICE_OBJECT                  DeviceObject,
+       ULONG                           SectorSize,
+       BOOLEAN                         ReturnedRecognizedPartitions,
+       PDRIVE_LAYOUT_INFORMATION       * PartitionBuffer
        );
+
 NTSTATUS
 STDCALL
 IoSetPartitionInformation (
@@ -1164,21 +1173,20 @@ IoSetPartitionInformation (
        ULONG           PartitionNumber,
        ULONG           PartitionType
        );
+
 NTSTATUS
 STDCALL
 IoWritePartitionTable (
-       PDEVICE_OBJECT  DeviceObject,
-       ULONG SectorSize,
-       ULONG SectorsPerTrack,
-       ULONG NumberOfHeads,
-       struct _DRIVE_LAYOUT_INFORMATION* PBuffer
+       PDEVICE_OBJECT                  DeviceObject,
+       ULONG                           SectorSize,
+       ULONG                           SectorsPerTrack,
+       ULONG                           NumberOfHeads,
+       PDRIVE_LAYOUT_INFORMATION       PartitionBuffer
        );
 
 
 /* --- --- --- INTERNAL or REACTOS ONLY --- --- --- */
 
-
-
 /*
  * FUNCTION: Registers the driver with WMI
  * ARGUMENTS:
@@ -1186,120 +1194,17 @@ IoWritePartitionTable (
  *          Action = Action to take
  * RETURNS: Status (?)
  */
-//NTSTATUS IoWMIRegistrationControl(DeviceObject, WMIREGACTION Action);
-
-/*
- * FUNCTION: Returns a pointer to the callers
- * stack location in the irp 
- */
-/*
-PIO_STACK_LOCATION
-IoGetCurrentIrpStackLocation (
-       IRP     * irp
-       );
-*/
-/*
-ULONG
-IoGetFunctionCodeFromCtlCode (
-       ULONG   ControlCode
-       );
-*/
-/*
- * FUNCTION:  
- */
-/*
-PIO_STACK_LOCATION
-IoGetNextIrpStackLocation (
-       IRP     * irp
-       );
-*/
-/*
-VOID
-IoInitializeDpcRequest (
-       PDEVICE_OBJECT  DeviceObject,
-       PIO_DPC_ROUTINE DpcRoutine
-       );
-*/
 /*
-BOOLEAN
-IoIsErrorUserInduced (
-       NTSTATUS        Status
-       );
+NTSTATUS
+IoWMIRegistrationControl (
+       PDEVICE_OBJECT DeviceObject,
+       WMIREGACTION Action);
 */
+
 BOOLEAN
 IoIsTotalDeviceFailure (
        NTSTATUS        Status
        );
-/*
- * FUNCTION: Marks an IRP as pending
- * ARGUMENTS:
- *         Irp = Irp to mark
- * NOTE: If a driver doesn't complete the irp in its dispatch routine it
- * must mark it pending otherwise the I/O manager will complete it on
- * return from the dispatch routine.
- */
-/*
-VOID
-IoMarkIrpPending (
-       PIRP    Irp
-       );
-*/
-/*
-VOID
-IoRequestDpc (
-       PDEVICE_OBJECT  DeviceObject,
-       PIRP            Irp,
-       PVOID           Context
-       );
-*/
-/*
-PDRIVER_CANCEL
-IoSetCancelRoutine (
-       PIRP            Irp,
-       PDRIVER_CANCEL  CancelRoutine
-       );
-*/
-/*
-VOID
-IoSetCompletionRoutine (
-       PIRP                    Irp,
-       PIO_COMPLETION_ROUTINE  CompletionRoutine,
-       PVOID                   Context,
-       BOOLEAN                 InvokeOnSuccess,
-       BOOLEAN                 InvokeOnError,
-       BOOLEAN                 InvokeOnCancel
-       );
-*/
-/*
-VOID
-IoSetNextIrpStackLocation (
-       PIRP    Irp
-       );
-*/
-/*
- * FUNCTION:  Determines the size of an IRP
- * ARGUMENTS: 
- *           StackSize = number of stack locations in the IRP
- * RETURNS: The size of the IRP in bytes 
- */
-/*
-USHORT
-IoSizeOfIrp (
-       CCHAR   StackSize
-       );
-*/
-#if 0
-// Preliminary guess
-NTKERNELAPI
-NTSTATUS
-IoQueryFileVolumeInformation (
-       IN      PFILE_OBJECT            FileObject,
-       IN      FS_INFORMATION_CLASS    FsInformationClass,
-       IN      ULONG                   Length,
-       OUT     PVOID                   FsInformation,
-       OUT     PULONG                  ReturnedLength
-       );
-#endif
+
 
 #endif /* ndef _INCLUDE_DDK_IOFUNCS_H */