public void Set(SessionSearchCopySearchResultByIndexOptions other)
 {
     if (other != null)
     {
         m_ApiVersion = SessionSearch.SessionsearchCopysearchresultbyindexApiLatest;
         SessionIndex = other.SessionIndex;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// <see cref="CopySearchResultByIndex" /> is used to immediately retrieve a handle to the session information from a given search result.
        /// If the call returns an <see cref="Result.Success" /> result, the out parameter, OutSessionHandle, must be passed to <see cref="SessionDetails.Release" /> to release the memory associated with it.
        /// <seealso cref="SessionSearchCopySearchResultByIndexOptions" />
        /// <seealso cref="SessionDetails.Release" />
        /// </summary>
        /// <param name="options">Structure containing the input parameters</param>
        /// <param name="outSessionHandle">out parameter used to receive the session handle</param>
        /// <returns>
        /// <see cref="Result.Success" /> if the information is available and passed out in OutSessionHandle
        /// <see cref="Result.InvalidParameters" /> if you pass an invalid index or a null pointer for the out parameter
        /// <see cref="Result.IncompatibleVersion" /> if the API version passed in is incorrect
        /// </returns>
        public Result CopySearchResultByIndex(SessionSearchCopySearchResultByIndexOptions options, out SessionDetails outSessionHandle)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <SessionSearchCopySearchResultByIndexOptionsInternal, SessionSearchCopySearchResultByIndexOptions>(ref optionsAddress, options);

            var outSessionHandleAddress = System.IntPtr.Zero;

            var funcResult = EOS_SessionSearch_CopySearchResultByIndex(InnerHandle, optionsAddress, ref outSessionHandleAddress);

            Helper.TryMarshalDispose(ref optionsAddress);

            Helper.TryMarshalGet(outSessionHandleAddress, out outSessionHandle);

            return(funcResult);
        }