Guest User

Untitled

a guest
Feb 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. static bool EnableCookies(int settingCode, int option)
  2. {
  3. if (!InternetSetOption(IntPtr.Zero, settingCode, ref option, sizeof(int)))
  4. {
  5. var ex = Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error());
  6. //throw ex;
  7. return false;
  8. }
  9. return true;
  10. }
  11.  
  12. protected override void OnStartup(StartupEventArgs e)
  13. {
  14. base.OnStartup(e);
  15. EnableCookies(81, 1);
  16. }
Add Comment
Please, Sign In to add comment