I am trying to write a small library that will use DirectShow. This library should be used by the .NET application, so I thought it was best to write it in C ++ / CLI.
I am having problems with this line:
HRESULT hr = CoCreateInstance( CLSID_FilterGraph,
NULL,
CLSCTX_INPROC_SERVER,
IID_IGraphBuilder,
(void**)(&graphBuilder) );
Where graphBuilderannounced:
public ref class VideoPlayer
{
public:
VideoPlayer();
void Load(String^ filename);
IGraphBuilder* graphBuilder;
};
If I understand this page correctly , I can use it */&, as usual, to indicate "native" pointers to unmanaged memory in my C ++ / CLI Library; ^used to indicate a pointer to a managed entity. However, this code creates:
error C2440: 'type cast': cannot convert from 'cli :: interior_ptr' to 'void **'
, graphBuilder 'cli::interior_ptr<Type>'. / , ? . , - ). , , graphBuilder "" ?
( , , pin_ptr, , )