winform webbroswer设置cookie方法

    [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]
        public static extern bool InternetSetCookie(string lpszUrlName, string lbszCookieName, string lpszCookieData);

使用api设置就能实现,在需要设置webbrowser的cookie,访问网站。

你可能感兴趣的:(cookie,WinForm,WebBrowser)