Yeah, the problem was that I did not
call MmProbeAndLockPages(). Now it
works fine.
Thanks a lot.
TdiBuildInternalDeviceControlIrp() paritially sets up
the I/O stack location of the underlying driver in the
IRP allocated.But it does not format the I/O stack
location according to the TDI_xxx expections.
The following psuedo code is for the Tdisend.
pIrp = TdiBuildInternalDeviceControlIrp(
TDI_SEND_DATAGRAM,
pDeviceObject,
pFileObject,
NULL,
NULL);
//Allocate an MDL of the size of the Message Length.
//Probe and Lock the pages
//See the DDK doc for the following function
TdiBuildSendDatagram(
pIrp,
pDeviceObject,
pFileObject,
NULL,//IoCompletionRoutine
NULL,//Context
pMDL,//MDL allocate above
Length,//Length of the buffer to be send
SendDataramInfo,//specify the remote address
);
//Now Initialze the event as notification
//Do the following if you have passed the last 2
parameters of TdiBuildInternalXXX as NULL.
pIrp->UserEvent = &kevent;
pIrp->UserIosb = &ioStatus;
//Call the lower driver.
IoCallDriver.
Yeah You are right that Event Parameter initalizes the
IRP event.
This I have told incase you have not initialize the
event(means pass NULL in the event field).
Hope it helps.
Gurpreet
— “Messerman, Gregory” <gregory.messerman>
wrote:
> No, I don’t call any TdiBuildXxx() in between.
>
> Doesn’t the Event parameter of
> TdiBuildInternalDeviceControlIrp()
> do the same, i.e. initializes the Irp’s event?
>
> Thanks
> Gregory
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of
> Gurpreet Anand
> Sent: Thursday, March 16, 2000 12:49 AM
> To: File Systems Developers
> Subject: [ntfsd] Re: TDI filter driver question
>
>
> Hi,
> Are you making a call to another TdiBuildXXx
> functions
> such as TdiBuildSendDatagram before calling
> IoCallDriver().
> Also initialize the Irp before calling IoCallDriver
> as:
> pIrp->UserEvent = &Event;
> Hope it helps.
> Gurpreet
>
> — xxxxx@usa.net wrote:
> > Hi,
> >
> > In a TDI filter driver, I’m trying to determine on
> > which local address an
> > application sets a notification event. Having a
> file
> > object passed to
> > SET_EVENT_HANDLER, I build an IRP using
> > TdiBuildInternalDeviceControlIrp()
> > /TdiBuildQueryInformation() and call the
> underlying
> > TDI driver via
> > IoCallDriver(). However, as soon as it’s done,I
> get
> > a bugcheck with
> > PFN_LIST_CORRUPT. Can somebody explain to me
> what’s
> > going on here?
> >
> > Thanks in advance.
> >
> > Gregory.
> >
> >
> >
>
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1</gregory.messerman>