dbTalk Databases Forums  

Setting IE Cookies - Windows 7

comp.databases.ms-access comp.databases.ms-access


Discuss Setting IE Cookies - Windows 7 in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard
 
Posts: n/a

Default Setting IE Cookies - Windows 7 - 06-21-2010 , 08:26 PM






I have just gone from XP to Win7 and have run into a cookie issue. I
wonder
if anyone here has managed to successfully set a cookie in IE under
Win7 or Vista...?

Here's what works in XP:

Private Declare Function InternetSetCookie Lib "wininet.dll" _
Alias "InternetSetCookieA" _
(ByVal lpszUrlName As String, _
ByVal lpszCookieName As String, _
ByVal lpszCookieData As String) As Boolean

then call it like this:
retValue = InternetSetCookie("http://www.website.com/", cookiename,
cookievalue & "; expires = Sat,02-Jan-2011 00:00:00 GMT")
=============== That does not work in Win7 or Vista ================

Here's what I tried:
Private Declare Function SInternetSetCookie Lib "ieframe.dll" _
Alias "IESetProtectedModeCookie" _
(ByVal lpszURL As String, _
ByVal lpszCookieName As String, _
ByVal pszCookieData As String, _
ByVal dwFlags As Long) As Boolean

then call it like this:
retValue = SInternetSetCookie("http://www.website.com/", cookiename,
cookievalue & "; expires = Sat,02-Jan-2011 00:00:00 GMT", 0)
=============== That also does not work in Win7 or Vista
================

This is causing me major issues...

Reply With Quote
  #2  
Old   
Richard
 
Posts: n/a

Default Re: Setting IE Cookies - Windows 7 - 06-22-2010 , 05:39 PM






On Jun 22, 11:26*am, Richard <a1carbro... (AT) gmail (DOT) com> wrote:
Quote:
I have just gone from XP to Win7 and have run into a cookie issue. I
wonder
if anyone here has managed to successfully set a cookie in IE under
Win7 or Vista...?

Here's what works in XP:

Private Declare Function InternetSetCookie Lib "wininet.dll" _
Alias "InternetSetCookieA" _
(ByVal lpszUrlName As String, _
ByVal lpszCookieName As String, _
ByVal lpszCookieData As String) As Boolean

then call it like this:
retValue = InternetSetCookie("http://www.website.com/", cookiename,
cookievalue & "; expires = Sat,02-Jan-2011 00:00:00 GMT")
=============== That does not work in Win7 or Vista ================

Here's what I tried:
Private Declare Function SInternetSetCookie Lib "ieframe.dll" _
Alias "IESetProtectedModeCookie" _
(ByVal lpszURL As String, _
ByVal lpszCookieName As String, _
ByVal pszCookieData As String, _
ByVal dwFlags As Long) As Boolean

then call it like this:
retValue = SInternetSetCookie("http://www.website.com/", cookiename,
cookievalue & "; expires = Sat,02-Jan-2011 00:00:00 GMT", 0)
=============== That also does not work in Win7 or Vista
================

This is causing me major issues...
In case anyone is interested, it looks like it cannot be done using
VBA. Not unless you run XP or below. It simply is not possible to set
cookies directly using VBA into Internet Explorer.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.