RE: Sharing Events with a User mode Application contd.... (StreamClass)

It may bugcheck at DISPATCH_LEVEL if the 3rd parameter (wait) is TRUE.

Calvin Guan Software Engineer
ATI Technologies Inc. www.ati.com

-----Original Message-----
From: Doron Holan [mailto:xxxxx@windows.microsoft.com]
Sent: January 5, 2005 5:52 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Sharing Events with a User mode Application
contd…(StreamClass)

You should be able to set the event at dispatch, I have done exactly
this in the past (in another driver stack, not stream class). Are you
sure you have a valid PKEVENT pointer and there is still an outstanding
reference on it so it is still valid?

What exactly is the bugcheck code and parameters?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Saurabh Tangri
Sent: Wednesday, January 05, 2005 2:46 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Sharing Events with a User mode Application
contd…(StreamClass)

I created an event in a user mode and sent it to a
streamclass kernel mode driver using set
property.(IKsproperty interface)

Then get a handle to it by calling
ObReferenceObjectByHandle(…)

When I set this event in kernel mode the user app
responds to it.But the problem is the driver is not
always able to dereference the handle as it doesnt
always get the SRB_CLOSE_instance.

Also a problem with this approach is that when
KeSetEvent is called it has to stay at passive level.
Otherwise I get a Bugcheck(Dispatch level).
Which means calling KelowerIrql??and that is something
risky…

Is there a safe and reliable way to share events in a
streamclass driver with user mode application ??


Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Nope I have at false.
KeSetEvent(UserEvent, IO_NO_INCREMENT, FALSE);

and in user app where i created the event it is
m_userevent=CreatEvent(NULL,FALSE,FALSE,NULL)

Thanks for all the help

— Calvin Guan wrote:

> It may bugcheck at DISPATCH_LEVEL if the 3rd
> parameter (wait) is TRUE.
> -
> Calvin Guan Software Engineer
> ATI Technologies Inc. www.ati.com
>
> -----Original Message-----
> From: Doron Holan
> [mailto:xxxxx@windows.microsoft.com]
> Sent: January 5, 2005 5:52 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Sharing Events with a User mode
> Application
> contd…(StreamClass)
>
> You should be able to set the event at dispatch, I
> have done exactly
> this in the past (in another driver stack, not
> stream class). Are you
> sure you have a valid PKEVENT pointer and there is
> still an outstanding
> reference on it so it is still valid?
>
> What exactly is the bugcheck code and parameters?
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf
> Of Saurabh Tangri
> Sent: Wednesday, January 05, 2005 2:46 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Sharing Events with a User mode
> Application
> contd…(StreamClass)
>
> I created an event in a user mode and sent it to a
> streamclass kernel mode driver using set
> property.(IKsproperty interface)
>
> Then get a handle to it by calling
> ObReferenceObjectByHandle(…)
>
> When I set this event in kernel mode the user app
> responds to it.But the problem is the driver is not
> always able to dereference the handle as it doesnt
> always get the SRB_CLOSE_instance.
>
> Also a problem with this approach is that when
> KeSetEvent is called it has to stay at passive
> level.
> Otherwise I get a Bugcheck(Dispatch level).
> Which means calling KelowerIrql??and that is
> something
> risky…
>
> Is there a safe and reliable way to share events in
> a
> streamclass driver with user mode application ??
>
>
>
>
>
>
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown
> lmsubst tag argument: ‘’
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com


Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com