I am sorry but I have to ask again. I am searching since many weeks and month for a solution now. The Problem is that have implemented a COM-Interface the throws only by calling a few methods an InvalidCast Exception E_NOINTERFACE and it tells me that I have to implement IUnknown. So how can I do that?
I tried nearly everything... Currently I have something like this
[ComImport,
Guid("279AFA85-4981-11CE-A521-0020AF0BE560"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
System.Security.SuppressUnmanagedCodeSecurity]
public interface IDirectSoundBuffer : IUnknown
{
...
[ComImport]
[Guid("00000000-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IUnknown
{
void QueryInterface([In] ref Guid giid, [Out, MarshalAs(UnmanagedType.IUnknown, IidParameterIndex = 0)] out object ppvObject);
[PreserveSig]
uint AddRef();
[PreserveSig]
uint Release();
}
I really don t know what I could try more. I had on many different forums a topic discussing this but noboboy knows anything :(( pls help me.