//IGraphBuilder *pGB = NULL;
IEnumPins *pEnumPins ;
IBaseFilter *pVR ;
IPin *pPin;
ULONG ul ;
PIN_DIRECTION pd ;
int j;
hr = pGB->FindFilterByName(L"MPEG Video Codec", &pVR) ;
hr = pVR->EnumPins(&pEnumPins) ;
while(pEnumPins->Next(1, &pPin, &ul)==S_OK)
{
for(j=0;j<ul;j++)
{
pPin->QueryDirection(&pd) ;
if(pd==PINDIR_INPUT)
RETAILMSG(1, (TEXT ("the pin is input type/r/n")));
else
RETAILMSG(1, (TEXT ("the pin is output type/r/n")));
}
}
pEnumPins->Release() ;