我最近用directShow,结果在HRESLULT hr=CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,IID_IGraphBuilder, (void **)&mGraph))的时候,hr的值为-2万多,具体记不清了,请问大家这是怎么回事啊

解决方案 »

  1.   

    CoCreateInstance的返回值MSDN中没有说明吗?
      

  2.   

    MSDN中S_OK 
    An instance of the specified object class was successfully created. 
    REGDB_E_CLASSNOTREG 
    A specified class is not registered in the registration database. Also can indicate that the type of server you requested in the CLSCTX enumeration is not registered or the values for the server types in the registry are corrupt. 
    CLASS_E_NOAGGREGATION 
    This class cannot be created as part of an aggregate. 
    E_NOINTERFACE 
    The specified class does not implement the requested interface, or the controlling IUnknown does not expose the requested interface.