Ndis 6 and WMI

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi

I want to set some properties in my NDIS6 miniport driver through WMI.
I created a mof file which contain the following:
class MyClassName
{
[key, read]
string InstanceName;

[read]
boolean Active;

[WmiDataId(1),
write,
] uint8 command;
};

In the miniport I handle the custom oid in the MiniportSetInformation
method (
The MiniportOidRequest callback of my miniport forward the request to
MiniportSetInformation
if the request type is NdisRequestSetInformation)

I also generated a VBS using wmimofck to test it.
The script contain the line:
Set enumSet = Service.InstancesOf ("MyClassName");

When I run the script I see that the request type in the OID_REQUEST
the miniport gets is
NdisRequestQueryStatistics and so it is not handled (since the
miniport expect it to have type of NdisRequestSetInformation) .

If I want to handle only WMI Set command (not Query) for this class,
do I still have to support the custom oid
request type both with type NdisRequestSetInformation and
NdisRequestQueryStatistics?
I thought that since NDIS knows how many devices the driver has it can
answer the script line:
Service.InstancesOf ("MyClassName");
without the help of the miniport.

So should I handle the custom oid both in my MiniportSetInformation
and MiniportQueryInformation?
Should I add the read qualifier to the class decleration in the MOF
file (currently its only write)?


Thanks
Miki

.