PDA

View Full Version : LoadConfig error



gyrosandmaronen
July 5, 2007, 14:58:16
I was able to use the function LoadConfig not successfull. The application becam an error, on this function. I use Visual C++ MFC.
My Code

IMVSCFilterGraphPtr graph;
graph = m_controlVideo.GetControlUnknown();

if(graph != NULL)
{
// error
}

HRESULT hr;
CString szPath = "D:\\gerber\\Flight\\all.mvp";

if(graph != NULL)
{

hr = graph->LoadConfig(szPath.AllocSysString());
if(SUCCEEDED(hr))
{

hr = graph->Start(); // start filter graph
}
}
The pointer graph is every time 0.
m_controlVideo is a Membervariable from typ SMVSmartControl.
I worked exactly like the turtorial. Where is the mistake?
Thanke you in advance...
Sorry for my bad english!!!

Best regards

gyros

Marc Cymontkowski
July 14, 2007, 16:29:13
Hi,

I assume the problem is that your Smart Control was never actually created.


Best Regards,

Marc Cymontkowski

Manuel
July 16, 2007, 11:25:59
Hi marc

I hat resolved this problem with the support of Bernd. The problem was, i called the MV Smart Control in the constructer. This is to early. I must called the interface, in the CDialog::OnInitDialog() function.

Best regards

Manuel