d3d9: Fix a few ok conditions in the visual tests.
[wine.git] / dlls / wininet / cookie.c
blob2eef2d99748d7774b498446794b74d1ded08b922
1 /*
2 * Wininet - cookie handling stuff
4 * Copyright 2002 TransGaming Technologies Inc.
6 * David Hammerton
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include "config.h"
24 #include "wine/port.h"
26 #include <stdarg.h>
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <string.h>
30 #ifdef HAVE_UNISTD_H
31 # include <unistd.h>
32 #endif
34 #include "windef.h"
35 #include "winbase.h"
36 #include "wininet.h"
37 #include "winerror.h"
39 #include "wine/debug.h"
40 #include "internet.h"
42 #define RESPONSE_TIMEOUT 30 /* FROM internet.c */
45 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
47 /* FIXME
48 * Cookies are currently memory only.
49 * Cookies are NOT THREAD SAFE
50 * Cookies could use A LOT OF MEMORY. We need some kind of memory management here!
51 * Cookies should care about the expiry time
54 typedef struct _cookie_domain cookie_domain;
55 typedef struct _cookie cookie;
57 struct _cookie
59 struct list entry;
61 struct _cookie_domain *parent;
63 LPWSTR lpCookieName;
64 LPWSTR lpCookieData;
65 time_t expiry; /* FIXME: not used */
68 struct _cookie_domain
70 struct list entry;
72 LPWSTR lpCookieDomain;
73 LPWSTR lpCookiePath;
74 struct list cookie_list;
77 static struct list domain_list = LIST_INIT(domain_list);
79 static cookie *COOKIE_addCookie(cookie_domain *domain, LPCWSTR name, LPCWSTR data);
80 static cookie *COOKIE_findCookie(cookie_domain *domain, LPCWSTR lpszCookieName);
81 static void COOKIE_deleteCookie(cookie *deadCookie, BOOL deleteDomain);
82 static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path);
83 static void COOKIE_deleteDomain(cookie_domain *deadDomain);
86 /* adds a cookie to the domain */
87 static cookie *COOKIE_addCookie(cookie_domain *domain, LPCWSTR name, LPCWSTR data)
89 cookie *newCookie = HeapAlloc(GetProcessHeap(), 0, sizeof(cookie));
91 list_init(&newCookie->entry);
92 newCookie->lpCookieName = NULL;
93 newCookie->lpCookieData = NULL;
95 if (name)
97 newCookie->lpCookieName = HeapAlloc(GetProcessHeap(), 0, (strlenW(name) + 1)*sizeof(WCHAR));
98 lstrcpyW(newCookie->lpCookieName, name);
100 if (data)
102 newCookie->lpCookieData = HeapAlloc(GetProcessHeap(), 0, (strlenW(data) + 1)*sizeof(WCHAR));
103 lstrcpyW(newCookie->lpCookieData, data);
106 TRACE("added cookie %p (data is %s)\n", newCookie, debugstr_w(data) );
108 list_add_tail(&domain->cookie_list, &newCookie->entry);
109 newCookie->parent = domain;
110 return newCookie;
114 /* finds a cookie in the domain matching the cookie name */
115 static cookie *COOKIE_findCookie(cookie_domain *domain, LPCWSTR lpszCookieName)
117 struct list * cursor;
118 TRACE("(%p, %s)\n", domain, debugstr_w(lpszCookieName));
120 LIST_FOR_EACH(cursor, &domain->cookie_list)
122 cookie *searchCookie = LIST_ENTRY(cursor, cookie, entry);
123 BOOL candidate = TRUE;
124 if (candidate && lpszCookieName)
126 if (candidate && !searchCookie->lpCookieName)
127 candidate = FALSE;
128 if (candidate && strcmpW(lpszCookieName, searchCookie->lpCookieName) != 0)
129 candidate = FALSE;
131 if (candidate)
132 return searchCookie;
134 return NULL;
137 /* removes a cookie from the list, if its the last cookie we also remove the domain */
138 static void COOKIE_deleteCookie(cookie *deadCookie, BOOL deleteDomain)
140 HeapFree(GetProcessHeap(), 0, deadCookie->lpCookieName);
141 HeapFree(GetProcessHeap(), 0, deadCookie->lpCookieData);
142 list_remove(&deadCookie->entry);
144 /* special case: last cookie, lets remove the domain to save memory */
145 if (list_empty(&deadCookie->parent->cookie_list) && deleteDomain)
146 COOKIE_deleteDomain(deadCookie->parent);
147 HeapFree(GetProcessHeap(), 0, deadCookie);
150 /* allocates a domain and adds it to the end */
151 static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path)
153 cookie_domain *newDomain = HeapAlloc(GetProcessHeap(), 0, sizeof(cookie_domain));
155 list_init(&newDomain->entry);
156 list_init(&newDomain->cookie_list);
157 newDomain->lpCookieDomain = NULL;
158 newDomain->lpCookiePath = NULL;
160 if (domain)
162 newDomain->lpCookieDomain = HeapAlloc(GetProcessHeap(), 0, (strlenW(domain) + 1)*sizeof(WCHAR));
163 strcpyW(newDomain->lpCookieDomain, domain);
165 if (path)
167 newDomain->lpCookiePath = HeapAlloc(GetProcessHeap(), 0, (strlenW(path) + 1)*sizeof(WCHAR));
168 lstrcpyW(newDomain->lpCookiePath, path);
171 list_add_tail(&domain_list, &newDomain->entry);
173 TRACE("Adding domain: %p\n", newDomain);
174 return newDomain;
177 static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen)
179 URL_COMPONENTSW UrlComponents;
181 UrlComponents.lpszExtraInfo = NULL;
182 UrlComponents.lpszPassword = NULL;
183 UrlComponents.lpszScheme = NULL;
184 UrlComponents.lpszUrlPath = path;
185 UrlComponents.lpszUserName = NULL;
186 UrlComponents.lpszHostName = hostName;
187 UrlComponents.dwExtraInfoLength = 0;
188 UrlComponents.dwPasswordLength = 0;
189 UrlComponents.dwSchemeLength = 0;
190 UrlComponents.dwUserNameLength = 0;
191 UrlComponents.dwHostNameLength = hostNameLen;
192 UrlComponents.dwUrlPathLength = pathLen;
194 return InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents);
197 /* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */
198 static BOOL COOKIE_matchDomain(LPCWSTR lpszCookieDomain, LPCWSTR lpszCookiePath,
199 cookie_domain *searchDomain, BOOL allow_partial)
201 TRACE("searching on domain %p\n", searchDomain);
202 if (lpszCookieDomain)
204 if (!searchDomain->lpCookieDomain)
205 return FALSE;
207 TRACE("comparing domain %s with %s\n",
208 debugstr_w(lpszCookieDomain),
209 debugstr_w(searchDomain->lpCookieDomain));
211 if (allow_partial && !strstrW(lpszCookieDomain, searchDomain->lpCookieDomain))
212 return FALSE;
213 else if (!allow_partial && lstrcmpW(lpszCookieDomain, searchDomain->lpCookieDomain) != 0)
214 return FALSE;
216 if (lpszCookiePath)
218 TRACE("comparing paths: %s with %s\n", debugstr_w(lpszCookiePath), debugstr_w(searchDomain->lpCookiePath));
219 if (!searchDomain->lpCookiePath)
220 return FALSE;
221 if (strcmpW(lpszCookiePath, searchDomain->lpCookiePath))
222 return FALSE;
224 return TRUE;
227 /* remove a domain from the list and delete it */
228 static void COOKIE_deleteDomain(cookie_domain *deadDomain)
230 struct list * cursor;
231 while ((cursor = list_tail(&deadDomain->cookie_list)))
233 COOKIE_deleteCookie(LIST_ENTRY(cursor, cookie, entry), FALSE);
234 list_remove(cursor);
237 HeapFree(GetProcessHeap(), 0, deadDomain->lpCookieDomain);
238 HeapFree(GetProcessHeap(), 0, deadDomain->lpCookiePath);
240 list_remove(&deadDomain->entry);
242 HeapFree(GetProcessHeap(), 0, deadDomain);
245 /***********************************************************************
246 * InternetGetCookieW (WININET.@)
248 * Retrieve cookie from the specified url
250 * It should be noted that on windows the lpszCookieName parameter is "not implemented".
251 * So it won't be implemented here.
253 * RETURNS
254 * TRUE on success
255 * FALSE on failure
258 BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
259 LPWSTR lpCookieData, LPDWORD lpdwSize)
261 BOOL ret;
262 struct list * cursor;
263 unsigned int cnt = 0, domain_count = 0, cookie_count = 0;
264 WCHAR hostName[2048], path[2048];
266 TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName),
267 lpCookieData, lpdwSize);
269 if (!lpszUrl)
271 SetLastError(ERROR_INVALID_PARAMETER);
272 return FALSE;
275 hostName[0] = 0;
276 ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
277 if (!ret || !hostName[0]) return FALSE;
279 LIST_FOR_EACH(cursor, &domain_list)
281 cookie_domain *cookiesDomain = LIST_ENTRY(cursor, cookie_domain, entry);
282 if (COOKIE_matchDomain(hostName, NULL /* FIXME: path */, cookiesDomain, TRUE))
284 struct list * cursor;
285 domain_count++;
286 TRACE("found domain %p\n", cookiesDomain);
288 LIST_FOR_EACH(cursor, &cookiesDomain->cookie_list)
290 cookie *thisCookie = LIST_ENTRY(cursor, cookie, entry);
291 if (lpCookieData == NULL) /* return the size of the buffer required to lpdwSize */
293 unsigned int len;
295 if (cookie_count) cnt += 2; /* '; ' */
296 cnt += strlenW(thisCookie->lpCookieName);
297 if ((len = strlenW(thisCookie->lpCookieData)))
299 cnt += 1; /* = */
300 cnt += len;
303 else
305 static const WCHAR szsc[] = { ';',' ',0 };
306 static const WCHAR szname[] = { '%','s',0 };
307 static const WCHAR szdata[] = { '=','%','s',0 };
309 if (cookie_count) cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
310 cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szname, thisCookie->lpCookieName);
312 if (thisCookie->lpCookieData[0])
313 cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szdata, thisCookie->lpCookieData);
315 TRACE("Cookie: %s\n", debugstr_w(lpCookieData));
317 cookie_count++;
322 if (!domain_count)
324 TRACE("no cookies found for %s\n", debugstr_w(hostName));
325 SetLastError(ERROR_NO_MORE_ITEMS);
326 return FALSE;
329 if (lpCookieData == NULL)
331 *lpdwSize = (cnt + 1) * sizeof(WCHAR);
332 TRACE("returning %u\n", *lpdwSize);
333 return TRUE;
336 *lpdwSize = cnt + 1;
338 TRACE("Returning %u (from %u domains): %s\n", cnt, domain_count,
339 debugstr_w(lpCookieData));
341 return (cnt ? TRUE : FALSE);
345 /***********************************************************************
346 * InternetGetCookieA (WININET.@)
348 * Retrieve cookie from the specified url
350 * RETURNS
351 * TRUE on success
352 * FALSE on failure
355 BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
356 LPSTR lpCookieData, LPDWORD lpdwSize)
358 DWORD len;
359 LPWSTR szCookieData = NULL, szUrl = NULL, szCookieName = NULL;
360 BOOL r;
362 TRACE("(%s,%s,%p)\n", debugstr_a(lpszUrl), debugstr_a(lpszCookieName),
363 lpCookieData);
365 if( lpszUrl )
367 len = MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, NULL, 0 );
368 szUrl = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
369 MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, szUrl, len );
372 if( lpszCookieName )
374 len = MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, NULL, 0 );
375 szCookieName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
376 MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, szCookieName, len );
379 r = InternetGetCookieW( szUrl, szCookieName, NULL, &len );
380 if( r )
382 szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
383 if( !szCookieData )
385 r = FALSE;
387 else
389 r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
391 *lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
392 lpCookieData, *lpdwSize, NULL, NULL );
396 HeapFree( GetProcessHeap(), 0, szCookieData );
397 HeapFree( GetProcessHeap(), 0, szCookieName );
398 HeapFree( GetProcessHeap(), 0, szUrl );
400 return r;
403 static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWSTR cookie_data)
405 cookie_domain *thisCookieDomain = NULL;
406 cookie *thisCookie;
407 struct list *cursor;
409 LIST_FOR_EACH(cursor, &domain_list)
411 thisCookieDomain = LIST_ENTRY(cursor, cookie_domain, entry);
412 if (COOKIE_matchDomain(domain, NULL /* FIXME: path */, thisCookieDomain, FALSE))
413 break;
414 thisCookieDomain = NULL;
417 if (!thisCookieDomain)
418 thisCookieDomain = COOKIE_addDomain(domain, path);
420 if ((thisCookie = COOKIE_findCookie(thisCookieDomain, cookie_name)))
421 COOKIE_deleteCookie(thisCookie, FALSE);
423 TRACE("setting cookie %s=%s for domain %s\n", debugstr_w(cookie_name),
424 debugstr_w(cookie_data), debugstr_w(thisCookieDomain->lpCookieDomain));
426 if (!COOKIE_addCookie(thisCookieDomain, cookie_name, cookie_data))
427 return FALSE;
429 return TRUE;
432 /***********************************************************************
433 * InternetSetCookieW (WININET.@)
435 * Sets cookie for the specified url
437 * RETURNS
438 * TRUE on success
439 * FALSE on failure
442 BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
443 LPCWSTR lpCookieData)
445 BOOL ret;
446 WCHAR hostName[2048], path[2048];
448 TRACE("(%s,%s,%s)\n", debugstr_w(lpszUrl),
449 debugstr_w(lpszCookieName), debugstr_w(lpCookieData));
451 if (!lpszUrl || !lpCookieData)
453 SetLastError(ERROR_INVALID_PARAMETER);
454 return FALSE;
457 hostName[0] = path[0] = 0;
458 ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
459 if (!ret || !hostName[0]) return FALSE;
461 if (!lpszCookieName)
463 unsigned int len;
464 WCHAR *cookie, *data;
466 len = strlenW(lpCookieData);
467 if (!(cookie = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR))))
469 SetLastError(ERROR_OUTOFMEMORY);
470 return FALSE;
472 strcpyW(cookie, lpCookieData);
474 /* some apps (or is it us??) try to add a cookie with no cookie name, but
475 * the cookie data in the form of name[=data].
477 if (!(data = strchrW(cookie, '='))) data = cookie + len;
478 else data++;
480 ret = set_cookie(hostName, path, cookie, data);
482 HeapFree(GetProcessHeap(), 0, cookie);
483 return ret;
485 return set_cookie(hostName, path, lpszCookieName, lpCookieData);
489 /***********************************************************************
490 * InternetSetCookieA (WININET.@)
492 * Sets cookie for the specified url
494 * RETURNS
495 * TRUE on success
496 * FALSE on failure
499 BOOL WINAPI InternetSetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
500 LPCSTR lpCookieData)
502 DWORD len;
503 LPWSTR szCookieData = NULL, szUrl = NULL, szCookieName = NULL;
504 BOOL r;
506 TRACE("(%s,%s,%s)\n", debugstr_a(lpszUrl),
507 debugstr_a(lpszCookieName), debugstr_a(lpCookieData));
509 if( lpszUrl )
511 len = MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, NULL, 0 );
512 szUrl = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
513 MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, szUrl, len );
516 if( lpszCookieName )
518 len = MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, NULL, 0 );
519 szCookieName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
520 MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, szCookieName, len );
523 if( lpCookieData )
525 len = MultiByteToWideChar( CP_ACP, 0, lpCookieData, -1, NULL, 0 );
526 szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
527 MultiByteToWideChar( CP_ACP, 0, lpCookieData, -1, szCookieData, len );
530 r = InternetSetCookieW( szUrl, szCookieName, szCookieData );
532 HeapFree( GetProcessHeap(), 0, szCookieData );
533 HeapFree( GetProcessHeap(), 0, szCookieName );
534 HeapFree( GetProcessHeap(), 0, szUrl );
536 return r;
539 /***********************************************************************
540 * InternetSetCookieExA (WININET.@)
542 * See InternetSetCookieExW.
544 DWORD WINAPI InternetSetCookieExA( LPCSTR lpszURL, LPCSTR lpszCookieName, LPCSTR lpszCookieData,
545 DWORD dwFlags, DWORD_PTR dwReserved)
547 FIXME("(%s, %s, %s, 0x%08x, 0x%08lx) stub\n",
548 debugstr_a(lpszURL), debugstr_a(lpszCookieName), debugstr_a(lpszCookieData),
549 dwFlags, dwReserved);
550 return TRUE;
553 /***********************************************************************
554 * InternetSetCookieExW (WININET.@)
556 * Sets a cookie for the specified URL.
558 * RETURNS
559 * TRUE on success
560 * FALSE on failure
563 DWORD WINAPI InternetSetCookieExW( LPCWSTR lpszURL, LPCWSTR lpszCookieName, LPCWSTR lpszCookieData,
564 DWORD dwFlags, DWORD_PTR dwReserved)
566 FIXME("(%s, %s, %s, 0x%08x, 0x%08lx) stub\n",
567 debugstr_w(lpszURL), debugstr_w(lpszCookieName), debugstr_w(lpszCookieData),
568 dwFlags, dwReserved);
569 return TRUE;
572 /***********************************************************************
573 * InternetGetCookieExA (WININET.@)
575 * See InternetGetCookieExW.
577 BOOL WINAPI InternetGetCookieExA( LPCSTR pchURL, LPCSTR pchCookieName, LPSTR pchCookieData,
578 LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved)
580 FIXME("(%s, %s, %s, %p, 0x%08x, %p) stub\n",
581 debugstr_a(pchURL), debugstr_a(pchCookieName), debugstr_a(pchCookieData),
582 pcchCookieData, dwFlags, lpReserved);
583 return FALSE;
586 /***********************************************************************
587 * InternetGetCookieExW (WININET.@)
589 * Retrieve cookie for the specified URL.
591 * RETURNS
592 * TRUE on success
593 * FALSE on failure
596 BOOL WINAPI InternetGetCookieExW( LPCWSTR pchURL, LPCWSTR pchCookieName, LPWSTR pchCookieData,
597 LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved)
599 FIXME("(%s, %s, %s, %p, 0x%08x, %p) stub\n",
600 debugstr_w(pchURL), debugstr_w(pchCookieName), debugstr_w(pchCookieData),
601 pcchCookieData, dwFlags, lpReserved);
602 return FALSE;
605 /***********************************************************************
606 * InternetClearAllPerSiteCookieDecisions (WININET.@)
608 * Clears all per-site decisions about cookies.
610 * RETURNS
611 * TRUE on success
612 * FALSE on failure
615 BOOL WINAPI InternetClearAllPerSiteCookieDecisions( VOID )
617 FIXME("stub\n");
618 return TRUE;
621 /***********************************************************************
622 * InternetEnumPerSiteCookieDecisionA (WININET.@)
624 * See InternetEnumPerSiteCookieDecisionW.
626 BOOL WINAPI InternetEnumPerSiteCookieDecisionA( LPSTR pszSiteName, unsigned long *pcSiteNameSize,
627 unsigned long *pdwDecision, unsigned long dwIndex )
629 FIXME("(%s, %p, %p, 0x%08lx) stub\n",
630 debugstr_a(pszSiteName), pcSiteNameSize, pdwDecision, dwIndex);
631 return FALSE;
634 /***********************************************************************
635 * InternetEnumPerSiteCookieDecisionW (WININET.@)
637 * Enumerates all per-site decisions about cookies.
639 * RETURNS
640 * TRUE on success
641 * FALSE on failure
644 BOOL WINAPI InternetEnumPerSiteCookieDecisionW( LPWSTR pszSiteName, unsigned long *pcSiteNameSize,
645 unsigned long *pdwDecision, unsigned long dwIndex )
647 FIXME("(%s, %p, %p, 0x%08lx) stub\n",
648 debugstr_w(pszSiteName), pcSiteNameSize, pdwDecision, dwIndex);
649 return FALSE;
652 /***********************************************************************
653 * InternetGetPerSiteCookieDecisionA (WININET.@)
655 BOOL WINAPI InternetGetPerSiteCookieDecisionA( LPCSTR pwchHostName, unsigned long *pResult )
657 FIXME("(%s, %p) stub\n", debugstr_a(pwchHostName), pResult);
658 return FALSE;
661 /***********************************************************************
662 * InternetGetPerSiteCookieDecisionW (WININET.@)
664 BOOL WINAPI InternetGetPerSiteCookieDecisionW( LPCWSTR pwchHostName, unsigned long *pResult )
666 FIXME("(%s, %p) stub\n", debugstr_w(pwchHostName), pResult);
667 return FALSE;
670 /***********************************************************************
671 * InternetSetPerSiteCookieDecisionA (WININET.@)
673 BOOL WINAPI InternetSetPerSiteCookieDecisionA( LPCSTR pchHostName, DWORD dwDecision )
675 FIXME("(%s, 0x%08x) stub\n", debugstr_a(pchHostName), dwDecision);
676 return FALSE;
679 /***********************************************************************
680 * InternetSetPerSiteCookieDecisionW (WININET.@)
682 BOOL WINAPI InternetSetPerSiteCookieDecisionW( LPCWSTR pchHostName, DWORD dwDecision )
684 FIXME("(%s, 0x%08x) stub\n", debugstr_w(pchHostName), dwDecision);
685 return FALSE;