CoCreateInstance
-
I'm testing a DirectShow Filter I'm including this code to initialize an COM object hr = CoCreateInstance(CLSID_MPEGFilter, NULL, CLSCTX_INPROC_SERVER,IID_IBaseFilter, (void **)&m_pMPEGWriter); I have included the header in my application so it compile ok. But I get a link error error LNK2001: unresolved external symbol CLSID_MPEGFilter - How can I know if the object has been registered? - I don't see any .lib to include just couple of DLL Any idea what I can be doing wrong? :doh: Thak You Hector
-
I'm testing a DirectShow Filter I'm including this code to initialize an COM object hr = CoCreateInstance(CLSID_MPEGFilter, NULL, CLSCTX_INPROC_SERVER,IID_IBaseFilter, (void **)&m_pMPEGWriter); I have included the header in my application so it compile ok. But I get a link error error LNK2001: unresolved external symbol CLSID_MPEGFilter - How can I know if the object has been registered? - I don't see any .lib to include just couple of DLL Any idea what I can be doing wrong? :doh: Thak You Hector
In the Debug Watch window type "hr,hr" and you will see the description of error. Nevertheless, don't forget to call CoInitialize(NULL); Dudi
-
In the Debug Watch window type "hr,hr" and you will see the description of error. Nevertheless, don't forget to call CoInitialize(NULL); Dudi
-
I can not go to de Debug Window at least I have an executable so I have to fix the link error first. Am I correct?
I think that you didn't understand me. CoCreateInstance returns HRESULT. you defined hr variable as HRESULT. Typing "hr,hr" in the Debug Watch window shows the error description.
-
I'm testing a DirectShow Filter I'm including this code to initialize an COM object hr = CoCreateInstance(CLSID_MPEGFilter, NULL, CLSCTX_INPROC_SERVER,IID_IBaseFilter, (void **)&m_pMPEGWriter); I have included the header in my application so it compile ok. But I get a link error error LNK2001: unresolved external symbol CLSID_MPEGFilter - How can I know if the object has been registered? - I don't see any .lib to include just couple of DLL Any idea what I can be doing wrong? :doh: Thak You Hector
Maybe if you use the
#pragma import
directove on the DLL that has the MPEG filter class object in it, then your unresolved external will go away. No shirt, no shoes, no brains, no service.