public uint CreateInstance(IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObject) { if (riid == Guids.IID_IUnknown || riid == Guids.IID_IInternetProtocolInfo) { IInternetProtocolInfo p = new QuokkaProtocolHandler(_embeddedResourceMap); ppvObject = Marshal.GetComInterfaceForObject(p, typeof(IInternetProtocolInfo)); return(HRESULT.S_OK); } if (riid == Guids.IID_IInternetProtocolRoot) { IInternetProtocolRoot p = new QuokkaProtocolHandler(_embeddedResourceMap); ppvObject = Marshal.GetComInterfaceForObject(p, typeof(IInternetProtocolRoot)); return(HRESULT.S_OK); } if (riid == Guids.IID_IInternetProtocol) { IInternetProtocol p = new QuokkaProtocolHandler(_embeddedResourceMap); ppvObject = Marshal.GetComInterfaceForObject(p, typeof(IInternetProtocol)); return(HRESULT.S_OK); } ppvObject = IntPtr.Zero; return(HRESULT.E_NOINTERFACE); }
public uint CreateInstance(IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObject) { if (riid == Guids.IID_IUnknown || riid == Guids.IID_IInternetProtocolInfo) { IInternetProtocolInfo p = new QuokkaProtocolHandler(_embeddedResourceMap); ppvObject = Marshal.GetComInterfaceForObject(p, typeof (IInternetProtocolInfo)); return HRESULT.S_OK; } if (riid == Guids.IID_IInternetProtocolRoot) { IInternetProtocolRoot p = new QuokkaProtocolHandler(_embeddedResourceMap); ppvObject = Marshal.GetComInterfaceForObject(p, typeof (IInternetProtocolRoot)); return HRESULT.S_OK; } if (riid == Guids.IID_IInternetProtocol) { IInternetProtocol p = new QuokkaProtocolHandler(_embeddedResourceMap); ppvObject = Marshal.GetComInterfaceForObject(p, typeof (IInternetProtocol)); return HRESULT.S_OK; } ppvObject = IntPtr.Zero; return HRESULT.E_NOINTERFACE; }