コード例 #1
0
ファイル: ComObjectShadow.cs プロジェクト: tanis2000/FEZ
            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);
            }
コード例 #2
0
ファイル: ComObjectShadow.cs プロジェクト: tanis2000/FEZ
            protected static int ReleaseImpl(IntPtr thisObject)
            {
                ComObjectShadow comObjectShadow = CppObjectShadow.ToShadow <ComObjectShadow>(thisObject);

                if (comObjectShadow == null)
                {
                    return(0);
                }
                else
                {
                    return(comObjectShadow.ReleaseImpl(thisObject));
                }
            }
コード例 #3
0
ファイル: ComObjectShadow.cs プロジェクト: tanis2000/FEZ
        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);
            }
        }