请教关于wmi and acpi
在MS提供的acpimof.mof文件里定义了两个class,分别如下:class Package
{
[WmiDataId(1),
read, write,
Description("16 bytes of data")
] uint8 Bytes;
};
[WMI,
Dynamic,
Provider("WmiProv"),
Locale("MS\\0x409"),
Description("Class to test Query/Set a package"),
guid("{ABBC0F6a-8EA1-11d1-00A0-C90629100000}")
]
class AcpiTest_QSPackage
{
string InstanceName;
boolean Active;
[WmiDataId(1),
read, write,
Description("description")
] Package Data;
};
请教各位大侠,如果我想得到 packge 类型的Data 是不是用:
hres = pSvc->ExecQuery(
bstr_t("WQL"),
bstr_t("SELECT * FROM AcpiTest_QSPackage"),
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&pEnumerator);
HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
&pclsObj, &uReturn);
hr = pclsObj->Get(L"Data", 0, &vtProp, 0, 0);
如果是的话,我下一步要怎么操作vtProp?
单个的数或者字符串能得到,就是不知道怎么得到这种package类型的数,这个问题困扰了好几天了,望知道的大侠能指点小弟。谢谢了! 方法之一:在Package已知长度的情况下,使用固定长度的数组。
页:
[1]