I've been looking for an example of how to implement IUnknown in C#, but haven't found any decent references or solutions to this.
Should it be as simple as...
public interface IUnknown
{
UInt32 AddRef();
UInt32 QueryInterface([In] IntPtr riid, [Out] IntPtr ppvObject);
UInt32 Release();
}
...or is there more to it?
Why would you want to implement IUnknown? That's a COM interface. If you want to interoperate with COM, use the .Net/COM bridge, which implements IUnknown for you.