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