Esempio n. 1
0
            protected static unsafe int QueryInterfaceImpl(IntPtr thisObject, IntPtr guid, out IntPtr output)
            {
                ComObjectShadow comObjectShadow = CppObjectShadow.ToShadow <ComObjectShadow>(thisObject);

                if (comObjectShadow != null)
                {
                    return(comObjectShadow.QueryInterfaceImpl(thisObject, ref *(Guid *)(void *)guid, out output));
                }
                output = IntPtr.Zero;
                return(Result.NoInterface.Code);
            }
Esempio n. 2
0
            protected static int ReleaseImpl(IntPtr thisObject)
            {
                ComObjectShadow comObjectShadow = CppObjectShadow.ToShadow <ComObjectShadow>(thisObject);

                if (comObjectShadow == null)
                {
                    return(0);
                }
                else
                {
                    return(comObjectShadow.ReleaseImpl(thisObject));
                }
            }
Esempio n. 3
0
        protected int QueryInterfaceImpl(IntPtr thisObject, ref Guid guid, out IntPtr output)
        {
            ComObjectShadow comObjectShadow = (ComObjectShadow)((ShadowContainer)this.Callback.Shadow).FindShadow(guid);

            if (comObjectShadow != null)
            {
                comObjectShadow.AddRefImpl(thisObject);
                output = comObjectShadow.NativePointer;
                return(Result.Ok.Code);
            }
            else
            {
                output = IntPtr.Zero;
                return(Result.NoInterface.Code);
            }
        }