Hello,
I have a filter driver which in the presence of certain other filter
drivers does not return from IoCallDriver in XP but is working fine in
2000 / NT. Please point me to any documentation of handling STATUS_PENDING
in XP or what could be wrong with the code below in the dispatch of
create.
******************
PtrNextIoStackLocation = IoGetNextIrpStackLocation(Irp);
*PtrNextIoStackLocation = *PtrCurrentStackLocation;
IoSetCompletionRoutine(Irp,CompletionRoutine,
LocalContext,TRUE,TRUE,TRUE);
IoMarkIrpPending(Irp);
RC = IoCallDriver(PtrTargetDeviceObject, Irp);
return STATUS_PENDING;
********************************
Regards,
Dinesh
Read Walter Oney’s book, or the Viscarola & Mason book, or the OSR website
and DDK documentation. This is not the correct way to copy one stack
location to the next.
----- Original Message -----
From: “Dinesh Sinha”
To: “File Systems Developers”
Sent: Tuesday, April 15, 2003 4:28 PM
Subject: [ntfsd] STATUS PENDING IN XP
> Hello,
> I have a filter driver which in the presence of certain other filter
> drivers does not return from IoCallDriver in XP but is working fine in
> 2000 / NT. Please point me to any documentation of handling STATUS_PENDING
> in XP or what could be wrong with the code below in the dispatch of
> create.
>
> PtrNextIoStackLocation = IoGetNextIrpStackLocation(Irp);
> *PtrNextIoStackLocation = *PtrCurrentStackLocation;
> IoSetCompletionRoutine(Irp,CompletionRoutine,
> LocalContext,TRUE,TRUE,TRUE);
> IoMarkIrpPending(Irp);
> RC = IoCallDriver(PtrTargetDeviceObject, Irp);
> return STATUS_PENDING;
>**************
> Regards,
> Dinesh
>
> —
> You are currently subscribed to ntfsd as: xxxxx@yoshimuni.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
The effect of IoCopyCurrentStackLocationToNext + IoSetCompletionRoutine is
the same as the code below.
Read Walter Oney’s book, or the Viscarola & Mason book, or the OSR website and
DDK documentation. This is not the correct way to copy one stack location to
the next.
> PtrNextIoStackLocation = IoGetNextIrpStackLocation(Irp);
> *PtrNextIoStackLocation = *PtrCurrentStackLocation;
> IoSetCompletionRoutine(Irp,CompletionRoutine,
> LocalContext,TRUE,TRUE,TRUE);
> IoMarkIrpPending(Irp);
> RC = IoCallDriver(PtrTargetDeviceObject, Irp);
> return STATUS_PENDING;
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
How about Context? It is set in the macro. It might matter otherwise zero
it out?
----- Original Message -----
From: “Dejan Maksimovic”
To: “File Systems Developers”
Sent: Tuesday, April 15, 2003 6:03 PM
Subject: [ntfsd] Re: STATUS PENDING IN XP
>
> The effect of IoCopyCurrentStackLocationToNext +
IoSetCompletionRoutine is
> the same as the code below.
>
> > Read Walter Oney’s book, or the Viscarola & Mason book, or the OSR
website and
> > DDK documentation. This is not the correct way to copy one stack
location to
> > the next.
> > > PtrNextIoStackLocation = IoGetNextIrpStackLocation(Irp);
> > > *PtrNextIoStackLocation = *PtrCurrentStackLocation;
> > > IoSetCompletionRoutine(Irp,CompletionRoutine,
> > > LocalContext,TRUE,TRUE,TRUE);
> > > IoMarkIrpPending(Irp);
> > > RC = IoCallDriver(PtrTargetDeviceObject, Irp);
> > > return STATUS_PENDING;
>
> –
> Kind regards, Dejan M. MVP for DDK
> http://www.alfasp.com E-mail: xxxxx@alfasp.com
> Alfa Transparent File Encryptor - Transparent file encryption services.
> Alfa File Protector - File protection and hiding library for Win32
developers.
> Alfa File Monitor - File monitoring library for Win32 developers.
>
>
>
>
> —
> You are currently subscribed to ntfsd as: xxxxx@yoshimuni.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
IoSetCompletionRoutine sets the Context. And both have that.
How about Context? It is set in the macro. It might matter otherwise zero
it out?
–
Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32 developers.
Alfa File Monitor - File monitoring library for Win32 developers.
Thanks Dejan and David for your responses.
I will try to make the description more elaborate if it helps.
The other driver in question is Norton Antivirus version 9.00.68b.
- When I trace a create call to a file “1.txt”, it first comes to our
filter driver. I call IoCallDriver and return STATUS_PENDING as shown in
my first mail. But the call does not return from IoCallDriver immediately. - Another Create call comes to me. It does appear to be generated from
the driver below my driver (probably norton antivirus). - If I again call IoCallDriver and return STATUS_PENDING, it hangs. If I
return STATUS_SUCCESS without setting any completion routine, things work
fine. In this case, I see a return from IoCallDriver in this step as well
as the IoCallDriver described in step 1.
Regards,
Dinesh