C# 中WebBrowser清除Session

using System.Runtime.InteropServices;

private const int INTERNET_OPTION_END_BROWSER_SESSION = 42;

[DllImport("wininet.dll", SetLastError = true)]

private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength);

在要清除的地方调用以下方法:

你可能感兴趣的:(C# 中WebBrowser清除Session)