Event notification in ScsiMiniport driver

Hi all,

How do I send an event up from my Scsiminiport driver? The DDK says that I
can use
ScsiPortNotification (WMIEvent,…)
However, there is this phrase in the document “A miniport that is registered
as a WMI data provider can call ScsiPortNotification with WMIEvent for
which it has previously received an enable request.”
I never receive an Enable request. Does that mean I cannot just send event?

Thank You
Vu

The event is enabled whenever there’s a WMI consumer listening for it.
There’s no point really in raising an event for which there isn’t a
listener.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vu Nguyen
Sent: Wednesday, March 17, 2004 2:11 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Event notification in ScsiMiniport driver

Hi all,

How do I send an event up from my Scsiminiport driver? The DDK says
that I can use ScsiPortNotification (WMIEvent,…) However, there is
this phrase in the document “A miniport that is registered as a WMI data
provider can call ScsiPortNotification with WMIEvent for which it has
previously received an enable request.”
I never receive an Enable request. Does that mean I cannot just send
event?

Thank You
Vu


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

Hi,

Is there a way to test (Capture) the event being sent by the scsiMiniport
driver?

Thank You
Vu

“Peter Wieland” wrote in message
news:xxxxx@ntdev…
The event is enabled whenever there’s a WMI consumer listening for it.
There’s no point really in raising an event for which there isn’t a
listener.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Vu Nguyen
Sent: Wednesday, March 17, 2004 2:11 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Event notification in ScsiMiniport driver

Hi all,

How do I send an event up from my Scsiminiport driver? The DDK says
that I can use ScsiPortNotification (WMIEvent,…) However, there is
this phrase in the document “A miniport that is registered as a WMI data
provider can call ScsiPortNotification with WMIEvent for which it has
previously received an enable request.”
I never receive an Enable request. Does that mean I cannot just send
event?

Thank You
Vu


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

Write a test app that consumes your wmi event. What are you actually trying
to accomplish here?

=====================
Mark Roddy

-----Original Message-----
From: Vu Nguyen [mailto:xxxxx@pacificdigital.com]
Sent: Wednesday, March 17, 2004 7:29 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Event notification in ScsiMiniport driver

Hi,

Is there a way to test (Capture) the event being sent by the
scsiMiniport driver?

Thank You
Vu

“Peter Wieland” wrote in
> message news:xxxxx@ntdev…
> The event is enabled whenever there’s a WMI consumer listening for it.
> There’s no point really in raising an event for which there
> isn’t a listener.
>
> -p
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Vu Nguyen
> Sent: Wednesday, March 17, 2004 2:11 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Event notification in ScsiMiniport driver
>
> Hi all,
>
> How do I send an event up from my Scsiminiport driver? The
> DDK says that I can use ScsiPortNotification (WMIEvent,…)
> However, there is this phrase in the document “A miniport
> that is registered as a WMI data provider can call
> ScsiPortNotification with WMIEvent for which it has
> previously received an enable request.”
> I never receive an Enable request. Does that mean I cannot
> just send event?
>
> Thank You
> Vu
>
>
>
> —
> 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:
> xxxxx@stratus.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

Hi Mark,

I used the TempConsummer application in the SDK sample, with modification,
to test my driver. The goal is to send a message to an application when
there is something wrong with the device.
The sample application is very simple and I modified it to wait for message
from my class in the mof file.
I also tried the WMI tools that come with the SDK, but there is no success.
Is there any rules to receive event from WMI Provider?

Thank you

Vu

“Roddy, Mark” wrote in message news:xxxxx@ntdev…
> Write a test app that consumes your wmi event. What are you actually
trying
> to accomplish here?
>
>
> =====================
> Mark Roddy
>
>
> > -----Original Message-----
> > From: Vu Nguyen [mailto:xxxxx@pacificdigital.com]
> > Sent: Wednesday, March 17, 2004 7:29 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] Event notification in ScsiMiniport driver
> >
> > Hi,
> >
> > Is there a way to test (Capture) the event being sent by the
> > scsiMiniport driver?
> >
> > Thank You
> > Vu
> >
> > “Peter Wieland” wrote in
> > message news:xxxxx@ntdev…
> > The event is enabled whenever there’s a WMI consumer listening for it.
> > There’s no point really in raising an event for which there
> > isn’t a listener.
> >
> > -p
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Vu Nguyen
> > Sent: Wednesday, March 17, 2004 2:11 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] Event notification in ScsiMiniport driver
> >
> > Hi all,
> >
> > How do I send an event up from my Scsiminiport driver? The
> > DDK says that I can use ScsiPortNotification (WMIEvent,…)
> > However, there is this phrase in the document “A miniport
> > that is registered as a WMI data provider can call
> > ScsiPortNotification with WMIEvent for which it has
> > previously received an enable request.”
> > I never receive an Enable request. Does that mean I cannot
> > just send event?
> >
> > Thank You
> > Vu
> >
> >
> >
> > —
> > 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:
> > xxxxx@stratus.com To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
>

I finally got the answer for my problem “How to send an event from a Scsi
Miniport driver to the user mode application”
Once you have done it, it is simple. However, without help and reading the
DDK, it’s a pain in the neck.
I wrote this just to save someone like me trying to search for help in the
future.
To send an Event from a ScsiMiniport, you need to use the function

ScsiPortWmiFireAdapterEvent(
pDevEx,
&EventGuid,
0,
sizeof (pDevEx->WmiEventWs.EventData),
&pDevEx->WmiEventWs
);
The rest is pretty much straight forward from the ddk and the sample. I
don’t know why the DDK never
mentions this function in sending WMI event!

Vu

“Vu Nguyen” wrote in message
news:xxxxx@ntdev…
> Hi all,
>
> How do I send an event up from my Scsiminiport driver? The DDK says that
I
> can use
> ScsiPortNotification (WMIEvent,…)
> However, there is this phrase in the document “A miniport that is
registered
> as a WMI data provider can call ScsiPortNotification with WMIEvent for
> which it has previously received an enable request.”
> I never receive an Enable request. Does that mean I cannot just send
event?
>
> Thank You
> Vu
>
>
>