コード例 #1
0
        private static void EOSQueryOwnership()
        {
            Program.Log("[EOS] querying DLC ownership");
            _ecomInterface = EpicPlatformManager.PlatformInterface.GetEcomInterface();
            var queryOwnershipOptions = new QueryOwnershipOptions
            {
                LocalUserId    = EpicPlatformManager.LocalUserId,
                CatalogItemIds = new[] { _eosDlcItemID }
            };

            _ecomInterface.QueryOwnership(queryOwnershipOptions, null, OnEOSQueryOwnershipComplete);
        }
コード例 #2
0
        /// <summary>
        /// Fetches an entitlement from a given index.
        /// <seealso cref="EcomInterface.Release" />
        /// </summary>
        /// <param name="options">structure containing the index being accessed</param>
        /// <param name="outEntitlement">the entitlement for the given index, if it exists and is valid, use <see cref="EcomInterface.Release" /> when finished</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the information is available and passed out in OutEntitlement
        /// <see cref="Result.EcomEntitlementStale" /> if the entitlement information is stale and passed out in OutEntitlement
        /// <see cref="Result.InvalidParameters" /> if you pass a null pointer for the out parameter
        /// <see cref="Result.NotFound" /> if the entitlement is not found
        /// </returns>
        public Result CopyEntitlementByIndex(TransactionCopyEntitlementByIndexOptions options, out Entitlement outEntitlement)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <TransactionCopyEntitlementByIndexOptionsInternal, TransactionCopyEntitlementByIndexOptions>(ref optionsAddress, options);

            var outEntitlementAddress = System.IntPtr.Zero;

            var funcResult = EOS_Ecom_Transaction_CopyEntitlementByIndex(InnerHandle, optionsAddress, ref outEntitlementAddress);

            Helper.TryMarshalDispose(ref optionsAddress);

            if (Helper.TryMarshalGet <EntitlementInternal, Entitlement>(outEntitlementAddress, out outEntitlement))
            {
                EcomInterface.EOS_Ecom_Entitlement_Release(outEntitlementAddress);
            }

            return(funcResult);
        }