呵呵我有一个小问题事实上我希望能够看到我插入的设备列表我想在 MessageBox() 中首先看到它们但是这个变体让我很恼火 (^_^) 我尝试了很多方法但没有结果
IMoniker *tmpMonk=NULL;
ULONG done;
VARIANT varName;
while(this->deviceClassEnum->Next(1,&tmpMonk,&done)==S_OK)
{
IPropertyBag *tmpBag=NULL;
tmpMonk->BindToStorage(0,0,IID_IPropertyBag,(void **)&tmpBag);
VariantInit(&varName);
checkIt(tmpBag->Read(L"FriendlyName",&varName,0));
// this i wana see what is inside but huuuuuuuuuuuuuh
MessageBox(this->app,TEXT((LPCSTR)varName.bstrVal),"",NULL);
VariantClear(&varName);
tmpBag->Release();
}
其次如何能够从设备切换到另一个。从任何菜单或列表