wininet: Fix a number of problems with InternetSetCookie.
[wine.git] / dlls / wininet / cookie.c
bloba7445b8fc283aec9399195f75000ec9ad2b772cd
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 struct list * cursor;
262 int cnt = 0, domain_count = 0;
263 int 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_INTERNET_UNRECOGNIZED_SCHEME);
272 return FALSE;
275 COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
277 LIST_FOR_EACH(cursor, &domain_list)
279 cookie_domain *cookiesDomain = LIST_ENTRY(cursor, cookie_domain, entry);
280 if (COOKIE_matchDomain(hostName, NULL /* FIXME: path */, cookiesDomain, TRUE))
282 struct list * cursor;
283 domain_count++;
284 TRACE("found domain %p\n", cookiesDomain);
286 LIST_FOR_EACH(cursor, &cookiesDomain->cookie_list)
288 cookie *thisCookie = LIST_ENTRY(cursor, cookie, entry);
289 if (lpCookieData == NULL) /* return the size of the buffer required to lpdwSize */
291 if (cookie_count != 0)
292 cnt += 2; /* '; ' */
293 cnt += strlenW(thisCookie->lpCookieName);
294 cnt += 1; /* = */
295 cnt += strlenW(thisCookie->lpCookieData);
297 else
299 static const WCHAR szsc[] = { ';',' ',0 };
300 static const WCHAR szpseq[] = { '%','s','=','%','s',0 };
301 if (cookie_count != 0)
302 cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
303 cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szpseq,
304 thisCookie->lpCookieName,
305 thisCookie->lpCookieData);
306 TRACE("Cookie: %s=%s\n", debugstr_w(thisCookie->lpCookieName), debugstr_w(thisCookie->lpCookieData));
308 cookie_count++;
313 if (!domain_count)
315 TRACE("no cookies found for %s\n", debugstr_w(hostName));
316 SetLastError(ERROR_NO_MORE_ITEMS);
317 return FALSE;
320 if (lpCookieData == NULL)
322 cnt += 1; /* NULL */
323 *lpdwSize = cnt*sizeof(WCHAR);
324 TRACE("returning\n");
325 return TRUE;
328 *lpdwSize = (cnt + 1)*sizeof(WCHAR);
330 TRACE("Returning %i (from %i domains): %s\n", cnt, domain_count,
331 debugstr_w(lpCookieData));
333 return (cnt ? TRUE : FALSE);
337 /***********************************************************************
338 * InternetGetCookieA (WININET.@)
340 * Retrieve cookie from the specified url
342 * RETURNS
343 * TRUE on success
344 * FALSE on failure
347 BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
348 LPSTR lpCookieData, LPDWORD lpdwSize)
350 DWORD len;
351 LPWSTR szCookieData = NULL, szUrl = NULL, szCookieName = NULL;
352 BOOL r;
354 TRACE("(%s,%s,%p)\n", debugstr_a(lpszUrl), debugstr_a(lpszCookieName),
355 lpCookieData);
357 if( lpszUrl )
359 len = MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, NULL, 0 );
360 szUrl = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
361 MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, szUrl, len );
364 if( lpszCookieName )
366 len = MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, NULL, 0 );
367 szCookieName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
368 MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, szCookieName, len );
371 r = InternetGetCookieW( szUrl, szCookieName, NULL, &len );
372 if( r )
374 szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
375 if( !szCookieData )
377 r = FALSE;
379 else
381 r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
383 *lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
384 lpCookieData, *lpdwSize, NULL, NULL );
388 HeapFree( GetProcessHeap(), 0, szCookieData );
389 HeapFree( GetProcessHeap(), 0, szCookieName );
390 HeapFree( GetProcessHeap(), 0, szUrl );
392 return r;
395 static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWSTR cookie_data)
397 cookie_domain *thisCookieDomain = NULL;
398 cookie *thisCookie;
399 struct list *cursor;
401 LIST_FOR_EACH(cursor, &domain_list)
403 thisCookieDomain = LIST_ENTRY(cursor, cookie_domain, entry);
404 if (COOKIE_matchDomain(domain, NULL /* FIXME: path */, thisCookieDomain, FALSE))
405 break;
406 thisCookieDomain = NULL;
409 if (!thisCookieDomain)
410 thisCookieDomain = COOKIE_addDomain(domain, path);
412 if ((thisCookie = COOKIE_findCookie(thisCookieDomain, cookie_name)))
413 COOKIE_deleteCookie(thisCookie, FALSE);
415 TRACE("setting cookie %s=%s for domain %s\n", debugstr_w(cookie_name),
416 debugstr_w(cookie_data), debugstr_w(thisCookieDomain->lpCookieDomain));
418 if (!COOKIE_addCookie(thisCookieDomain, cookie_name, cookie_data))
419 return FALSE;
421 return TRUE;
424 /***********************************************************************
425 * InternetSetCookieW (WININET.@)
427 * Sets cookie for the specified url
429 * RETURNS
430 * TRUE on success
431 * FALSE on failure
434 BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
435 LPCWSTR lpCookieData)
437 BOOL ret;
438 WCHAR hostName[2048], path[2048];
440 TRACE("(%s,%s,%s)\n", debugstr_w(lpszUrl),
441 debugstr_w(lpszCookieName), debugstr_w(lpCookieData));
443 if (!lpszUrl || !lpCookieData)
445 SetLastError(ERROR_INVALID_PARAMETER);
446 return FALSE;
449 hostName[0] = 0;
450 ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
451 if (!ret || !hostName[0]) return FALSE;
453 if (!lpszCookieName)
455 unsigned int len;
456 WCHAR *cookie, *data;
458 len = strlenW(lpCookieData);
459 if (!(cookie = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR))))
461 SetLastError(ERROR_OUTOFMEMORY);
462 return FALSE;
464 strcpyW(cookie, lpCookieData);
466 /* some apps (or is it us??) try to add a cookie with no cookie name, but
467 * the cookie data in the form of name[=data].
469 if (!(data = strchrW(cookie, '='))) data = cookie + len;
470 else data++;
472 ret = set_cookie(hostName, path, cookie, data);
474 HeapFree(GetProcessHeap(), 0, cookie);
475 return ret;
477 return set_cookie(hostName, path, lpszCookieName, lpCookieData);
481 /***********************************************************************
482 * InternetSetCookieA (WININET.@)
484 * Sets cookie for the specified url
486 * RETURNS
487 * TRUE on success
488 * FALSE on failure
491 BOOL WINAPI InternetSetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
492 LPCSTR lpCookieData)
494 DWORD len;
495 LPWSTR szCookieData = NULL, szUrl = NULL, szCookieName = NULL;
496 BOOL r;
498 TRACE("(%s,%s,%s)\n", debugstr_a(lpszUrl),
499 debugstr_a(lpszCookieName), debugstr_a(lpCookieData));
501 if( lpszUrl )
503 len = MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, NULL, 0 );
504 szUrl = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
505 MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, szUrl, len );
508 if( lpszCookieName )
510 len = MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, NULL, 0 );
511 szCookieName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
512 MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, szCookieName, len );
515 if( lpCookieData )
517 len = MultiByteToWideChar( CP_ACP, 0, lpCookieData, -1, NULL, 0 );
518 szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
519 MultiByteToWideChar( CP_ACP, 0, lpCookieData, -1, szCookieData, len );
522 r = InternetSetCookieW( szUrl, szCookieName, szCookieData );
524 HeapFree( GetProcessHeap(), 0, szCookieData );
525 HeapFree( GetProcessHeap(), 0, szCookieName );
526 HeapFree( GetProcessHeap(), 0, szUrl );
528 return r;
531 /***********************************************************************
532 * InternetSetCookieExA (WININET.@)
534 * See InternetSetCookieExW.
536 DWORD WINAPI InternetSetCookieExA( LPCSTR lpszURL, LPCSTR lpszCookieName, LPCSTR lpszCookieData,
537 DWORD dwFlags, DWORD_PTR dwReserved)
539 FIXME("(%s, %s, %s, 0x%08x, 0x%08lx) stub\n",
540 debugstr_a(lpszURL), debugstr_a(lpszCookieName), debugstr_a(lpszCookieData),
541 dwFlags, dwReserved);
542 return TRUE;
545 /***********************************************************************
546 * InternetSetCookieExW (WININET.@)
548 * Sets a cookie for the specified URL.
550 * RETURNS
551 * TRUE on success
552 * FALSE on failure
555 DWORD WINAPI InternetSetCookieExW( LPCWSTR lpszURL, LPCWSTR lpszCookieName, LPCWSTR lpszCookieData,
556 DWORD dwFlags, DWORD_PTR dwReserved)
558 FIXME("(%s, %s, %s, 0x%08x, 0x%08lx) stub\n",
559 debugstr_w(lpszURL), debugstr_w(lpszCookieName), debugstr_w(lpszCookieData),
560 dwFlags, dwReserved);
561 return TRUE;
564 /***********************************************************************
565 * InternetGetCookieExA (WININET.@)
567 * See InternetGetCookieExW.
569 BOOL WINAPI InternetGetCookieExA( LPCSTR pchURL, LPCSTR pchCookieName, LPSTR pchCookieData,
570 LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved)
572 FIXME("(%s, %s, %s, %p, 0x%08x, %p) stub\n",
573 debugstr_a(pchURL), debugstr_a(pchCookieName), debugstr_a(pchCookieData),
574 pcchCookieData, dwFlags, lpReserved);
575 return FALSE;
578 /***********************************************************************
579 * InternetGetCookieExW (WININET.@)
581 * Retrieve cookie for the specified URL.
583 * RETURNS
584 * TRUE on success
585 * FALSE on failure
588 BOOL WINAPI InternetGetCookieExW( LPCWSTR pchURL, LPCWSTR pchCookieName, LPWSTR pchCookieData,
589 LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved)
591 FIXME("(%s, %s, %s, %p, 0x%08x, %p) stub\n",
592 debugstr_w(pchURL), debugstr_w(pchCookieName), debugstr_w(pchCookieData),
593 pcchCookieData, dwFlags, lpReserved);
594 return FALSE;
597 /***********************************************************************
598 * InternetClearAllPerSiteCookieDecisions (WININET.@)
600 * Clears all per-site decisions about cookies.
602 * RETURNS
603 * TRUE on success
604 * FALSE on failure
607 BOOL WINAPI InternetClearAllPerSiteCookieDecisions( VOID )
609 FIXME("stub\n");
610 return TRUE;
613 /***********************************************************************
614 * InternetEnumPerSiteCookieDecisionA (WININET.@)
616 * See InternetEnumPerSiteCookieDecisionW.
618 BOOL WINAPI InternetEnumPerSiteCookieDecisionA( LPSTR pszSiteName, unsigned long *pcSiteNameSize,
619 unsigned long *pdwDecision, unsigned long dwIndex )
621 FIXME("(%s, %p, %p, 0x%08lx) stub\n",
622 debugstr_a(pszSiteName), pcSiteNameSize, pdwDecision, dwIndex);
623 return FALSE;
626 /***********************************************************************
627 * InternetEnumPerSiteCookieDecisionW (WININET.@)
629 * Enumerates all per-site decisions about cookies.
631 * RETURNS
632 * TRUE on success
633 * FALSE on failure
636 BOOL WINAPI InternetEnumPerSiteCookieDecisionW( LPWSTR pszSiteName, unsigned long *pcSiteNameSize,
637 unsigned long *pdwDecision, unsigned long dwIndex )
639 FIXME("(%s, %p, %p, 0x%08lx) stub\n",
640 debugstr_w(pszSiteName), pcSiteNameSize, pdwDecision, dwIndex);
641 return FALSE;
644 /***********************************************************************
645 * InternetGetPerSiteCookieDecisionA (WININET.@)
647 BOOL WINAPI InternetGetPerSiteCookieDecisionA( LPCSTR pwchHostName, unsigned long *pResult )
649 FIXME("(%s, %p) stub\n", debugstr_a(pwchHostName), pResult);
650 return FALSE;
653 /***********************************************************************
654 * InternetGetPerSiteCookieDecisionW (WININET.@)
656 BOOL WINAPI InternetGetPerSiteCookieDecisionW( LPCWSTR pwchHostName, unsigned long *pResult )
658 FIXME("(%s, %p) stub\n", debugstr_w(pwchHostName), pResult);
659 return FALSE;
662 /***********************************************************************
663 * InternetSetPerSiteCookieDecisionA (WININET.@)
665 BOOL WINAPI InternetSetPerSiteCookieDecisionA( LPCSTR pchHostName, DWORD dwDecision )
667 FIXME("(%s, 0x%08x) stub\n", debugstr_a(pchHostName), dwDecision);
668 return FALSE;
671 /***********************************************************************
672 * InternetSetPerSiteCookieDecisionW (WININET.@)
674 BOOL WINAPI InternetSetPerSiteCookieDecisionW( LPCWSTR pchHostName, DWORD dwDecision )
676 FIXME("(%s, 0x%08x) stub\n", debugstr_w(pchHostName), dwDecision);
677 return FALSE;