> a. Issue an IOCTL with a buffer of a size to hold a common number of
entries
> b. IOCTL pends in the driver, the user mode program can wait on the
OVERLAPPED event or otherwise test it
Thanks for your inputs Don. I got most of the things which you mean, but
still there are a few doubts related to a) n b)
Here do you mean that, even before i start getting entries in list, i should
issue an ioctl for reading the values (in such a case, the IOCTL will remain
pending till the time it gets entries and returns) or i should better issue
it as soon as the driver signal that “Hey User app: I am having entries,
issue the IOCTL to read these entries”.
There could be another approach in which instead of having an event, i keep
on pinging the driver with IOCTL so as to check if it is having any entries.
Or better yet have multiple IOCTL’s and complete them as needed to get the
data
Here do you mean to say that i issue mutiple calls to the same IOCTL at the
same time so as to get the dynamic list. Timely, as and when i will get
entries, these IOCTLs will return.
I am sorry, but could you please explain me that how can i have so many
IOCTLS pending all the time. Won’t it induce overhead on the system. Is
there any article on OSR which speaks about how to implement it.
Thanks and Regards,
Shreshth
On 6/6/06, Don Burn wrote:
>
> No, you are hung up on not using an IOCTL for an event, consider this
> simple
> model:
>
> a. Issue an IOCTL with a buffer of a size to hold a common number
> of
> entries
> b. IOCTL pends in the driver, the user mode program can wait on the
> OVERLAPPED event or otherwise test it
> c. Items come in, you finish the IOCTL filling in as many entries as
> the buffer will hold and complete it.
> d. Once the application gets the entries it resubmitts the IOCTL, if
> their are entries present the IOCTL is immediately completed with the next
> set of entries, if not it pends
>
> Or better yet have multiple IOCTL’s and complete them as needed to get the
> data
>
> Using events is not going to make things faster, and it is going to make
> things harder (such as what do you do if the application crashes how do
> you
> detect and clean up things? Your idea of using the registry is really
> wrong, there are many problems here, including that the application in the
> end still has to notify the driver it got the data, unless you want to
> fill
> the registry with old entries?
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> http://www.windrvr.com
> Remove StopSpam from the email to reply
>
>
>
>
> “Shreshth Luthra” wrote in message
> news:xxxxx@ntfsd…
> > Hi Gary,
> >
> > In my case, i am having a dynamic list (1 to as many as 100 entries) to
> be
> > sent to the user mode.
> > Which means that i will have to signal the event and then issue an IOCTL
> > to
> > get the number of entries “n” from the driver and then another IOCTL, so
> > as
> > to get each and every entry (“n” entries).
> >
> > I want to do this in some better way.
> > Just think, in case we have some provision of sending data to UserMode
> > along
> > with SetEvent, it will simply retrieve the dynamic list (one entry at a
> > time) and the user mode can process them.
> > I was thinking of dumping it in registry or so (and then user mode with
> > retrieve it from registry), but that too does not seem to be a good
> > approach.
> > About a month back, i had read some similar problem on ntfsd but could
> not
> > find that thread again.
> >
> > Please suggest me what can be done in this case.
> >
> >
> > On 6/6/06, xxxxx@seagate.com wrote:
> >>
> >> The easiest and best way to transact data between user and kernel
> modes
> >> is via an IO request, whether IOCTL or Read/WriteFile, and about as
> fast
> >> as
> >> you can get. Simply hang an IO request on the driver, who pends it
> until
> >> it’s time to use it. When the driver completes it, hang another.
> >>
> >> Gary G. Little
> >> ------------------------------
> >>
> >> From: xxxxx@lists.osr.com [mailto:
> >> xxxxx@lists.osr.com] *On Behalf Of *Shreshth Luthra
> >> Sent: Tuesday, June 06, 2006 8:47 AM
> >> To: Windows File Systems Devs Interest List
> >> Subject: [ntfsd] Event sharing between user mode and Kernel Mode
> >>
> >>
> >>
> >> Hi,
> >>
> >> How do we pass some data along with firing an event from kernel mode to
> >> user mode.
> >>
> >> I was thinking of using KeSetEvent, but there is provision to send some
> >> data along with it.
> >> I do not want to use an IOCTL at that time so as to get data from
> Kernel.
> >> Please show me the way.
> >>
> >>
> >> Thanks and Regards,
> >> Shreshth — Questions? First check the IFS FAQ at
> >> https://www.osronline.com/article.cfm?id=17 You are currently
> subscribed
> >> to ntfsd as: xxxxx@seagate.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: unknown lmsubst tag argument:
> >> ‘’
> >>
> >> 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@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>