// obtain a class enumerator for the video compressor category.
ienummoniker *penumcat = null;
hr=psysdevenum->createclassenumerator(clsid_videocompressorcategory, &penumcat, 0);
if (hr == s_ok)
{
// enumerate the monikers.
imoniker *pmoniker = null;
ulong cfetched;
while(penumcat->next(1, &pmoniker, &cfetched) == s_ok)
{
ipropertybag *ppropbag;
hr = pmoniker->bindtostorage(0, 0, iid_ipropertybag,
(void **)&ppropbag);//知道设备的名称
if (succeeded(hr))
{
// to retrieve the filter's friendly name, do the following:
variant varname;
variantinit(&varname);