示例#1
0
        /// <summary>
        /// Extract <c>int</c> information from an <c>Easy</c> object.
        /// </summary>
        /// <param name="info">One of the values in the
        /// <see cref="CURLINFO"/> enumeration. In this case, it must
        /// specifically be one of the members that obtains a <c>double</c>.
        /// </param>
        /// <param name="dblVal">Reference to an <c>double</c> value.</param>
        /// <returns>The <see cref="CURLcode"/> obtained from the internal
        /// call to <c>curl_easy_getinfo()</c>.
        /// </returns>
        /// <exception cref="System.NullReferenceException">This is thrown if
        /// the native <c>CURL*</c> handle wasn't created successfully.</exception>
        public CURLcode GetInfo(CURLINFO info, ref double dblVal)
        {
            EnsureHandle();

            // ensure it's an integral type
            if ((int)info < CURLINFO_DOUBLE)
            {
                return(CURLcode.CURLE_BAD_FUNCTION_ARGUMENT);
            }

            return(External.curl_easy_getinfo_64(m_pCURL, info, ref dblVal));
        }