// query the filter graph manager for ifiltergraph2.
ifiltergraph2 *pfg2 = null;
hr = pgraph->queryinterface(iid_ifiltergraph2, (void**)&pfg2);
if (succeeded(hr))
{
hr = pfg2->addsourcefilterformoniker(pmoniker, 0, l"source", &psrc);
pfg2->release();
}
cotaskmemfree(strname);
}
// if successful, remember to release psrc.
2 filter mapper