Re: How to register TypeLib for DirectShow filter?

Tech-Archive recommends: Speed Up your PC by fixing your registry



For example, this object might itself hold interface pointers that are
proxies to objects running in STA, or in other process. When you call
this MTA object from STA without marshalling, and as part of its method
implementation it calls through this proxy, the proxy is going to return
RPC_E_WRONG_THREAD error which the object probably doesn't expect.

An MTA object might do some complex processing and take a long time
before returning. This is usually not a problem on MTA thread, but when
you do this from STA your application's UI will freeze. Moreover,
Windows shell might freeze too, e.g. when it uses DDE (which it does
whenever you click, say, a link in your email reader, or double-click a
Word or Excel file).

I see your point. Still it would be nice to be able to force it, when
you know that there cant be any problems. But i suppose it all comes
down to the fact that its a mess creating a DirectShow graph from an
STA thread.

I managed to wriggle out of the whole problem by changing the
interface to the filter. My previous problem was that the filter
called back to C# and in the callback i needed to retrieve some
information from the filter (ie, calling back again in the callback),
which i couldnt because of the COM rules if i let the STA main thread
create the filter graph (and if i made the filter MTA, then the main
thread couldnt finish setting up the graph). I managed to simply avoid
the 'ping-pong' call by having the callback method get the necessary
data as an argument.

Thanks for helping me out.

.



Relevant Pages

  • Re: Getting events from C++?
    ... > Microsoft MVP, MCSD ... >> I'm building a MTA object on top of a STA object. ... >> My question is really an MSVC question as I assume it doesn't matter ...
    (microsoft.public.vc.atl)
  • Re: How to register TypeLib for DirectShow filter?
    ... proxies to objects running in STA, ... An MTA object might do some complex processing and take a long time ... My previous problem was that the filter ... information from the filter (ie, calling back again in the callback), ...
    (microsoft.public.win32.programmer.ole)
  • Re: How to register TypeLib for DirectShow filter?
    ... attribute marks interface as non-marshallable. ... Is there a way to force a direct call from an STA ... thread to an MTA object both residing in the same process? ... this filter. ...
    (microsoft.public.win32.programmer.ole)
  • Re: How to register TypeLib for DirectShow filter?
    ... thread to an MTA object both residing in the same process? ... I know it violates COM rules:) However, ... proxies to objects running in STA, ... Windows shell might freeze too, e.g. when it uses DDE (which it does ...
    (microsoft.public.win32.programmer.ole)
  • Re: Macro to move row from one worksheet to another
    ... STA and STB are in a dedicated column?? ... Create New Sheets from Filtered List -- uses an Advanced Filter to create ... I am recording travel information in one worksheet using a drop down meny ... I fill in 28.10.2006 - Roger Rogerson - STA ...
    (microsoft.public.excel.misc)