I’m not sure who is printing that message in the debugger. You could
try breaking into the debugger at the right time and looking at the
stack to find out. As for your overall problem, I’m not sure. I did
notice some other things in your code however. It’s always good to
clear such things up so they don’t cause you to miss the real problem.
if((wcsstr(tempA.Buffer, L"\logfile")!=NULL) ||
(wcsstr(tempA.Buffer, L"\Pagefile.sys")!=NULL)) {
DbgPrint(“DO not Log: %wZ,”&tempA);
…
ExFreePoolWithTag(tempA.Buffer,‘pmoC’);
return SpyPassThrough( DeviceObject, Irp );
} …
DbgPrint(“BEfore end of SpyWrite”);…
}
What do you return if the file is not logfile or Pagefile.sys? What if
the file names on the system were LOGFILE and PAGEFILE.SYS? I recommend
upper-casing both strings you compare.
Maybe to remove SpyPassThrough from the equation you could just inline
the code…
IoSkipCurrentIrpStackLocation( Irp );
Return IoCallDriver( … );
Adam Landefeld
“This posting is provided “AS IS” with no warranties, and confers no
rights.”
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rohit Dhamija
Sent: Friday, April 30, 2004 10:49 PM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Passing IRP to lower level driver ??
Also, I got this error in SpyPassThrough rotuine:::
////////////
NTSTATUS status;
ASSERT(IS_FILESPY_DEVICE_OBJECT( DeviceObject )); DbgPrint(“\nInside
SpyPassThrough”);
IoCopyCurrentIrpStackLocationToNext( Irp );
IoSetCompletionRoutine( Irp,
MyCompletion,
NULL,
TRUE,
TRUE,
TRUE);
status = IoCallDriver(
((PFILESPY_DEVICE_EXTENSION)DeviceObject->DeviceExtension)-AttachedToDev
iceO
bject, Irp );
DbgPrint(“\nBefore going out of SpyPassThrough”);
return status;
///////////
The exact situation :
- Firstly the executing point was in spywrite
- The i called the dispatch routine to pass on the irp to lower level
- And in spydispatch
The sequence of dbg points are
- Debug pts of spywrite
- DbgPrint(“\nInside SpyPassThrough”);
- DbgPrint(“\nBefore going out of SpyPassThrough”); and then
cmpFileWrite: error exiting -1073741528
and again the control goes to SpyWrite…
Any suggestions are welcome. Please comment!!!
“Rohit Dhamija” wrote in message
news:xxxxx@ntfsd…
> Dear Mr Landefeld,
>
> While I was going through the Debugprints in DbgView I saw following
> line indicating some error:
>
> cmpFileWrite: error exiting -1073741528
>
> I have not put any sort of debug print of the above kind in my
program.
What
> does the above error implies ???
> and what does cmpFileWrite means ??
> Can this may be the reason behind the problem ???
> Regards,
> Rohit
>
> “Adam Landefeld” wrote in message
> news:xxxxx@ntfsd…
> Oh, you also should be checking for failure of ExAllocatePoolWithTag.
>
> What is the state of tempA in this code (ie, Length, MaximumLength)?
> Would your code break if the file name was too long and RtlCopy or
> RtlAppend truncated the name?
>
> Adam Landefeld
> --------------
> “This posting is provided “AS IS” with no warranties, and confers no
> rights.”
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Rohit Dhamija
> Sent: Friday, April 30, 2004 6:22 AM
> To: Windows File Systems Devs Interest List
> Subject: Re:[ntfsd] Passing IRP to lower level driver ??
>
> I have written this part of code in IRP_MJ_WRITE only Can
> IoCallDriver be a reson behind this problem???
>
> “Rohit Dhamija” wrote in message
> news:xxxxx@ntfsd…
> > I am getting the filename using::::
> > /////////////////////////////////////////////////////
> > UNICODE_STRING tempA;
> > irpStack = IoGetCurrentIrpStackLocation( Irp );
> > fileObject = irpStack->FileObject;
> > fileName = &fileObject->FileName;
> > devExt = DeviceObject->DeviceExtension;
> >
> > tempA.MaximumLength = fileName->MaximumLength +
> > devExt->DeviceName.MaximumLength + 2;
> > tempA.Buffer = ExAllocatePoolWithTag(NonPagedPool,
> > tempA.MaximumLength,‘2leD’);
> > RtlCopyUnicodeString(&tempA,&devExt->DeviceName);
> > RtlAppendUnicodeStringToString(&tempA, fileName);
> > /////////////////////////////////////////////////////
> >
> > But I don’t think it may be the cause of problem. Is it so ??? If
> > yes, please please help…
> >
> > “Ladislav Zezula” wrote in message
> news:xxxxx@ntfsd…
> > > How do you get the “tempA”, which you use for comparison ?
> > >
> > > Remember that the filename is valid inside IRP_MJ_CREATE only !!!
> > >
> > > L.
> > >
> >
> >
> >
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as:
> xxxxx@windows.microsoft.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
>
>
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com