I encounter the following error in my application sometimes.
Message: Marshaler restriction: Excessively long string.
StackTrace: at System.RuntimeType.CreateInstanceImpl(Boolean
publicOnly)
at
System.Activator.CreateInstance(Type type, Boolean nonPublic)
I think the error happens at about here in my code
CleanUp()
comtype = Type.GetTypeFromCLSID(Clsid.FilterGraph)
comobj = Activator.CreateInstance(comtype)
graphBuilder = CType(comobj, IGraphBuilder)
hr = graphBuilder.RenderFile(media, Nothing)
m_objMediaControl = CType(graphBuilder, IMediaControl)
m_objVideoWindow = CType(graphBuilder, IVideoWindow)
m_objVideoWindow.put_Owner(Me.Handle)
m_objVideoWindow.put_WindowStyle(1073741824 Or 33554432)
m_objVideoWindow.SetWindowPosition(Me.ClientRectangle.Left,
Me.ClientRectangle.Top, Me.ClientRectangle.Width,
Me.ClientRectangle.Height)
m_objMediaControl.Run()