Hi,

I'm totally new at this, so please forgive the basic question.

I am attempting to modify a TDI filter driver so that it communicates
with
a user mode application to do some processing of the data.
Based on the application's response, the driver will change some of
the data before forwarding on the rest as usual.

It seems that I can share the data with the app by making
DeviceIoControl() calls to pass in a buffer to the driver to fill in
and then for the app to send its response after it has completed its
analysis.

An article, http://www.osronline.com/article.cfm?id=108, suggested
using named events created by the app to control access to shared
buffers, so I attempted to incorporate that.

My problem is that the driver, while it's fetching the data, can't
seem to wait on a named event. However, if I stick in a
KeWaitForSingleObject() within the handler for the command sent by
DeviceIoControl(), it seemed OK.

Does this sound like the right approach? What am I missing?

Thanks for any help.
V

Re: Newbie Q : TDI driver communicating with user app? by Thomas

Thomas
Thu Apr 29 19:32:11 CDT 2004

Use DeviceIoControl unless you have unusual requirement.

Thomas F. Divine
http://www.pcausa.com

"vb user" <vb@burton.mailshell.com> wrote in message
news:9db23c06.0404291458.1513986b@posting.google.com...
> Hi,
>
> I'm totally new at this, so please forgive the basic question.
>
> I am attempting to modify a TDI filter driver so that it communicates
> with
> a user mode application to do some processing of the data.
> Based on the application's response, the driver will change some of
> the data before forwarding on the rest as usual.
>
> It seems that I can share the data with the app by making
> DeviceIoControl() calls to pass in a buffer to the driver to fill in
> and then for the app to send its response after it has completed its
> analysis.
>
> An article, http://www.osronline.com/article.cfm?id=108, suggested
> using named events created by the app to control access to shared
> buffers, so I attempted to incorporate that.
>
> My problem is that the driver, while it's fetching the data, can't
> seem to wait on a named event. However, if I stick in a
> KeWaitForSingleObject() within the handler for the command sent by
> DeviceIoControl(), it seemed OK.
>
> Does this sound like the right approach? What am I missing?
>
> Thanks for any help.
> V



Re: Newbie Q : TDI driver communicating with user app? by vb

vb
Fri Apr 30 10:16:58 CDT 2004

Thanks for responding. I'm sorry if I was unclear. I AM indeed using
DeviceIoControl.... or at least trying to. :p

The issue I'm having is trying to synchronize access to the buffer
passed through DeviceIoControl. The thread (?) that's the TDI filter
can't seem to wait on a named event created by the application without
causing a blue screen

V

"Thomas F. Divine [DDK MVP]" <tdivine@NOpcausaSPAM.com> wrote in message news:<#Ku5hqkLEHA.2592@tk2msftngp13.phx.gbl>...
> Use DeviceIoControl unless you have unusual requirement.
>
> Thomas F. Divine
> http://www.pcausa.com
>
> "vb user" <vb@burton.mailshell.com> wrote in message
> news:9db23c06.0404291458.1513986b@posting.google.com...
> > Hi,
> >
> > I'm totally new at this, so please forgive the basic question.
> >
> > I am attempting to modify a TDI filter driver so that it communicates
> > with
> > a user mode application to do some processing of the data.
> > Based on the application's response, the driver will change some of
> > the data before forwarding on the rest as usual.
> >
> > It seems that I can share the data with the app by making
> > DeviceIoControl() calls to pass in a buffer to the driver to fill in
> > and then for the app to send its response after it has completed its
> > analysis.
> >
> > An article, http://www.osronline.com/article.cfm?id=108, suggested
> > using named events created by the app to control access to shared
> > buffers, so I attempted to incorporate that.
> >
> > My problem is that the driver, while it's fetching the data, can't
> > seem to wait on a named event. However, if I stick in a
> > KeWaitForSingleObject() within the handler for the command sent by
> > DeviceIoControl(), it seemed OK.
> >
> > Does this sound like the right approach? What am I missing?
> >
> > Thanks for any help.
> > V

Re: Newbie Q : TDI driver communicating with user app? by Thomas

Thomas
Fri Apr 30 11:25:16 CDT 2004

You do NOT need a named event to use DeviceIoControl. Study asynchronous
device I/O. Study the DDK samples under src\general - such as the "ioctl"
sample (and the others).

Thomas F. Divine
http://www.rawether.net


"vb user" <vb@burton.mailshell.com> wrote in message
news:9db23c06.0404300716.796338aa@posting.google.com...
> Thanks for responding. I'm sorry if I was unclear. I AM indeed using
> DeviceIoControl.... or at least trying to. :p
>
> The issue I'm having is trying to synchronize access to the buffer
> passed through DeviceIoControl. The thread (?) that's the TDI filter
> can't seem to wait on a named event created by the application without
> causing a blue screen
>
> V
>
> "Thomas F. Divine [DDK MVP]" <tdivine@NOpcausaSPAM.com> wrote in message
news:<#Ku5hqkLEHA.2592@tk2msftngp13.phx.gbl>...
> > Use DeviceIoControl unless you have unusual requirement.
> >
> > Thomas F. Divine
> > http://www.pcausa.com
> >
> > "vb user" <vb@burton.mailshell.com> wrote in message
> > news:9db23c06.0404291458.1513986b@posting.google.com...
> > > Hi,
> > >
> > > I'm totally new at this, so please forgive the basic question.
> > >
> > > I am attempting to modify a TDI filter driver so that it communicates
> > > with
> > > a user mode application to do some processing of the data.
> > > Based on the application's response, the driver will change some of
> > > the data before forwarding on the rest as usual.
> > >
> > > It seems that I can share the data with the app by making
> > > DeviceIoControl() calls to pass in a buffer to the driver to fill in
> > > and then for the app to send its response after it has completed its
> > > analysis.
> > >
> > > An article, http://www.osronline.com/article.cfm?id=108, suggested
> > > using named events created by the app to control access to shared
> > > buffers, so I attempted to incorporate that.
> > >
> > > My problem is that the driver, while it's fetching the data, can't
> > > seem to wait on a named event. However, if I stick in a
> > > KeWaitForSingleObject() within the handler for the command sent by
> > > DeviceIoControl(), it seemed OK.
> > >
> > > Does this sound like the right approach? What am I missing?
> > >
> > > Thanks for any help.
> > > V