Hi,
the DDK documentation says:
"Input parameters:
The Parameters.SetFile.FileInformationClass member is set to
FileEndOfFileInformation or FileAllocationInformation.
Headers:
Defined in wdm.h and ntddk.h. Include wdm.h or ntddk.h."
However “FileAllocationInformation” is not defined in “wdm.h” but it is in
“ntddk.h”.
Since I’m using “wdm.h” how can I get the definition ? Or is it an error in
the documentation ?
Copy-paste the definition from NTDDK.H
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Nicolas Mugnier”
Newsgroups: ntdev
To: “Windows System Software Developers Interest List”
Sent: Thursday, August 14, 2003 4:33 PM
Subject: [ntdev] IRP_MJ_SET_INFORMATION (Serial)
> Hi,
>
> the DDK documentation says:
>
> “Input parameters:
> The Parameters.SetFile.FileInformationClass member is set to
> FileEndOfFileInformation or FileAllocationInformation.
>
> Headers:
> Defined in wdm.h and ntddk.h. Include wdm.h or ntddk.h.”
>
> However “FileAllocationInformation” is not defined in “wdm.h” but it is in
> “ntddk.h”.
> Since I’m using “wdm.h” how can I get the definition ? Or is it an error in
> the documentation ?
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Well that shouldn’t be the right answer, should it? If you are tempted to
copy pieces of ntddk.h, you might want to consider using ntddk.h rather than
wdm.h.
I hate to open the following can o’worms (well not really, actually I enjoy
it, but that is simply because I don’t have a life,) but if you aren’t
targeting the obsolete 'Dos98 or Windows MiniMe, why user wdm.h at all?
=====================
Mark Roddy
Hollis Technology Solutions
www.hollistech.com
xxxxx@hollistech.com
DDK MVP
-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Thursday, August 14, 2003 10:14 AM
To: Windows System Software Developers Interest List
Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
Copy-paste the definition from NTDDK.H
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Nicolas Mugnier”
Newsgroups: ntdev
To: “Windows System Software Developers Interest List”
Sent: Thursday, August 14, 2003 4:33 PM
Subject: [ntdev] IRP_MJ_SET_INFORMATION (Serial)
> Hi,
>
> the DDK documentation says:
>
> “Input parameters:
> The Parameters.SetFile.FileInformationClass member is set to
> FileEndOfFileInformation or FileAllocationInformation.
>
> Headers:
> Defined in wdm.h and ntddk.h. Include wdm.h or ntddk.h.”
>
> However “FileAllocationInformation” is not defined in “wdm.h” but it
> is in “ntddk.h”. Since I’m using “wdm.h” how can I get the definition
> ? Or is it an error in the documentation ?
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
Are you out of your mind? The worst disasters in drivers come from hacked
includes like this.
Either use ntddk.h and recognize you are going to be running on Windows
2000/XP/2003 only, or do not use the field since you cannot be sure it is
supported in Win9x.
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
----- Original Message -----
From: “Maxim S. Shatskih”
To: “Windows System Software Developers Interest List”
Sent: Thursday, August 14, 2003 10:14 AM
Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
> Copy-paste the definition from NTDDK.H
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “Nicolas Mugnier”
> Newsgroups: ntdev
> To: “Windows System Software Developers Interest List”
> Sent: Thursday, August 14, 2003 4:33 PM
> Subject: [ntdev] IRP_MJ_SET_INFORMATION (Serial)
>
>
> > Hi,
> >
> > the DDK documentation says:
> >
> > “Input parameters:
> > The Parameters.SetFile.FileInformationClass member is set to
> > FileEndOfFileInformation or FileAllocationInformation.
> >
> > Headers:
> > Defined in wdm.h and ntddk.h. Include wdm.h or ntddk.h.”
> >
> > However “FileAllocationInformation” is not defined in “wdm.h” but it is
in
> > “ntddk.h”.
> > Since I’m using “wdm.h” how can I get the definition ? Or is it an error
in
> > the documentation ?
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@acm.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com
I have assumed the question to be NT-only.
For NT OSes, it is OK to copy-paste the function declarations from NTDDK.H and
even NTIFS.H.
Not so with Win9x.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Don Burn”
To: “Windows System Software Developers Interest List”
Sent: Thursday, August 14, 2003 6:24 PM
Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
> Are you out of your mind? The worst disasters in drivers come from hacked
> includes like this.
> Either use ntddk.h and recognize you are going to be running on Windows
> 2000/XP/2003 only, or do not use the field since you cannot be sure it is
> supported in Win9x.
>
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>
> ----- Original Message -----
> From: “Maxim S. Shatskih”
> To: “Windows System Software Developers Interest List”
> Sent: Thursday, August 14, 2003 10:14 AM
> Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
>
>
> > Copy-paste the definition from NTDDK.H
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > ----- Original Message -----
> > From: “Nicolas Mugnier”
> > Newsgroups: ntdev
> > To: “Windows System Software Developers Interest List”
>
> > Sent: Thursday, August 14, 2003 4:33 PM
> > Subject: [ntdev] IRP_MJ_SET_INFORMATION (Serial)
> >
> >
> > > Hi,
> > >
> > > the DDK documentation says:
> > >
> > > “Input parameters:
> > > The Parameters.SetFile.FileInformationClass member is set to
> > > FileEndOfFileInformation or FileAllocationInformation.
> > >
> > > Headers:
> > > Defined in wdm.h and ntddk.h. Include wdm.h or ntddk.h.”
> > >
> > > However “FileAllocationInformation” is not defined in “wdm.h” but it is
> in
> > > “ntddk.h”.
> > > Since I’m using “wdm.h” how can I get the definition ? Or is it an error
> in
> > > the documentation ?
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@acm.org
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
As far as I am concerned it never makes any sense to do so, roughly wdm.h is
a subset of ntddk.h which is a subset of ntifs.h (Microsoft at this years
WinHEC announced they will truly make them so, i.e. wdm.h will be included
in ntddk.h which will be included in ntifs.h in the future).
I have seen too many kludges where someone took out pieces from an include
to and shoved them in to ever think this is good. What is next poor
unsuspecting driver writer to do, when:
- Microsoft adds the function to WDM.h that you hard coded in?
- Microsoft changes the function you hard coded in?
- The developer needs enough else to change wdm.h to ntddk.h, and
then hits all your hard coded crap?
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
----- Original Message -----
From: “Maxim S. Shatskih”
To: “Windows System Software Developers Interest List”
Sent: Thursday, August 14, 2003 11:27 AM
Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
> I have assumed the question to be NT-only.
>
> For NT OSes, it is OK to copy-paste the function declarations from NTDDK.H
and
> even NTIFS.H.
>
> Not so with Win9x.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “Don Burn”
> To: “Windows System Software Developers Interest List”
> Sent: Thursday, August 14, 2003 6:24 PM
> Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
>
>
> > Are you out of your mind? The worst disasters in drivers come from
hacked
> > includes like this.
> > Either use ntddk.h and recognize you are going to be running on Windows
> > 2000/XP/2003 only, or do not use the field since you cannot be sure it
is
> > supported in Win9x.
> >
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >
> > ----- Original Message -----
> > From: “Maxim S. Shatskih”
> > To: “Windows System Software Developers Interest List”
> > Sent: Thursday, August 14, 2003 10:14 AM
> > Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
> >
> >
> > > Copy-paste the definition from NTDDK.H
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > >
> > > ----- Original Message -----
> > > From: “Nicolas Mugnier”
> > > Newsgroups: ntdev
> > > To: “Windows System Software Developers Interest List”
> >
> > > Sent: Thursday, August 14, 2003 4:33 PM
> > > Subject: [ntdev] IRP_MJ_SET_INFORMATION (Serial)
> > >
> > >
> > > > Hi,
> > > >
> > > > the DDK documentation says:
> > > >
> > > > “Input parameters:
> > > > The Parameters.SetFile.FileInformationClass member is set to
> > > > FileEndOfFileInformation or FileAllocationInformation.
> > > >
> > > > Headers:
> > > > Defined in wdm.h and ntddk.h. Include wdm.h or ntddk.h.”
> > > >
> > > > However “FileAllocationInformation” is not defined in “wdm.h” but it
is
> > in
> > > > “ntddk.h”.
> > > > Since I’m using “wdm.h” how can I get the definition ? Or is it an
error
> > in
> > > > the documentation ?
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@acm.org
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@acm.org
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Not really… I had a case were a user mode program had cut and paste in
the definition for IO_STATUS_BLOCK like so
typedef struct _IO_STATUS_BLOCK {
NTSTATUS Status;
ULONG Information;
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
which will work for 32 bit NT, but is wrong for 64 bit. It should be
typedef struct _IO_STATUS_BLOCK {
union {
NTSTATUS Status;
PVOID Pointer;
};
ULONG_PTR Information;
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
The primary problem was the ULONG should have been a ULONG_PTR, so I was
getting corruption of the user mode stack.
Thanks,
Rob
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-ntdev-
xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Thursday, August 14, 2003 11:27 AM
To: Windows System Software Developers Interest List
Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
I have assumed the question to be NT-only.
For NT OSes, it is OK to copy-paste the function declarations from
NTDDK.H
and
even NTIFS.H.
Not so with Win9x.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Don Burn”
> To: “Windows System Software Developers Interest List”
>
> Sent: Thursday, August 14, 2003 6:24 PM
> Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
>
>
> > Are you out of your mind? The worst disasters in drivers come from
> hacked
> > includes like this.
> > Either use ntddk.h and recognize you are going to be running on
Windows
> > 2000/XP/2003 only, or do not use the field since you cannot be sure
it
> is
> > supported in Win9x.
> >
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >
> > ----- Original Message -----
> > From: “Maxim S. Shatskih”
> > To: “Windows System Software Developers Interest List”
>
> > Sent: Thursday, August 14, 2003 10:14 AM
> > Subject: [ntdev] Re: IRP_MJ_SET_INFORMATION (Serial)
> >
> >
> > > Copy-paste the definition from NTDDK.H
> > >
> > > Maxim Shatskih, Windows DDK MVP
> > > StorageCraft Corporation
> > > xxxxx@storagecraft.com
> > > http://www.storagecraft.com
> > >
> > >
> > > ----- Original Message -----
> > > From: “Nicolas Mugnier”
> > > Newsgroups: ntdev
> > > To: “Windows System Software Developers Interest List”
> >
> > > Sent: Thursday, August 14, 2003 4:33 PM
> > > Subject: [ntdev] IRP_MJ_SET_INFORMATION (Serial)
> > >
> > >
> > > > Hi,
> > > >
> > > > the DDK documentation says:
> > > >
> > > > “Input parameters:
> > > > The Parameters.SetFile.FileInformationClass member is set to
> > > > FileEndOfFileInformation or FileAllocationInformation.
> > > >
> > > > Headers:
> > > > Defined in wdm.h and ntddk.h. Include wdm.h or ntddk.h.”
> > > >
> > > > However “FileAllocationInformation” is not defined in “wdm.h”
but it
> is
> > in
> > > > “ntddk.h”.
> > > > Since I’m using “wdm.h” how can I get the definition ? Or is it
an
> error
> > in
> > > > the documentation ?
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@acm.org
> > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cdp.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Don Burn wrote:
Either use ntddk.h and recognize you are going to be running on Windows
2000/XP/2003 only, or do not use the field since you cannot be sure it is
supported in Win9x.
JFTR* you can run a driver built with ntddk.h on 98/Me too. Just don’t
call functions that 98/Me doesn’t support (or that aren’t in WDMSTUB).
* - Just for the record
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com