예제 #1
0
        private static UIntPtr WriteCallback(IntPtr pointer, UIntPtr size, UIntPtr nmemb, Curl curl)
        {
            int length = (int)size * (int)nmemb;

            if (curl._buffer.Length < curl._offset + length)
            {
                Array.Resize(ref curl._buffer, Math.Max(2 * curl._buffer.Length, curl._offset + length));
            }
            Marshal.Copy(pointer, curl._buffer, curl._offset, length);
            curl._offset += length;
            return(new UIntPtr((uint)length));
        }
예제 #2
0
 internal static extern CurlCode EasySetOpt(IntPtr handle, CurlOption option, Curl value);