CoCreateInstance Problem
Hello there !
I am creating an application which contains multiple graphs. Also I have a Directshow Filter which I intend to use in many graphs simultaneously. I am using CoCreateInstance() to create instance of my filter. In second instance (ie. my other graph with same filter is still running.) CoCreateInstance eighter does not return or it returns 0x8000ffff error.
Can anybody please tell me what is happening here and corrective action I can take ?
Thank you,
What is the filter you are creating multiple instances of?
If it is a hw device (ie a camera), you aren't going to be able to add it to multiple graphs this way.
LGS at 2007-8-30 >

DirectX Error Lookup (find it in the DirectX SDK / Utilities) gives us this info:
HRESULT: 0x8000ffff (2147549183)
Name: E_UNEXPECTED
Description: Catastrophic failure
Severity code: Failed
Facility Code: FACILITY_NULL (0)
Error Code: 0xffff (65535)
Can not help any more, but sounds as if you either has a problem with the installation or some parameter is completely wrong.
There isn't anything inherent in DS that would prevent you from creating multiple instances of a filter. It would have to be something the filter is doing itself.
Other than the obvious (set breakpoints inside your filter and trace), I'm not sure what other advice I can offer.
If you don't have source, things get harder. I spose you could try things like oh, regmon or filemon to see what it's doing, but your odds of success are pretty low.
LGS at 2007-8-30 >

The problem was really stupid.
"Threading Model" key was missing from registry. Once I added the key and set value to "Apartment", it started working.
I am kicking myself for overlooking this.
Anyways, Thank you very much everybody.