I have a WDM driver that is a WMI provider. Everything works fine if
its methods report output parameters such as uint8. But I need a
method to report a binary array. If I simply change a uint8 output
parameter to a fixed length array of uint8's, then when my Win32 C++
app calls IWbemClassObject->Get to get the output data from
ExecMethod, it succeeds but the varaint is type VT_NULL (note the
CIMTYPE reported by this call on the other hand seems
accurate--VT_ARRAY|VT_UI1). I can't figure out how to access the array
returned because all I get is VT_NULL. Below is the Win32 Get call and
the MOF. Is there something special that needs done to pass arrays?
Any suggestions?
_variant_t v;
CIMTYPE CimType;
HRESULT hRes = OutParms->Get(_bstr_t(L"Info"), 0, &v, &CimType, 0);
---------------
[Description("Test API"), WMI, Dynamic, Provider("WMIProv"),
guid("{692BFCA9-9EEB-45d7-8621-4E59D993DB90}"), locale("MS\\0x409")]
class TestApi
{
[key, read]
string InstanceName;
[read]
boolean Active;
[WmiMethodId(1), Implemented, Description("Get Info")]
void GetInfo([out, Description("Information")] uint8 Info[4]);
};