Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Custom OIDs for WMI in NDIS miniport driver

2 views
Skip to first unread message

Anves...@gmail.com

unread,
Jul 7, 2008, 3:40:00 PM7/7/08
to
Hi Experts,
I am trying to add custom OIDs for WMI testing in my NDIS miniport
driver.
I have created MOF file describing the classes and defined and handled
the all the custom OIDs in driver.
I couldn't see my WMI classes in Wbemtest application after loading
the driver. When i try to enumerate the classes I am getting Invalid
Class error. I took the sample from WDK version 6000. The sample is
NDIS/e100bex.
All the WMI standard OIDs I can enumerate except my custom OIDs and
respective classes.

I have seen many posts WRT NDIS Miniport custom OIDs, I haven't found
useful information for on only custom NDIS Miniport OIDs. I hope
somebody will definately help me to get rid of this problem.

Thanks in advance, Your valuable advices/suggestions are always
appreciable.

Anvesh

Pavel A.

unread,
Jul 7, 2008, 6:57:40 PM7/7/08
to
Have you actually built and installed this driver?

--PA


<Anves...@gmail.com> wrote in message
news:cc33bae3-7737-4689...@8g2000hse.googlegroups.com...

Anves...@gmail.com

unread,
Jul 8, 2008, 7:34:56 PM7/8/08
to
On Jul 7, 3:57 pm, "Pavel A." <pave...@NOwritemeNO.com> wrote:
> Have you actually built and installed this driver?
>
> --PA
>
> <Anvesh1...@gmail.com> wrote in message
> > Anvesh- Hide quoted text -
>
> - Show quoted text -

Yes, I have Built and successfully installed the driver.
I din't get you? whats that mean?
I have a NDIS miniport driver working fine without WMI support.
I just started adding WMI stuff with help of E100BEX sample in DDK.
Am I doing something wrong? How can i add WMI support in my Ndis
miniport driver?
Can you suggest me something? How to deal with custom GUIDs?

Thanks in advance

Anvesh


Maxim S. Shatskih

unread,
Jul 9, 2008, 2:32:38 PM7/9/08
to
I think there was some OID which needs to return the table of WMI ID -> OID
mapping, after which WMI queries are translated to NdisRequest using this
table.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com

<Anves...@gmail.com> wrote in message
news:877e3373-e572-42ca...@34g2000hsh.googlegroups.com...

Anves...@gmail.com

unread,
Jul 9, 2008, 3:15:43 PM7/9/08
to
On Jul 9, 11:32 am, "Maxim S. Shatskih" <ma...@storagecraft.com>
wrote:

>     I think there was some OID which needs to return the table of WMI ID -> OID
> mapping, after which WMI queries are translated to NdisRequest using this
> table.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> ma...@storagecraft.comhttp://www.storagecraft.com
>

Hi,
Yes there is an OID called OID_GEN_SUPPORTED_GUIDS which maps all
custom GUIDs with custom IODs.
I traced into the driver, it has created and all GUIDs are mapped with
respective OIDs.
Still I could not see these classes available in WMI CIM studio OR
'wbemtest' application, I get 'Invalid class' error.
thanks in advance.

anvesh

Pavel A.

unread,
Jul 9, 2008, 4:13:34 PM7/9/08
to
IIRC, registration of the driver's WMI data occurs
when the NDIS successfully starts the driver first time.

--PA


"Maxim S. Shatskih" <ma...@storagecraft.com> wrote in message
news:#J66rIf4...@TK2MSFTNGP02.phx.gbl...

Anves...@gmail.com

unread,
Jul 9, 2008, 7:07:31 PM7/9/08
to
On Jul 9, 1:13 pm, "Pavel A." <pave...@NOwritemeNO.com> wrote:
> IIRC, registration of the driver's WMI data occurs
> when the NDIS successfully starts the driver first time.
>
> --PA
>
> "Maxim S. Shatskih" <ma...@storagecraft.com> wrote in messagenews:#J66rIf4...@TK2MSFTNGP02.phx.gbl...

>
>
>
> >    I think there was some OID which needs to return the table of WMI ID ->
> > OID
> > mapping, after which WMI queries are translated to NdisRequest using this
> > table.
>
> > --
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > ma...@storagecraft.com
> >http://www.storagecraft.com
>
> > I just started adding WMI stuff with help ofE100BEXsamplein DDK.

> > Am I doing something wrong?  How can i add WMI support in my Ndis
> > miniport driver?
> > Can you suggest me something? How to deal with custom GUIDs?
>
> > Thanks in advance
>
> > Anvesh- Hide quoted text -
>
> - Show quoted text -

Hi Pavel,
Could you explain me more in detail, when exactly WMI registration
will be done for Ndis Miniport driver and How it will be done.
I am seeing some of the calls are successful such as
OID_GEN_SUPPORTED_LIST and OID_GEN_SUPPORTED_GUID are successful and
returned the list of supported OIDs as well as supported GUIDs.

Anvesh

Pavel A.

unread,
Jul 10, 2008, 4:38:51 PM7/10/08
to
<Anves...@gmail.com> wrote in message
news:7835b964-7f8b-4471...@i76g2000hsf.googlegroups.com...

> On Jul 9, 1:13 pm, "Pavel A." <pave...@NOwritemeNO.com> wrote:
>> IIRC, registration of the driver's WMI data occurs
>> when the NDIS successfully starts the driver first time.
>>
>> --PA

> Hi Pavel,


> Could you explain me more in detail, when exactly WMI registration
> will be done for Ndis Miniport driver and How it will be done.
> I am seeing some of the calls are successful such as
> OID_GEN_SUPPORTED_LIST and OID_GEN_SUPPORTED_GUID are successful and
> returned the list of supported OIDs as well as supported GUIDs.
>
> Anvesh

Hope somebody will correct me, I haven't touched the WMI stuff for a
while...

- First, you write the MOF describing your custom objects.
It contains the GUIDs for these objects. See file e100.mof in the example.

- The mof gets compiled to binary (.bmf) by makefile.inc.
The resulting bmf is then linked into the .sys file: see e100.rc.

- When the driver starts, NDIS detects presense of your WMI stuff
as the driver responds to OID_GEN_SUPPORTED_GUIDS.
It extracts the BMF from your sys file, and patches it into the WMI
plumbing.

IMHO this could be a bit easier, though.

Regards,
--PA

0 new messages