Example #1
0
        public static IntPtr GetIDispatchForObject(object o)
        {
            if (o is null)
            {
                throw new ArgumentNullException(nameof(o));
            }

            return(ComWrappers.ComInterfaceForObject(o, new Guid(0x00020400, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46) /* IID_IDispatch */));
        }
Example #2
0
        public static IntPtr GetComInterfaceForObject(object o, Type T)
        {
            if (o is null)
            {
                throw new ArgumentNullException(nameof(o));
            }

            if (T is null)
            {
                throw new ArgumentNullException(nameof(T));
            }

            return(ComWrappers.ComInterfaceForObject(o, T.GUID));
        }
Example #3
0
 public static IntPtr GetIUnknownForObject(object o)
 {
     return(ComWrappers.ComInterfaceForObject(o));
 }