mirror of https://github.com/dahall/Vanara.git
Fixed WINHTTP_CURRENT_USER_IE_PROXY_CONFIG so it exposed pointers which can be freed.
parent
60b8729079
commit
459e14f224
|
@ -536,25 +536,32 @@ namespace Vanara.PInvoke
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If TRUE, indicates that the Internet Explorer proxy configuration for the current user specifies "automatically detect settings".
|
/// If TRUE, indicates that the Internet Explorer proxy configuration for the current user specifies "automatically detect settings".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.Bool)] public bool fAutoDetect;
|
[MarshalAs(UnmanagedType.Bool)]
|
||||||
|
public bool fAutoDetect;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pointer to a null-terminated Unicode string that contains the auto-configuration URL if the Internet Explorer proxy
|
/// Pointer to a null-terminated Unicode string that contains the auto-configuration URL if the Internet Explorer proxy
|
||||||
/// configuration for the current user specifies "Use automatic proxy configuration".
|
/// configuration for the current user specifies "Use automatic proxy configuration".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.LPWStr)]
|
public StrPtrUni lpszAutoConfigUrl;
|
||||||
public string lpszAutoConfigUrl;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pointer to a null-terminated Unicode string that contains the proxy URL if the Internet Explorer proxy configuration for the
|
/// Pointer to a null-terminated Unicode string that contains the proxy URL if the Internet Explorer proxy configuration for the
|
||||||
/// current user specifies "use a proxy server".
|
/// current user specifies "use a proxy server".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[MarshalAs(UnmanagedType.LPWStr)]
|
public StrPtrUni lpszProxy;
|
||||||
public string lpszProxy;
|
|
||||||
|
|
||||||
/// <summary>Pointer to a null-terminated Unicode string that contains the optional proxy by-pass server list.</summary>
|
/// <summary>Pointer to a null-terminated Unicode string that contains the optional proxy by-pass server list.</summary>
|
||||||
[MarshalAs(UnmanagedType.LPWStr)]
|
public StrPtrUni lpszProxyBypass;
|
||||||
public string lpszProxyBypass;
|
|
||||||
|
/// <summary>Frees the memory tied to the strings in this structure.</summary>
|
||||||
|
public void FreeMemory()
|
||||||
|
{
|
||||||
|
Marshal.FreeHGlobal((IntPtr)lpszAutoConfigUrl);
|
||||||
|
Marshal.FreeHGlobal((IntPtr)lpszProxy);
|
||||||
|
Marshal.FreeHGlobal((IntPtr)lpszProxyBypass);
|
||||||
|
lpszAutoConfigUrl = lpszProxy = lpszProxyBypass = default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Represents an HTTP request header as a name/value string pair.</summary>
|
/// <summary>Represents an HTTP request header as a name/value string pair.</summary>
|
||||||
|
|
Loading…
Reference in New Issue