Example #1
0
 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;
 }
Example #2
0
        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);
        }
Example #3
0
 public CcwHook(IDisposable comObject, CcwWrapper wrapper, CcwWrappers wrappers)
     : this(comObject, wrapper.Wrapper, wrapper.Original, wrappers)
 {
 }
Example #4
0
 public CcwHook(IDisposable comObject, CcwWrapper wrapper, CcwWrappers wrappers)
     : this(comObject, wrapper.Wrapper, wrapper.Original, wrappers)
 {
 }