I tried to my source filter (written in un-managed c++, tested and working perfectly in unmanaged application) to the WebCamPlayer sample instead of the web camera capture filter.
The filter is added correctly (it found it OK), it has a custom control of the following
public unsafe interface IID_ILvmSourceControl
int GetAudioPort(IntPtr pAudioPort);
int SetAudioPort([In, MarshalAs(UnmanagedType.U2)] UInt16 AudioPort);
i found the interface correctly and also called the GetAudioPort method but getting garbage result,
Furthermore if calling the SetAudioPort twice , the second one raises an exception of 'writing to protected memory'
Am i doing something wrong ??