sh_roohani
December 10th, 2005, 08:56 AM
Hello,
I'm using DirectX 8.1, actually the DirectShow portion, in Visual C++ 6.0. Among its VB samples, there is a Trimmer sample which uses ISmartRenderEngine as follows:
Dim objSmartRenderEngine As New SmartRenderEngine
I try to imitate the same thing in C++:
hr = CoCreateInstance(CLSID_SmartRenderEngine, NULL, CLSCTX_INPROC_SERVER, IID_ISmartRenderEngine, (void**)&m_pRenderer);
and m_pRenderer is declared as follows:
ISmartRenderEngine *m_pRenderer;
So far, it compiles fine. But as soon as I try to imitate this statement:
objSmartRenderEngine.SetTimelineObject objTimeline
as:
hr = m_pRenderer->SetTimelineObject(m_pTimeline);
it does not compile. The Error message is:
error C2039: 'SetTimelineObject' : is not a member of 'ISmartRenderEngine'
Isn't the VB version using the same function of the same interface, that is, ISmartRenderEngine::SetTimelineObject?
The same problem happens to ConnectFrontEnd, GetFilterGraph, GetGroupOutputPin, and ScrapIt.
In fact, these functions are not really exposed by ISmartRenderEngine, but by IRenderEngine. But I'm wondering how ISmartRenderEngine::SetTimelineObject is used in the VB sample and compiles fine, but it doesn't compile in VC++ 6.0!
Shouldn't COM objects work the same way in all environments which support COM?
Regards,
Shahram
I'm using DirectX 8.1, actually the DirectShow portion, in Visual C++ 6.0. Among its VB samples, there is a Trimmer sample which uses ISmartRenderEngine as follows:
Dim objSmartRenderEngine As New SmartRenderEngine
I try to imitate the same thing in C++:
hr = CoCreateInstance(CLSID_SmartRenderEngine, NULL, CLSCTX_INPROC_SERVER, IID_ISmartRenderEngine, (void**)&m_pRenderer);
and m_pRenderer is declared as follows:
ISmartRenderEngine *m_pRenderer;
So far, it compiles fine. But as soon as I try to imitate this statement:
objSmartRenderEngine.SetTimelineObject objTimeline
as:
hr = m_pRenderer->SetTimelineObject(m_pTimeline);
it does not compile. The Error message is:
error C2039: 'SetTimelineObject' : is not a member of 'ISmartRenderEngine'
Isn't the VB version using the same function of the same interface, that is, ISmartRenderEngine::SetTimelineObject?
The same problem happens to ConnectFrontEnd, GetFilterGraph, GetGroupOutputPin, and ScrapIt.
In fact, these functions are not really exposed by ISmartRenderEngine, but by IRenderEngine. But I'm wondering how ISmartRenderEngine::SetTimelineObject is used in the VB sample and compiles fine, but it doesn't compile in VC++ 6.0!
Shouldn't COM objects work the same way in all environments which support COM?
Regards,
Shahram