NDIS 6.0 miniport driver WMI method support

Hi All,

I am working on a project to implement the WMI support for our NDIS 6.0 miniport driver. The WMI client app will use it to set/get the NIC configuration and execute some function.

The WDK document seems not quite clear about the WMI Method operation. How do I filling in an NDIS_GUID Structure when register my OID/GUID in order to support a class with property and method like this one:

class Flash
{
[key, read]
string InstanceName;

[read]
boolean Active;

[read, Description(“Size”),
WmiDataId(1)] uint32 Size;

[
Implemented,
WmiMethodId(1)
]
void ReadFlash(
[in] uint32 Address,
[in] uint32 Length,
[out] uint32 ReturnLength,
[out, WmiSizeIs(“ReturnLength”)]
uint8 Data,
[out] uint32 Status
);
}

I should set the GUID to this class GUID and OID to my definition of Flash OID. But how about the size and flag? I figure out from ndis header that there is flag for method fNDIS_GUID_METHOD but it is not mentioned in WDK document:
http://msdn.microsoft.com/en-us/library/aa504021.aspx
And what about size field, the document does not mention it either for the method case. I set to class’s properties total size or -1, it does not help. I did not see the my driver’s OidRequestHandler func called when my WMI client call IWbemServices::CreateInstanceEnum to enumarate the “Flash” class. If it is regular class with property only, I can see the OidRequestHandler function is called. I guess I am missing something when filling the NDIS_GUID structure.

Another question is how the Windows WMI components maps the method input and output parameters to the miniport OidRequestHandler function’s NdisRequest->DATA.METHOD_INFORMATION parameter. This parameter has InformationBuffer which is for both input buffer and output buffer. I can have several input parameters and output results with any type data, ULONG, array, variable length buffer from the WMI method. But how does my driver parse these information just from the single input buffer InformationBuffer? Or these parameters are passed in/out in some other place?

I don’t see the WDK and SDK documents mentions these topics for WMI method operation. Any input is appreciated!

Thanks a lot!

William