soviet_bloke
Thu Dec 28 16:46:53 CST 2006
> >Well if you don't do an inverted call, you have to have another way to
> >support the asynchronous notifications, you could use an event but then you
> >don't get the arguments,
>
>
> Or just keep polling the certian piece of code
> (IOCTL_READ_xxx/file/registry key).
Sorry, but making an app poll driver is really a no-brain
solution......
Concerning events, using them *MAY* be justified is some rare cases.
For example, let's say your driver's actions depend on app's response,
and driver has to process things synchronously, i.e. it cannot return
STATUS_PENDING and proceed with the request at some later point (for
instance, it has to ask user permission within a callback that either
allows or disallows some action). In such case you *MAY* consider using
events. However, even in this scenario, there is no guarantee that
using events is always better than making an the inverse call - again,
everything depends on the particular situation.
Concerning the OP's situation, the whole thing should *DEFINITELY* be
handled as an inverse call - any other solution is just unreasonable in
this situation.....
Anton Bassov
Ali wrote:
> Don Burn wrote:
> > "Ali" <abdulrazaq@gmail.com> wrote in message
> > news:1167314153.495680.305080@a3g2000cwd.googlegroups.com...
> > >> So having code to track creates and file objects (since multiple app's
> > >> could call your driver), and tracking that all the bytes of the
> > >> parameters
> > >> have been passed (I sure don't know what parameters the app is supposed
> > >> to
> > >> pass for the kernel mode callback function) is easier than taking some
> > >> boilerplate code from an example an using it? You didn't address at all
> > >> how the user is supposed to get back the results from the asynchronous
> > >> callbacks. Sorry, but this suggestion is not simple.
> > >>
> > >>
> > >> --
> > >> Don Burn (MVP, Windows DDK)
> > >> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> > >>
http://www.windrvr.com
> > >> Remove StopSpam from the email to reply
> > >
> > > Ok! i understand. Yeah, in multiple apps case there will be a problem
> > > BUT how about if there will be the only one to manipulate? Do you still
> > > think that inverted call is worth coding than proposed solution?
> >
> > Well if you don't do an inverted call, you have to have another way to
> > support the asynchronous notifications, you could use an event but then you
> > don't get the arguments, have to worry about multiple callbacks and queuing
> > them or otherwise handling them and the exiting of processes etc.
> >
> > In this case I know that the inverted call is the simplest, since I have
> > supported the Ps callbacks for customers in simple drivers, including an
> > idiot who insisted on events (the invent based version was four times the
> > size of the inverted call!!!!).
> >
> >
> > --
> > Don Burn (MVP, Windows DDK)
> > Windows 2k/XP/2k3 Filesystem and Driver Consulting
> >
http://www.windrvr.com
> > Remove StopSpam from the email to reply
>
>
>
> snip:
> >Well if you don't do an inverted call, you have to have another way to
> >support the asynchronous notifications, you could use an event but then you
> >don't get the arguments,
>
>
> Or just keep polling the certian piece of code
> (IOCTL_READ_xxx/file/registry key).
>
>
>
> ali