I am using the GMFBridge directshow filter from c# and the import library seems to discard the HRESULTs. i.e
[id(5), helpstring("Create render filters in empty render graph")]
HRESULT CreateRenderGraph(
[in] IUnknown* pSourceGraphSinkFilter,
[in] IUnknown* pRenderGraph,
[out, retval] IUnknown** pRenderGraphSourceFilter);
[id(6), helpstring("Connect two graphs")]
HRESULT BridgeGraphs(
[in] IUnknown* pSourceGraphSinkFilter,
[in] IUnknown* pRenderGraphSourceFilter);
is translated (by midl.exe and tlbimp.exe) into:
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(5)]
object CreateRenderGraph([In, MarshalAs(UnmanagedType.IUnknown)] object pSourceGraphSinkFilter, [In, MarshalAs(UnmanagedType.IUnknown)] object pRenderGraph);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(6)]
void BridgeGraphs([In, MarshalAs(UnmanagedType.IUnknown)] object pSourceGraphSinkFilter, [In, MarshalAs(UnmanagedType.IUnknown)] object pRenderGraphSourceFilter);
Other COM libraries I have imported translate returned values as out parameters and preserve the HRESULT return value of the original COM method. Why does this library behave differently? Is it possible to force the other behaviour?
Thanks, Andy