How to clear all session data from internet explorer

i am using webbrowser1, webrequest and http downloaddata to get websites.

the software inherintly uses the computers microsoft internet explorer for this.

how can i clear all session data without specifying the session name.

i have tried session.abandon();

but i get compile error on session - Error      19      The name 'Session' does not exist in the current context

thanks
nikon70Asked:
Who is Participating?
 
lazyberezovskyCommented:

[DllImport("wininet.dll")]
public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength);

// Call:
const int INTERNET_OPTION_END_BROWSER_SESSION = 42;
InternetSetOption(IntPtr.Zero, NTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);

Open in new window

0
 
nikon70Author Commented:
Perfect! Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.