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