/// <summary>
        /// Query a user's presence. This must complete successfully before CopyPresence will have valid results. If HasPresence returns true for a remote
        /// user, this does not need to be called.
        /// </summary>
        /// <param name="options">Object containing properties related to who is querying presence and for what user</param>
        /// <param name="clientData">Optional pointer to help track this request, that is returned in the completion callback</param>
        /// <param name="completionDelegate">Pointer to a function that handles receiving the completion information</param>
        public void QueryPresence(QueryPresenceOptions options, object clientData, OnQueryPresenceCompleteCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <QueryPresenceOptionsInternal>(options);

            var completionDelegateInternal = new OnQueryPresenceCompleteCallbackInternal(OnQueryPresenceComplete);
            var clientDataAddress          = IntPtr.Zero;

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Presence_QueryPresence(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
        /// <summary>
        /// Query a user's presence. This must complete successfully before CopyPresence will have valid results. If HasPresence returns true for a remote
        /// user, this does not need to be called.
        /// </summary>
        /// <param name="options">Object containing properties related to who is querying presence and for what user</param>
        /// <param name="clientData">Optional pointer to help track this request, that is returned in the completion callback</param>
        /// <param name="completionDelegate">Pointer to a function that handles receiving the completion information</param>
        public void QueryPresence(QueryPresenceOptions options, object clientData, OnQueryPresenceCompleteCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <QueryPresenceOptionsInternal, QueryPresenceOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnQueryPresenceCompleteCallbackInternal(OnQueryPresenceCompleteCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_Presence_QueryPresence(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }
 private static extern void EOS_Presence_QueryPresence(IntPtr handle, ref QueryPresenceOptionsInternal options, IntPtr clientData, OnQueryPresenceCompleteCallbackInternal completionDelegate);
 internal static extern void EOS_Presence_QueryPresence(System.IntPtr handle, System.IntPtr options, System.IntPtr clientData, OnQueryPresenceCompleteCallbackInternal completionDelegate);