ABOUT..........IRP_MJ_DIRECTORY_CONTROL

I got some problems when I trap IRP_MJ_DIRECTORY_CONTROL request…

I need, directories information, the exactly information is a list of
files and dir names at this directory, just like a command DIR .

An idea , is trap IRP_MJ_DIRECTORY_CONTROL with minor function
IRP_MN_QUERY_DIRECTORY…

but if I trap when go down, don’t have any information… of course… I
need to trap at completion routine… but I have these porblems…

1- When a IRP go down I debug, FileInformationClass, and result is OK,
for example =3, FileBothDirectoryInformation…, BUT at completion
routine FileInformationClass, not is a known class, it takes a big
number… and I don’t know what happend?..

2-Supose that I catch a nice FileInformationClass, how can I obtain
names of files and dirs that have this directory… I Know that
information comes in Irp->UserBuffer, and your size in
IrpSp->Parameters.QueryDirectory.Length… , the information class
FileBothDirectory is the most used when I run DIR command…
I need to type cast Irp->UserBuffer to a corresponding Struct, but I
dont find any struct with this information and how manage
Irp->UserBuffer…
can anybody say me this information…?

My idea is catch At completion routine
IrpSp->Parameters.QueryDirectory.Length and make a cicle making type
cast to BUFFER with this struct type, and increment pointer buffer, I
supose that in this buffer comes a list of all names of result if DIR
command…or not…?

If somebody can send me a piece of code that sample this, please I will
expecting

Moises


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I got some problems when I trap IRP_MJ_DIRECTORY_CONTROL request…

I need, directories information, the exactly information is a list of
files and dir names at this directory, just like a command DIR .

An idea , is trap IRP_MJ_DIRECTORY_CONTROL with minor function
IRP_MN_QUERY_DIRECTORY…

but if I trap when go down, don’t have any information… of course… I
need to trap at completion routine… but I have these porblems…

1- When a IRP go down I debug, FileInformationClass, and result is OK,
for example =3, FileBothDirectoryInformation…, BUT at completion
routine FileInformationClass, not is a known class, it takes a big
number… and I don’t know what happend?..

2-Supose that I catch a nice FileInformationClass, how can I obtain
names of files and dirs that have this directory… I Know that
information comes in Irp->UserBuffer, and your size in
IrpSp->Parameters.QueryDirectory.Length… , the information class
FileBothDirectory is the most used when I run DIR command…
I need to type cast Irp->UserBuffer to a corresponding Struct, but I
dont find any struct with this information and how manage
Irp->UserBuffer…
can anybody say me this information…?

My idea is catch At completion routine
IrpSp->Parameters.QueryDirectory.Length and make a cicle making type
cast to BUFFER with this struct type, and increment pointer buffer, I
supose that in this buffer comes a list of all names of result if DIR
command…or not…?

If somebody can send me a piece of code that sample this, please I will
expecting

Moises


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

MessageTo understand how the buffer is built, I would look at the FAT code
in the IFS kit. Here you can see how the buffer is put together based upon
the different information class types. As for processing the information in
your completion routine, pass in a context pointer that contains a pointer
to the user buffer which will contain the needed information …

Pete
Peter Scott
xxxxx@KernelDrivers.com
http://www.KernelDrivers.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Moises Herrera Vazquez
Sent: Monday, October 08, 2001 8:58 AM
To: File Systems Developers
Subject: [ntfsd] ABOUT…IRP_MJ_DIRECTORY_CONTROL

I got some problems when I trap IRP_MJ_DIRECTORY_CONTROL request…

I need, directories information, the exactly information is a list of
files and dir names at this directory, just like a command DIR .

An idea , is trap IRP_MJ_DIRECTORY_CONTROL with minor function
IRP_MN_QUERY_DIRECTORY…

but if I trap when go down, don’t have any information… of course… I
need to trap at completion routine… but I have these porblems…

1- When a IRP go down I debug, FileInformationClass, and result is OK, for
example =3, FileBothDirectoryInformation…, BUT at completion routine
FileInformationClass, not is a known class, it takes a big number… and I
don’t know what happend?..

