Hallo,
ich habe ein paar Cookies. Diese möchte ich jetzt gerne an den Browser übergeben. Also an ein WebBrowser Control in meinem Programm.
Gefunden habe ich dazu folgendes:
C#-Quelltext
1: 2:
| [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern bool InternetSetCookie(string lpszUrlName, string lbszCookieName, string lpszCookieData); |
C#-Quelltext
1:
| InternetSetCookie("xxx.de", "sth", "123"); |
Leider macht das irgendwie nichts. Es gibt jedoch true zurück.
Wenn ich in dem WebBrowser von irgendeiner Seite ein cookie bekomme landet das hier: "C:\Users\xxx\AppData\Local\Microsoft\Windows\Temporary Internet Files". Mit "InternetSetCookie" leider nicht.
Funktioniert das so garnicht? Funktioniert das irgendwie anders?
MfG