Hello,
I've written a library that uses the Video For Windows interface a long time ago. Back then, I didn't realize that interfaces were defined and that the functions were "C wrappers" so I used the C functions. I.e. I've been using AVIFileOpen instead of IAVIFile interface.
I am trying to migrate to C++/CLI now and I am having a problem. My class looks something like:
ref class MyVfw {
public: IAVIFile *iavf;
};
However, this creates the error:
error C2664: 'AVIFileOpenW' : cannot convert parameter 1 from 'cli::interior_ptr<Type>' to 'PAVIFILE *'
since the CLR wants to manage the pointer and AVIFileOpen knows nothing about that. Now, using pin_ptr<> every time I use a VFW function is really ugly in my opinion and hence was trying to use the COM interface directly.
I tried to use tlbimp with avifile32.dll but it didnt seem to like the DLL.
Is there any way I can use IAVIFile and the rest of the interfaces in .NET using a kind of COM Interop
Thanks in advance,
Georgios

Interop and Video For Windows
Rahu
Is that still an issue
Thanks, Ayman Shoukry VC++ Teamlumakar_challa
Have you taken a look at the Marshal class
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref11/html/T_System_Runtime_InteropServices_Marshal_Members.htm
http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.marshal.aspx