private string InternetLastResponseInfo(ref int code) { int capacity = 0x2000; StringBuilder buffer = new(capacity); WININET.InternetGetLastResponseInfo(ref code, buffer, ref capacity); return(buffer.ToString()); }
/// <summary> /// Retrieves error message text /// </summary> /// <param name="code">A <see cref="Int32"/> representing the system error code.</param> /// <returns>A <see cref="String"/> containing the error text.</returns> private string InternetLastResponseInfo(ref int code) { int BUFFER_SIZE = 8192; StringBuilder buff = new StringBuilder(BUFFER_SIZE); WININET.InternetGetLastResponseInfo(ref code, buff, ref BUFFER_SIZE); return(buff.ToString()); }