Ejemplo n.º 1
0
        private static void ValidateOrExitCallbackImpl(IntPtr ptr, Result result)
        {
            GCHandle h = GCHandle.FromIntPtr(ptr);
            ValidateOrExitHandler callback = (ValidateOrExitHandler)h.Target;

            h.Free();
            callback(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Checks if the current user has the entitlement to run this game.
        /// </summary>
        /// <param name="callback"></param>
        public void ValidateOrExit(ValidateOrExitHandler callback)
        {
            GCHandle wrapped = GCHandle.Alloc(callback);

            Methods.ValidateOrExit(methodsPtr, GCHandle.ToIntPtr(wrapped), ValidateOrExitCallbackImpl);
        }