public CcwWrapper Wrap(IntPtr unknown, Guid iid, int functionCount) { IntPtr comInterface; var result = Marshal.QueryInterface(unknown, ref iid, out comInterface); if (result != 0) throw new COMException("QueryInterface failed.", result); var wrapper = new CcwWrapper(comInterface, functionCount); wrappers.Add(iid, wrapper); return wrapper; }
public CcwWrapper Wrap(IntPtr unknown, Guid iid, int functionCount) { IntPtr comInterface; var result = Marshal.QueryInterface(unknown, ref iid, out comInterface); if (result != 0) { throw new COMException("QueryInterface failed.", result); } var wrapper = new CcwWrapper(comInterface, functionCount); wrappers.Add(iid, wrapper); return(wrapper); }
public CcwHook(IDisposable comObject, CcwWrapper wrapper, CcwWrappers wrappers) : this(comObject, wrapper.Wrapper, wrapper.Original, wrappers) { }