D
Denis @ TheOffice
I would need to forcibly save and restore cookies while IE is running.
Is there a way to program that ?
Denis Co
Is there a way to program that ?
Denis Co
Denis @ TheOffice said:I would need to forcibly save and restore cookies while IE is running.
Is there a way to program that ?
Igor Tandetnik said:Denis @ TheOffice said:I would need to forcibly save and restore cookies while IE is running.
Is there a way to program that ?
InternetGetCookie[Ex], InternetSetCookie[Ex], FindFirstUrlCacheEntry[Ex]
et al
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Denis @ TheOffice said:I just did the code Which consist of an enumeration and retreival,
But InternetGetCookie does not seems to work.
The enumeration (FindFirstUrlCacheEntry) works though.
Perhaps, I do not understand how to use it properly?
I had a GetLastError of (998) ERROR_NOACCESS
Denis @ TheOffice said:I see :
InternetGetCookie (_T("my.yahoo.com"), NULL,
(LPTSTR)&Buffer, &CookieSize);
I do not know what to put as Name?
Denis @ TheOffice said:I just changed &Buffer to Buffer but it is still the same...
Buffer is define as this:
BYTE Buffer [(64 * KB)];
Igor Tandetnik said:Denis @ TheOffice said:I just changed &Buffer to Buffer but it is still the same...
Buffer is define as this:
BYTE Buffer [(64 * KB)];
Do you initialize CookieSize to the length of the buffer before
calling the function?
Igor Tandetnik said:Igor Tandetnik said:Denis @ TheOffice said:I just changed &Buffer to Buffer but it is still the same...
Buffer is define as this:
BYTE Buffer [(64 * KB)];
Do you initialize CookieSize to the length of the buffer before
calling the function?
Note that the size should be in TCHARs, not in BYTEs. TCHAR may be 1 or
2 bytes depending on whether you build ANSI or Unicode build.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Denis @ TheOffice said:I am in unicode so...
I have divide the CookieSize by 2 - 2;
still no luck???
This time I had an error of 12006 which is not define in error lookup.
Denis @ TheOffice said:I need to stores/retrieves cookies independently of the user name
created in windows.
Example: Let say I create the user 00001 and saves its cookies.
Then later I would call that user 00002 and restore it's cookies from
00001 for example.
Igor Tandetnik said:InternetGetCookie, InternetSetCookie et al use the cookie store of
whatever user account your process is running under. So you can
impersonate one user, read all her cookies and store them somewhere,
then impersonate another user and set cookies on her behalf.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Denis @ TheOffice said:On yahoo, I setup a personal page and normally it recognizes me.
When I use those routines it does not?
Plus I can see the cookies in the cookies folder. When I use the
routine it does not?
Igor Tandetnik said:Denis @ TheOffice said:On yahoo, I setup a personal page and normally it recognizes me.
When I use those routines it does not?
Plus I can see the cookies in the cookies folder. When I use the
routine it does not?
Do you set persistent cookies? That is, does the cookie value passed to
InternetSetCookie[Ex] have expires= clause? Without such a clause, you
are setting a session cookie - temporary in-memory cookie that is only
active within your process. For an example, see
http://msdn.microsoft.com/library/en-us/wininet/wininet/managing_cookies.asp
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
Denis @ TheOffice said:Right now I am just Storing them as I got them from InternetGetCookie.
I am guessing That I have to add a line saying for how long from
FindFirstUrlCacheEntry().
in the structure INTERNET_CACHE_ENTRY_INFO
Is this right?
And Is this the only thing I am going to need?
Igor Tandetnik said:Right. You can use InternetTimeFromSystemTime to format the time string.
I believe so.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925