2-Supose that I catch a nice FileInformationClass, how can I obtain names
of files and dirs that have this directory… I Know that information comes
in Irp->UserBuffer, and your size in
IrpSp->Parameters.QueryDirectory.Length… , the information class
FileBothDirectory is the most used when I run DIR command…
I need to type cast Irp->UserBuffer to a corresponding Struct, but I dont
find any struct with this information and how manage
Irp->UserBuffer…
can anybody say me this information…?

My idea is catch At completion routine
IrpSp->Parameters.QueryDirectory.Length and make a cicle making type cast to
BUFFER with this struct type, and increment pointer buffer, I supose that
in this buffer comes a list of all names of result if DIR command…or
not…?

If somebody can send me a piece of code that sample this, please I will
expecting

Moises


You are currently subscribed to ntfsd as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

MessageNobody promised you the values in Parameters.QueryDirectory.xxx will be still valid in the completion routine.
Also - the filled buffer size is Irp->IoStatus.Information, not IrpSp->Parameters.QueryDirectory.Length.

Max

----- Original Message -----
From: Moises Herrera Vazquez
To: File Systems Developers
Sent: Monday, October 08, 2001 6:58 PM
Subject: [ntfsd] ABOUT…IRP_MJ_DIRECTORY_CONTROL

I got some problems when I trap IRP_MJ_DIRECTORY_CONTROL request…

I need, directories information, the exactly information is a list of files and dir names at this directory, just like a command DIR .

An idea , is trap IRP_MJ_DIRECTORY_CONTROL with minor function IRP_MN_QUERY_DIRECTORY…

but if I trap when go down, don’t have any information… of course… I need to trap at completion routine… but I have these porblems…

1- When a IRP go down I debug, FileInformationClass, and result is OK, for example =3, FileBothDirectoryInformation…, BUT at completion routine FileInformationClass, not is a known class, it takes a big number… and I don’t know what happend?..

2-Supose that I catch a nice FileInformationClass, how can I obtain names of files and dirs that have this directory… I Know that information comes in Irp->UserBuffer, and your size in IrpSp->Parameters.QueryDirectory.Length… , the information class FileBothDirectory is the most used when I run DIR command…
I need to type cast Irp->UserBuffer to a corresponding Struct, but I dont find any struct with this information and how manage
Irp->UserBuffer…
can anybody say me this information…?

My idea is catch At completion routine IrpSp->Parameters.QueryDirectory.Length and make a cicle making type cast to BUFFER with this struct type, and increment pointer buffer, I supose that in this buffer comes a list of all names of result if DIR command…or not…?

If somebody can send me a piece of code that sample this, please I will expecting

Moises


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I still with my problem I can’t catch any information at
completion routine,

How can I obtain this information?

///// my quiestions

I got some problems when I trap IRP_MJ_DIRECTORY_CONTROL
request…

I need, directories information, the exactly information is a
list of files and dir names at this directory, just like a command DIR .

An idea , is trap IRP_MJ_DIRECTORY_CONTROL with minor function
IRP_MN_QUERY_DIRECTORY…

but if I trap when go down, don’t have any information… of
course… I need to trap at completion routine… but I have these
porblems…

1- When a IRP go down I debug, FileInformationClass, and result
is OK, for example =3, FileBothDirectoryInformation…, BUT at
completion routine FileInformationClass, not is a known class, it takes
a big number… and I don’t know what happend?..

2-Supose that I catch a nice FileInformationClass, how can I
obtain names of files and dirs that have this directory… I Know that
information comes in Irp->UserBuffer, and your size in
IrpSp->Parameters.QueryDirectory.Length… , the information class
FileBothDirectory is the most used when I run DIR command…
I need to type cast Irp->UserBuffer to a corresponding Struct,
but I dont find any struct with this information and how manage
Irp->UserBuffer…
can anybody say me this information…?

My idea is catch At completion routine
IrpSp->Parameters.QueryDirectory.Length and make a cicle making type
cast to BUFFER with this struct type, and increment pointer buffer, I
supose that in this buffer comes a list of all names of result if DIR
command…or not…?

If somebody can send me a piece of code that sample this,
please I will expecting

Moises



You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com