Hi,

I have an existing NDIS IM driver which already contains some custom OIDs with their respective MOF definitions, NDIS_GUID entries and so on and they work fine. I can access these values through WMI Object Browser.

I am currently working on extending this driver and part of that work requires me to add a new class in my MOF file for statistical data which I will be generating in the driver. I have been able to copy some of the existing custom OID code to create a new class with a single data item, and that compiles ok, but I would ideally like to have multiple data items in the one class and this is where I've got confused.

My MOF entry looks like this:
Code:
[
	WMI,
	Dynamic,
	Provider("WMIProv"),
	guid("{D9B70AEB-B136-4e9c-A7D6-2AEFFCD854F7}"),
	localeid(0x409),
	WmiExpense(1),
	Description("My Stats")
]
class MyStats
{
	[key,read]
	string InstanceName;           

	[read]
	boolean Active;

	[
		read,
		DisplayName("Counter 1"),
		WmiDataId(1)
	] 
	UINT32 Counter1;
	
	[
		read,
		DisplayName("Counter 2"),
		WmiDataId(2)
	] 
	UINT32 Counter2;
};
but my question is, what do I put in my NDIS_GUID struct to represent this? I was thinking something like:
Code:
{
   MyStatsGuid,
   OID_MY_STATS,
   sizeof(ULONG) + sizeof(ULONG),
   fNDIS_GUID_TO_OID | fNDIS_GUID_ALLOW_READ | fNDIS_GUID_ALLOW_WRITE,
}
But is this right? If this is the case, how do I handle setting each independent value in my MiniportSetInformation routine as I will only be able to switch on OID_MY_STATS surely?

I'd really appreciate some help here, the alternative appears to be putting each value in its own class, but I'm looking at 20-odd values and this seems like a LOT of code, hence the reason I'm investigating this.

Cheers

Richard