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)); }
internal static extern CurlCode EasySetOpt(IntPtr handle, CurlOption option, Curl value);