Alex prefers that we don't locally define structures that not in the DDK/IFS kit, but that we use the NDK headers.

This change breaks the compilation with the DDK/IFS kit only.

svn path=/trunk/; revision=17643
This commit is contained in:
Hervé Poussineau 2005-09-04 22:12:35 +00:00
parent 8857a8b8fd
commit ce468083d1
2 changed files with 4 additions and 53 deletions

View file

@ -107,7 +107,7 @@ NTSTATUS STDCALL
NpfsCreate(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PEXTENDED_IO_STACK_LOCATION IoStack;
PIO_STACK_LOCATION IoStack;
PFILE_OBJECT FileObject;
PNPFS_PIPE Pipe;
PNPFS_FCB ClientFcb;
@ -118,7 +118,7 @@ NpfsCreate(PDEVICE_OBJECT DeviceObject,
DPRINT("NpfsCreate(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
DeviceExt = (PNPFS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
IoStack = IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
DPRINT("FileObject %p\n", FileObject);
DPRINT("FileName %wZ\n", &FileObject->FileName);
@ -307,7 +307,7 @@ NTSTATUS STDCALL
NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject,
PIRP Irp)
{
PEXTENDED_IO_STACK_LOCATION IoStack;
PIO_STACK_LOCATION IoStack;
PFILE_OBJECT FileObject;
PNPFS_DEVICE_EXTENSION DeviceExt;
PNPFS_PIPE Pipe;
@ -318,7 +318,7 @@ NpfsCreateNamedPipe(PDEVICE_OBJECT DeviceObject,
DPRINT("NpfsCreateNamedPipe(DeviceObject %p Irp %p)\n", DeviceObject, Irp);
DeviceExt = (PNPFS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
IoStack = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
IoStack = IoGetCurrentIrpStackLocation(Irp);
FileObject = IoStack->FileObject;
DPRINT("FileObject %p\n", FileObject);
DPRINT("Pipe name %wZ\n", &FileObject->FileName);

View file

@ -2,56 +2,7 @@
#define __DRIVERS_FS_NP_NPFS_H
#include <ntifs.h>
#if defined(__GNUC__)
#include <ndk/iotypes.h>
#define EXTENDED_IO_STACK_LOCATION IO_STACK_LOCATION
#define PEXTENDED_IO_STACK_LOCATION PIO_STACK_LOCATION
#elif defined(_MSC_VER)
#define STDCALL
#define KEBUGCHECK KeBugCheck
typedef struct _NAMED_PIPE_CREATE_PARAMETERS
{
ULONG NamedPipeType;
ULONG ReadMode;
ULONG CompletionMode;
ULONG MaximumInstances;
ULONG InboundQuota;
ULONG OutboundQuota;
LARGE_INTEGER DefaultTimeout;
BOOLEAN TimeoutSpecified;
} NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS;
typedef struct _EXTENDED_IO_STACK_LOCATION {
/* Included for padding */
UCHAR MajorFunction;
UCHAR MinorFunction;
UCHAR Flags;
UCHAR Control;
union {
struct {
PIO_SECURITY_CONTEXT SecurityContext;
ULONG Options;
USHORT Reserved;
USHORT ShareAccess;
PNAMED_PIPE_CREATE_PARAMETERS Parameters;
} CreatePipe;
} Parameters;
PDEVICE_OBJECT DeviceObject;
PFILE_OBJECT FileObject;
PIO_COMPLETION_ROUTINE CompletionRoutine;
PVOID Context;
} EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
#else
#error Unknown compiler
#endif
typedef struct _NPFS_DEVICE_EXTENSION
{