imported in to the trunk

svn path=/trunk/; revision=14689
This commit is contained in:
Steven Edwards 2005-04-19 04:48:51 +00:00
parent 096c2a1089
commit 2607bc5f85
33 changed files with 16930 additions and 0 deletions

View file

@ -0,0 +1,5 @@
Makefile
rsrc.res
version.res
wininet.dll.dbg.c
wininet.spec.def

View file

@ -0,0 +1,30 @@
EXTRADEFS = -D_WINX32_
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = wininet.dll
IMPORTS = mpr shlwapi shell32 user32 advapi32 kernel32 ntdll
EXTRALIBS = $(LIBUNICODE) @SOCKETLIBS@
C_SRCS = \
cookie.c \
dialogs.c \
ftp.c \
gopher.c \
http.c \
internet.c \
netconnection.c \
urlcache.c \
utility.c \
wininet_main.c
RC_SRCS = \
rsrc.rc \
version.rc
SUBDIRS = tests
@MAKE_DLL_RULES@
### Dependencies:

View file

@ -0,0 +1,501 @@
/*
* Wininet - cookie handling stuff
*
* Copyright 2002 TransGaming Technologies Inc.
*
* David Hammerton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "winerror.h"
#include "wine/debug.h"
#include "internet.h"
#include "wine/list.h"
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
/* FIXME
* Cookies are currently memory only.
* Cookies are NOT THREAD SAFE
* Cookies could use A LOT OF MEMORY. We need some kind of memory management here!
* Cookies should care about the expiry time
*/
typedef struct _cookie_domain cookie_domain;
typedef struct _cookie cookie;
struct _cookie
{
struct list entry;
struct _cookie_domain *parent;
LPWSTR lpCookieName;
LPWSTR lpCookieData;
time_t expiry; /* FIXME: not used */
};
struct _cookie_domain
{
struct list entry;
LPWSTR lpCookieDomain;
LPWSTR lpCookiePath;
struct list cookie_list;
};
static struct list domain_list = LIST_INIT(domain_list);
static cookie *COOKIE_addCookie(cookie_domain *domain, LPCWSTR name, LPCWSTR data);
static cookie *COOKIE_findCookie(cookie_domain *domain, LPCWSTR lpszCookieName);
static void COOKIE_deleteCookie(cookie *deadCookie, BOOL deleteDomain);
static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path);
static void COOKIE_deleteDomain(cookie_domain *deadDomain);
/* adds a cookie to the domain */
static cookie *COOKIE_addCookie(cookie_domain *domain, LPCWSTR name, LPCWSTR data)
{
cookie *newCookie = HeapAlloc(GetProcessHeap(), 0, sizeof(cookie));
list_init(&newCookie->entry);
newCookie->lpCookieName = NULL;
newCookie->lpCookieData = NULL;
if (name)
{
newCookie->lpCookieName = HeapAlloc(GetProcessHeap(), 0, (strlenW(name) + 1)*sizeof(WCHAR));
lstrcpyW(newCookie->lpCookieName, name);
}
if (data)
{
newCookie->lpCookieData = HeapAlloc(GetProcessHeap(), 0, (strlenW(data) + 1)*sizeof(WCHAR));
lstrcpyW(newCookie->lpCookieData, data);
}
TRACE("added cookie %p (data is %s)\n", newCookie, debugstr_w(data) );
list_add_tail(&domain->cookie_list, &newCookie->entry);
newCookie->parent = domain;
return newCookie;
}
/* finds a cookie in the domain matching the cookie name */
static cookie *COOKIE_findCookie(cookie_domain *domain, LPCWSTR lpszCookieName)
{
struct list * cursor;
TRACE("(%p, %s)\n", domain, debugstr_w(lpszCookieName));
LIST_FOR_EACH(cursor, &domain->cookie_list)
{
cookie *searchCookie = LIST_ENTRY(cursor, cookie, entry);
BOOL candidate = TRUE;
if (candidate && lpszCookieName)
{
if (candidate && !searchCookie->lpCookieName)
candidate = FALSE;
if (candidate && strcmpW(lpszCookieName, searchCookie->lpCookieName) != 0)
candidate = FALSE;
}
if (candidate)
return searchCookie;
}
return NULL;
}
/* removes a cookie from the list, if its the last cookie we also remove the domain */
static void COOKIE_deleteCookie(cookie *deadCookie, BOOL deleteDomain)
{
HeapFree(GetProcessHeap(), 0, deadCookie->lpCookieName);
HeapFree(GetProcessHeap(), 0, deadCookie->lpCookieData);
list_remove(&deadCookie->entry);
/* special case: last cookie, lets remove the domain to save memory */
if (list_empty(&deadCookie->parent->cookie_list) && deleteDomain)
COOKIE_deleteDomain(deadCookie->parent);
HeapFree(GetProcessHeap(), 0, deadCookie);
}
/* allocates a domain and adds it to the end */
static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path)
{
cookie_domain *newDomain = HeapAlloc(GetProcessHeap(), 0, sizeof(cookie_domain));
list_init(&newDomain->entry);
list_init(&newDomain->cookie_list);
newDomain->lpCookieDomain = NULL;
newDomain->lpCookiePath = NULL;
if (domain)
{
newDomain->lpCookieDomain = HeapAlloc(GetProcessHeap(), 0, (strlenW(domain) + 1)*sizeof(WCHAR));
strcpyW(newDomain->lpCookieDomain, domain);
}
if (path)
{
newDomain->lpCookiePath = HeapAlloc(GetProcessHeap(), 0, (strlenW(path) + 1)*sizeof(WCHAR));
lstrcpyW(newDomain->lpCookiePath, path);
}
list_add_tail(&domain_list, &newDomain->entry);
TRACE("Adding domain: %p\n", newDomain);
return newDomain;
}
static void COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen)
{
URL_COMPONENTSW UrlComponents;
UrlComponents.lpszExtraInfo = NULL;
UrlComponents.lpszPassword = NULL;
UrlComponents.lpszScheme = NULL;
UrlComponents.lpszUrlPath = path;
UrlComponents.lpszUserName = NULL;
UrlComponents.lpszHostName = hostName;
UrlComponents.dwHostNameLength = hostNameLen;
UrlComponents.dwUrlPathLength = pathLen;
InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents);
}
/* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */
static BOOL COOKIE_matchDomain(LPCWSTR lpszCookieDomain, LPCWSTR lpszCookiePath,
cookie_domain *searchDomain, BOOL allow_partial)
{
TRACE("searching on domain %p\n", searchDomain);
if (lpszCookieDomain)
{
if (!searchDomain->lpCookieDomain)
return FALSE;
TRACE("comparing domain %s with %s\n",
debugstr_w(lpszCookieDomain),
debugstr_w(searchDomain->lpCookieDomain));
if (allow_partial && !strstrW(lpszCookieDomain, searchDomain->lpCookieDomain))
return FALSE;
else if (!allow_partial && lstrcmpW(lpszCookieDomain, searchDomain->lpCookieDomain) != 0)
return FALSE;
}
if (lpszCookiePath)
{
TRACE("comparing paths: %s with %s\n", debugstr_w(lpszCookiePath), debugstr_w(searchDomain->lpCookiePath));
if (!searchDomain->lpCookiePath)
return FALSE;
if (strcmpW(lpszCookiePath, searchDomain->lpCookiePath))
return FALSE;
}
return TRUE;
}
/* remove a domain from the list and delete it */
static void COOKIE_deleteDomain(cookie_domain *deadDomain)
{
struct list * cursor;
while ((cursor = list_tail(&deadDomain->cookie_list)))
{
COOKIE_deleteCookie(LIST_ENTRY(cursor, cookie, entry), FALSE);
list_remove(cursor);
}
HeapFree(GetProcessHeap(), 0, deadDomain->lpCookieDomain);
HeapFree(GetProcessHeap(), 0, deadDomain->lpCookiePath);
list_remove(&deadDomain->entry);
HeapFree(GetProcessHeap(), 0, deadDomain);
}
/***********************************************************************
* InternetGetCookieW (WININET.@)
*
* Retrieve cookie from the specified url
*
* It should be noted that on windows the lpszCookieName parameter is "not implemented".
* So it won't be implemented here.
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
LPWSTR lpCookieData, LPDWORD lpdwSize)
{
struct list * cursor;
int cnt = 0, domain_count = 0;
int cookie_count = 0;
WCHAR hostName[2048], path[2048];
TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName),
lpCookieData, lpdwSize);
COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
LIST_FOR_EACH(cursor, &domain_list)
{
cookie_domain *cookiesDomain = LIST_ENTRY(cursor, cookie_domain, entry);
if (COOKIE_matchDomain(hostName, NULL /* FIXME: path */, cookiesDomain, TRUE))
{
struct list * cursor;
domain_count++;
TRACE("found domain %p\n", cookiesDomain);
LIST_FOR_EACH(cursor, &cookiesDomain->cookie_list)
{
cookie *thisCookie = LIST_ENTRY(cursor, cookie, entry);
if (lpCookieData == NULL) /* return the size of the buffer required to lpdwSize */
{
if (cookie_count != 0)
cnt += 2; /* '; ' */
cnt += strlenW(thisCookie->lpCookieName);
cnt += 1; /* = */
cnt += strlenW(thisCookie->lpCookieData);
}
else
{
static const WCHAR szsc[] = { ';',' ',0 };
static const WCHAR szpseq[] = { '%','s','=','%','s',0 };
if (cookie_count != 0)
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szpseq,
thisCookie->lpCookieName,
thisCookie->lpCookieData);
TRACE("Cookie: %s=%s\n", debugstr_w(thisCookie->lpCookieName), debugstr_w(thisCookie->lpCookieData));
}
cookie_count++;
}
}
}
if (lpCookieData == NULL)
{
cnt += 1; /* NULL */
*lpdwSize = cnt*sizeof(WCHAR);
TRACE("returning\n");
return TRUE;
}
if (!domain_count)
return FALSE;
*lpdwSize = (cnt + 1)*sizeof(WCHAR);
TRACE("Returning %i (from %i domains): %s\n", cnt, domain_count,
debugstr_w(lpCookieData));
return (cnt ? TRUE : FALSE);
}
/***********************************************************************
* InternetGetCookieA (WININET.@)
*
* Retrieve cookie from the specified url
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
LPSTR lpCookieData, LPDWORD lpdwSize)
{
DWORD len;
LPWSTR szCookieData = NULL, szUrl = NULL, szCookieName = NULL;
BOOL r;
TRACE("(%s,%s,%p)\n", debugstr_a(lpszUrl), debugstr_a(lpszCookieName),
lpCookieData);
if( lpszUrl )
{
len = MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, NULL, 0 );
szUrl = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, szUrl, len );
}
if( lpszCookieName )
{
len = MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, NULL, 0 );
szCookieName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, szCookieName, len );
}
r = InternetGetCookieW( szUrl, szCookieName, NULL, &len );
if( r )
{
szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
if( !szCookieData )
return FALSE;
r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
*lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
lpCookieData, *lpdwSize, NULL, NULL );
}
HeapFree( GetProcessHeap(), 0, szCookieData );
HeapFree( GetProcessHeap(), 0, szCookieName );
HeapFree( GetProcessHeap(), 0, szUrl );
return r;
}
/***********************************************************************
* InternetSetCookieW (WININET.@)
*
* Sets cookie for the specified url
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
LPCWSTR lpCookieData)
{
cookie_domain *thisCookieDomain = NULL;
cookie *thisCookie;
WCHAR hostName[2048], path[2048];
struct list * cursor;
TRACE("(%s,%s,%s)\n", debugstr_w(lpszUrl),
debugstr_w(lpszCookieName), debugstr_w(lpCookieData));
if (!lpCookieData || !strlenW(lpCookieData))
{
TRACE("no cookie data, not adding\n");
return FALSE;
}
if (!lpszCookieName)
{
/* some apps (or is it us??) try to add a cookie with no cookie name, but
* the cookie data in the form of name=data. */
/* FIXME, probably a bug here, for now I don't care */
WCHAR *ourCookieName, *ourCookieData;
int ourCookieNameSize;
BOOL ret;
if (!(ourCookieData = strchrW(lpCookieData, '=')))
{
TRACE("something terribly wrong with cookie data %s\n",
debugstr_w(ourCookieData));
return FALSE;
}
ourCookieNameSize = ourCookieData - lpCookieData;
ourCookieData += 1;
ourCookieName = HeapAlloc(GetProcessHeap(), 0,
(ourCookieNameSize + 1)*sizeof(WCHAR));
memcpy(ourCookieName, ourCookieData, ourCookieNameSize * sizeof(WCHAR));
ourCookieName[ourCookieNameSize] = '\0';
TRACE("setting (hacked) cookie of %s, %s\n",
debugstr_w(ourCookieName), debugstr_w(ourCookieData));
ret = InternetSetCookieW(lpszUrl, ourCookieName, ourCookieData);
HeapFree(GetProcessHeap(), 0, ourCookieName);
return ret;
}
COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
LIST_FOR_EACH(cursor, &domain_list)
{
thisCookieDomain = LIST_ENTRY(cursor, cookie_domain, entry);
if (COOKIE_matchDomain(hostName, NULL /* FIXME: path */, thisCookieDomain, FALSE))
break;
thisCookieDomain = NULL;
}
if (!thisCookieDomain)
thisCookieDomain = COOKIE_addDomain(hostName, path);
if ((thisCookie = COOKIE_findCookie(thisCookieDomain, lpszCookieName)))
COOKIE_deleteCookie(thisCookie, FALSE);
thisCookie = COOKIE_addCookie(thisCookieDomain, lpszCookieName, lpCookieData);
return TRUE;
}
/***********************************************************************
* InternetSetCookieA (WININET.@)
*
* Sets cookie for the specified url
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI InternetSetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
LPCSTR lpCookieData)
{
DWORD len;
LPWSTR szCookieData = NULL, szUrl = NULL, szCookieName = NULL;
BOOL r;
TRACE("(%s,%s,%s)\n", debugstr_a(lpszUrl),
debugstr_a(lpszCookieName), debugstr_a(lpCookieData));
if( lpszUrl )
{
len = MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, NULL, 0 );
szUrl = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszUrl, -1, szUrl, len );
}
if( lpszCookieName )
{
len = MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, NULL, 0 );
szCookieName = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpszCookieName, -1, szCookieName, len );
}
if( lpCookieData )
{
len = MultiByteToWideChar( CP_ACP, 0, lpCookieData, -1, NULL, 0 );
szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, lpCookieData, -1, szCookieData, len );
}
r = InternetSetCookieW( szUrl, szCookieName, szCookieData );
HeapFree( GetProcessHeap(), 0, szCookieData );
HeapFree( GetProcessHeap(), 0, szCookieName );
HeapFree( GetProcessHeap(), 0, szUrl );
return r;
}

View file

@ -0,0 +1,384 @@
/*
* Wininet
*
* Copyright 2003 Mike McCormack for CodeWeavers Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "wininet.h"
#include "winnetwk.h"
#include "winnls.h"
#include "wine/debug.h"
#include "winerror.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "internet.h"
#include "wine/unicode.h"
#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
struct WININET_ErrorDlgParams
{
HWND hWnd;
HINTERNET hRequest;
DWORD dwError;
DWORD dwFlags;
LPVOID* lppvData;
};
/***********************************************************************
* WININET_GetProxyServer
*
* Determine the name of the proxy server the request is using
*/
static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
{
LPWININETHTTPREQW lpwhr;
LPWININETHTTPSESSIONW lpwhs = NULL;
LPWININETAPPINFOW hIC = NULL;
LPWSTR p;
lpwhr = (LPWININETHTTPREQW) WININET_GetObject( hRequest );
if (NULL == lpwhr)
return FALSE;
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
if (NULL == lpwhs)
return FALSE;
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
if (NULL == hIC)
return FALSE;
lstrcpynW(szBuf, hIC->lpszProxy, sz);
/* FIXME: perhaps it would be better to use InternetCrackUrl here */
p = strchrW(szBuf, ':');
if(*p)
*p = 0;
return TRUE;
}
/***********************************************************************
* WININET_GetAuthRealm
*
* Determine the name of the (basic) Authentication realm
*/
static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
{
LPWSTR p, q;
DWORD index;
static const WCHAR szRealm[] = { 'r','e','a','l','m','=',0 };
/* extract the Realm from the proxy response and show it */
index = 0;
if( !HttpQueryInfoW( hRequest, HTTP_QUERY_PROXY_AUTHENTICATE,
szBuf, &sz, &index) )
return FALSE;
/*
* FIXME: maybe we should check that we're
* dealing with 'Basic' Authentication
*/
p = strchrW( szBuf, ' ' );
if( p && !strncmpW( p+1, szRealm, strlenW(szRealm) ) )
{
/* remove quotes */
p += 7;
if( *p == '"' )
{
p++;
q = strrchrW( p, '"' );
if( q )
*q = 0;
}
}
strcpyW( szBuf, p );
return TRUE;
}
/***********************************************************************
* WININET_GetSetPassword
*/
static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
LPCWSTR szRealm, BOOL bSet )
{
WCHAR szResource[0x80], szUserPass[0x40];
LPWSTR p;
HWND hUserItem, hPassItem;
DWORD r, dwMagic = 19;
UINT r_len, u_len;
WORD sz;
static const WCHAR szColon[] = { ':',0 };
static const WCHAR szbs[] = { '/', 0 };
hUserItem = GetDlgItem( hdlg, IDC_USERNAME );
hPassItem = GetDlgItem( hdlg, IDC_PASSWORD );
/* now try fetch the username and password */
lstrcpyW( szResource, szServer);
lstrcatW( szResource, szbs);
lstrcatW( szResource, szRealm);
/*
* WNetCachePassword is only concerned with the length
* of the data stored (which we tell it) and it does
* not use strlen() internally so we can add WCHAR data
* instead of ASCII data and get it back the same way.
*/
if( bSet )
{
szUserPass[0] = 0;
GetWindowTextW( hUserItem, szUserPass,
(sizeof szUserPass-1)/sizeof(WCHAR) );
lstrcatW(szUserPass, szColon);
u_len = strlenW( szUserPass );
GetWindowTextW( hPassItem, szUserPass+u_len,
(sizeof szUserPass)/sizeof(WCHAR)-u_len );
r_len = (strlenW( szResource ) + 1)*sizeof(WCHAR);
u_len = (strlenW( szUserPass ) + 1)*sizeof(WCHAR);
r = WNetCachePassword( (CHAR*)szResource, r_len,
(CHAR*)szUserPass, u_len, dwMagic, 0 );
return ( r == WN_SUCCESS );
}
sz = sizeof szUserPass;
r_len = (strlenW( szResource ) + 1)*sizeof(WCHAR);
r = WNetGetCachedPassword( (CHAR*)szResource, r_len,
(CHAR*)szUserPass, &sz, dwMagic );
if( r != WN_SUCCESS )
return FALSE;
p = strchrW( szUserPass, ':' );
if( p )
{
*p = 0;
SetWindowTextW( hUserItem, szUserPass );
SetWindowTextW( hPassItem, p+1 );
}
return TRUE;
}
/***********************************************************************
* WININET_SetProxyAuthorization
*/
static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
LPWSTR username, LPWSTR password )
{
LPWININETHTTPREQW lpwhr;
LPWININETHTTPSESSIONW lpwhs;
LPWININETAPPINFOW hIC;
LPWSTR p;
lpwhr = (LPWININETHTTPREQW) WININET_GetObject( hRequest );
if( !lpwhr )
return FALSE;
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
{
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
return FALSE;
}
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
p = HeapAlloc( GetProcessHeap(), 0, (strlenW( username ) + 1)*sizeof(WCHAR) );
if( !p )
return FALSE;
lstrcpyW( p, username );
hIC->lpszProxyUsername = p;
p = HeapAlloc( GetProcessHeap(), 0, (strlenW( password ) + 1)*sizeof(WCHAR) );
if( !p )
return FALSE;
lstrcpyW( p, password );
hIC->lpszProxyPassword = p;
return TRUE;
}
/***********************************************************************
* WININET_ProxyPasswordDialog
*/
static INT_PTR WINAPI WININET_ProxyPasswordDialog(
HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
HWND hitem;
struct WININET_ErrorDlgParams *params;
WCHAR szRealm[0x80], szServer[0x80];
if( uMsg == WM_INITDIALOG )
{
TRACE("WM_INITDIALOG (%08lx)\n", lParam);
/* save the parameter list */
params = (struct WININET_ErrorDlgParams*) lParam;
SetWindowLongPtrW( hdlg, GWLP_USERDATA, lParam );
/* extract the Realm from the proxy response and show it */
if( WININET_GetAuthRealm( params->hRequest,
szRealm, sizeof szRealm/sizeof(WCHAR)) )
{
hitem = GetDlgItem( hdlg, IDC_REALM );
SetWindowTextW( hitem, szRealm );
}
/* extract the name of the proxy server */
if( WININET_GetProxyServer( params->hRequest,
szServer, sizeof szServer/sizeof(WCHAR)) )
{
hitem = GetDlgItem( hdlg, IDC_PROXY );
SetWindowTextW( hitem, szServer );
}
WININET_GetSetPassword( hdlg, szServer, szRealm, FALSE );
return TRUE;
}
params = (struct WININET_ErrorDlgParams*)
GetWindowLongPtrW( hdlg, GWLP_USERDATA );
switch( uMsg )
{
case WM_COMMAND:
if( wParam == IDOK )
{
WCHAR username[0x20], password[0x20];
username[0] = 0;
hitem = GetDlgItem( hdlg, IDC_USERNAME );
if( hitem )
GetWindowTextW( hitem, username, sizeof username/sizeof(WCHAR) );
password[0] = 0;
hitem = GetDlgItem( hdlg, IDC_PASSWORD );
if( hitem )
GetWindowTextW( hitem, password, sizeof password/sizeof(WCHAR) );
hitem = GetDlgItem( hdlg, IDC_SAVEPASSWORD );
if( hitem &&
SendMessageW( hitem, BM_GETSTATE, 0, 0 ) &&
WININET_GetAuthRealm( params->hRequest,
szRealm, sizeof szRealm/sizeof(WCHAR)) &&
WININET_GetProxyServer( params->hRequest,
szServer, sizeof szServer/sizeof(WCHAR)) )
{
WININET_GetSetPassword( hdlg, szServer, szRealm, TRUE );
}
WININET_SetProxyAuthorization( params->hRequest, username, password );
EndDialog( hdlg, ERROR_INTERNET_FORCE_RETRY );
return TRUE;
}
if( wParam == IDCANCEL )
{
EndDialog( hdlg, 0 );
return TRUE;
}
break;
}
return FALSE;
}
/***********************************************************************
* WININET_GetConnectionStatus
*/
static INT WININET_GetConnectionStatus( HINTERNET hRequest )
{
WCHAR szStatus[0x20];
DWORD sz, index, dwStatus;
TRACE("%p\n", hRequest );
sz = sizeof szStatus;
index = 0;
if( !HttpQueryInfoW( hRequest, HTTP_QUERY_STATUS_CODE,
szStatus, &sz, &index))
return -1;
dwStatus = atoiW( szStatus );
TRACE("request %p status = %ld\n", hRequest, dwStatus );
return dwStatus;
}
/***********************************************************************
* InternetErrorDlg
*/
DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
DWORD dwError, DWORD dwFlags, LPVOID* lppvData)
{
struct WININET_ErrorDlgParams params;
HMODULE hwininet = GetModuleHandleA( "wininet.dll" );
INT dwStatus;
TRACE("%p %p %ld %08lx %p\n", hWnd, hRequest, dwError, dwFlags, lppvData);
params.hWnd = hWnd;
params.hRequest = hRequest;
params.dwError = dwError;
params.dwFlags = dwFlags;
params.lppvData = lppvData;
switch( dwError )
{
case ERROR_SUCCESS:
if( !(dwFlags & FLAGS_ERROR_UI_FILTER_FOR_ERRORS ) )
return 0;
dwStatus = WININET_GetConnectionStatus( hRequest );
if( HTTP_STATUS_PROXY_AUTH_REQ != dwStatus )
return ERROR_SUCCESS;
return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
hWnd, WININET_ProxyPasswordDialog, (LPARAM) &params );
case ERROR_INTERNET_INCORRECT_PASSWORD:
return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
hWnd, WININET_ProxyPasswordDialog, (LPARAM) &params );
case ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR:
case ERROR_INTERNET_INVALID_CA:
case ERROR_INTERNET_POST_IS_NON_SECURE:
case ERROR_INTERNET_SEC_CERT_CN_INVALID:
case ERROR_INTERNET_SEC_CERT_DATE_INVALID:
FIXME("Need to display dialog for error %ld\n", dwError);
return ERROR_SUCCESS;
}
return ERROR_INVALID_PARAMETER;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,256 @@
/*
* WININET - Gopher implementation
*
* Copyright 2003 Kirill Smelkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
/***********************************************************************
* GopherCreateLocatorA (WININET.@)
*
* Create a Gopher locator string from its component parts
*
* PARAMS
* lpszHost [I] host name
* nServerPort [I] port in host byteorder or INTERNET_INVALID_PORT_NUMBER for default
* lpszDisplayString [I] document/directory to display (NULL - default directory)
* lpszSelectorString [I] selector string for server (NULL - none)
* dwGopherType [I] selector type (see GOPHER_TYPE_xxx)
* lpszLocator [O] buffer for locator string
* lpdwBufferLength [I] locator buffer length
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI GopherCreateLocatorA(
LPCSTR lpszHost,
INTERNET_PORT nServerPort,
LPCSTR lpszDisplayString,
LPCSTR lpszSelectorString,
DWORD dwGopherType,
LPSTR lpszLocator,
LPDWORD lpdwBufferLength
)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherCreateLocatorW (WININET.@)
*
* Unicode version of GopherCreateLocatorA
*/
BOOL WINAPI GopherCreateLocatorW(
LPCWSTR lpszHost,
INTERNET_PORT nServerPort,
LPCWSTR lpszDisplayString,
LPCWSTR lpszSelectorString,
DWORD dwHopherType,
LPWSTR lpszLocator,
LPDWORD lpdwBufferLength
)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherFindFirstFileA (WININET.@)
*
* Create a session and locate the requested documents
*
* PARAMS
* hConnect [I] Handle to a Gopher session returned by InternetConnect
* lpszLocator [I] - address of a string containing the name of the item to locate.
* - Locator created by the GopherCreateLocator function.
* lpszSearchString [I] what to search for if this request is to an index server.
* Otherwise, this parameter should be NULL.
* lpFindData [O] retrived information
* dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
* dwContext [I] application private value
*
* RETURNS
* HINTERNET handle on success
* NULL on error
*/
HINTERNET WINAPI GopherFindFirstFileA(
HINTERNET hConnect,
LPCSTR lpszLocator,
LPCSTR lpszSearchString,
LPGOPHER_FIND_DATAA
lpFindData,
DWORD dwFlags,
DWORD dwContext
)
{
FIXME("stub\n");
return NULL;
}
/***********************************************************************
* GopherFindFirstFileW (WININET.@)
*
* Unicode version of GopherFindFirstFileA
*/
HINTERNET WINAPI GopherFindFirstFileW(
HINTERNET hConnect,
LPCWSTR lpszLocator,
LPCWSTR lpszSearchString,
LPGOPHER_FIND_DATAW
lpFindData,
DWORD dwFlags,
DWORD dwContext
)
{
FIXME("stub\n");
return NULL;
}
/***********************************************************************
* GopherGetAttributeA (WININET.@)
*
* Retrieves the specific attribute information from the server.
*
* RETURNS
* TRUE on success
* FALSE on failure
*/
BOOL WINAPI GopherGetAttributeA(
HINTERNET hConnect,
LPCSTR lpszLocator,
LPCSTR lpszAttributeName,
LPBYTE lpBuffer,
DWORD dwBufferLength,
LPDWORD lpdwCharactersReturned,
GOPHER_ATTRIBUTE_ENUMERATORA
lpfnEnumerator,
DWORD dwContext
)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherGetAttributeW (WININET.@)
*
* Unicode version of GopherGetAttributeA
*/
BOOL WINAPI GopherGetAttributeW(
HINTERNET hConnect,
LPCWSTR lpszLocator,
LPCWSTR lpszAttributeName,
LPBYTE lpBuffer,
DWORD dwBufferLength,
LPDWORD lpdwCharactersReturned,
GOPHER_ATTRIBUTE_ENUMERATORW
lpfnEnumerator,
DWORD dwContext
)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherGetLocatorTypeA (WININET.@)
*
* Parses a Gopher locator and determines its attributes.
*
* PARAMS
* lpszLocator [I] Address of the Gopher locator string to parse
* lpdwGopherType [O] destination for bitmasked type of locator
*
* RETURNS
* TRUE on success
* FALSE on failure
*/
BOOL WINAPI GopherGetLocatorTypeA(LPCSTR lpszLocator, LPDWORD lpdwGopherType)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherGetLocatorTypeW (WININET.@)
*
* Unicode version of GopherGetLocatorTypeA
*/
BOOL WINAPI GopherGetLocatorTypeW(LPCWSTR lpszLocator, LPDWORD lpdwGopherType)
{
FIXME("stub\n");
return FALSE;
}
/***********************************************************************
* GopherOpenFileA (WININET.@)
*
* Begins reading a Gopher data file from a Gopher server.
*
* PARAMS
* hConnect [I] handle to a Gopher session
* lpszLocator [I] file locator
* lpszView [I] file view (or default if NULL)
* dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
* dwContext [I] application private value
*
* RETURNS
* handle on success
* NULL on error
*/
HINTERNET WINAPI GopherOpenFileA(
HINTERNET hConnect,
LPCSTR lpszLocator,
LPCSTR lpszView,
DWORD dwFlags,
DWORD dwContext
)
{
FIXME("stub\n");
return NULL;
}
/***********************************************************************
* GopherOpenFileW (WININET.@)
*
* Unicode version of GopherOpenFileA
*/
HINTERNET WINAPI GopherOpenFileW(
HINTERNET hConnect,
LPCWSTR lpszLocator,
LPCWSTR lpszView,
DWORD dwFlags,
DWORD dwContext
)
{
FIXME("stub\n");
return NULL;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,483 @@
/*
* Wininet
*
* Copyright 1999 Corel Corporation
*
* Ulrich Czekalla
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _WINE_INTERNET_H_
#define _WINE_INTERNET_H_
#include "wine/unicode.h"
#include <time.h>
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <sys/types.h>
# include <netinet/in.h>
#endif
#ifdef HAVE_OPENSSL_SSL_H
#define DSA __ssl_DSA /* avoid conflict with commctrl.h */
#undef FAR
# include <openssl/ssl.h>
#undef FAR
#define FAR do_not_use_this_in_wine
#undef DSA
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#if defined(__MINGW32__) || defined (_MSC_VER)
#include "winsock2.h"
#ifndef MSG_WAITALL
#define MSG_WAITALL 0
#endif
#else
#define closesocket close
#endif /* __MINGW32__ */
/* used for netconnection.c stuff */
typedef struct
{
BOOL useSSL;
int socketFD;
#ifdef HAVE_OPENSSL_SSL_H
SSL *ssl_s;
int ssl_sock;
#endif
} WININET_NETCONNECTION;
inline static LPSTR WININET_strdup( LPCSTR str )
{
LPSTR ret = HeapAlloc( GetProcessHeap(), 0, strlen(str) + 1 );
if (ret) strcpy( ret, str );
return ret;
}
inline static LPWSTR WININET_strdupW( LPCWSTR str )
{
LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, (strlenW(str) + 1)*sizeof(WCHAR) );
if (ret) strcpyW( ret, str );
return ret;
}
inline static LPWSTR WININET_strdup_AtoW( LPCSTR str )
{
int len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0);
LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
if (ret)
MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len);
return ret;
}
inline static LPSTR WININET_strdup_WtoA( LPCWSTR str )
{
int len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
LPSTR ret = HeapAlloc( GetProcessHeap(), 0, len );
if (ret)
WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL);
return ret;
}
inline static void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND_DATAA dataA)
{
dataA->dwFileAttributes = dataW->dwFileAttributes;
dataA->ftCreationTime = dataW->ftCreationTime;
dataA->ftLastAccessTime = dataW->ftLastAccessTime;
dataA->ftLastWriteTime = dataW->ftLastWriteTime;
dataA->nFileSizeHigh = dataW->nFileSizeHigh;
dataA->nFileSizeLow = dataW->nFileSizeLow;
dataA->dwReserved0 = dataW->dwReserved0;
dataA->dwReserved1 = dataW->dwReserved1;
WideCharToMultiByte(CP_ACP, 0, dataW->cFileName, -1,
dataA->cFileName, sizeof(dataA->cFileName),
NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, dataW->cAlternateFileName, -1,
dataA->cAlternateFileName, sizeof(dataA->cAlternateFileName),
NULL, NULL);
}
typedef enum
{
WH_HINIT = INTERNET_HANDLE_TYPE_INTERNET,
WH_HFTPSESSION = INTERNET_HANDLE_TYPE_CONNECT_FTP,
WH_HGOPHERSESSION = INTERNET_HANDLE_TYPE_CONNECT_GOPHER,
WH_HHTTPSESSION = INTERNET_HANDLE_TYPE_CONNECT_HTTP,
WH_HFILE = INTERNET_HANDLE_TYPE_FTP_FILE,
WH_HFINDNEXT = INTERNET_HANDLE_TYPE_FTP_FIND,
WH_HHTTPREQ = INTERNET_HANDLE_TYPE_HTTP_REQUEST,
} WH_TYPE;
#define INET_OPENURL 0x0001
#define INET_CALLBACKW 0x0002
struct _WININETHANDLEHEADER;
typedef struct _WININETHANDLEHEADER WININETHANDLEHEADER, *LPWININETHANDLEHEADER;
typedef void (*WININET_object_destructor)( LPWININETHANDLEHEADER );
struct _WININETHANDLEHEADER
{
WH_TYPE htype;
DWORD dwFlags;
DWORD dwContext;
DWORD dwError;
DWORD dwInternalFlags;
DWORD dwRefCount;
WININET_object_destructor destroy;
INTERNET_STATUS_CALLBACK lpfnStatusCB;
struct _WININETHANDLEHEADER *lpwhparent;
};
typedef struct
{
WININETHANDLEHEADER hdr;
LPWSTR lpszAgent;
LPWSTR lpszProxy;
LPWSTR lpszProxyBypass;
LPWSTR lpszProxyUsername;
LPWSTR lpszProxyPassword;
DWORD dwAccessType;
} WININETAPPINFOW, *LPWININETAPPINFOW;
typedef struct
{
WININETHANDLEHEADER hdr;
LPWSTR lpszServerName;
LPWSTR lpszUserName;
INTERNET_PORT nServerPort;
struct sockaddr_in socketAddress;
struct hostent *phostent;
} WININETHTTPSESSIONW, *LPWININETHTTPSESSIONW;
#define HDR_ISREQUEST 0x0001
#define HDR_COMMADELIMITED 0x0002
#define HDR_SEMIDELIMITED 0x0004
typedef struct
{
LPWSTR lpszField;
LPWSTR lpszValue;
WORD wFlags;
WORD wCount;
} HTTPHEADERW, *LPHTTPHEADERW;
typedef struct
{
WININETHANDLEHEADER hdr;
LPWSTR lpszPath;
LPWSTR lpszVerb;
LPWSTR lpszRawHeaders;
WININET_NETCONNECTION netConnection;
HTTPHEADERW StdHeaders[HTTP_QUERY_MAX+1];
HTTPHEADERW *pCustHeaders;
DWORD nCustHeaders;
} WININETHTTPREQW, *LPWININETHTTPREQW;
typedef struct
{
WININETHANDLEHEADER hdr;
BOOL session_deleted;
int nDataSocket;
} WININETFILE, *LPWININETFILE;
typedef struct
{
WININETHANDLEHEADER hdr;
int sndSocket;
int lstnSocket;
int pasvSocket; /* data socket connected by us in case of passive FTP */
LPWININETFILE download_in_progress;
struct sockaddr_in socketAddress;
struct sockaddr_in lstnSocketAddress;
struct hostent *phostent;
LPWSTR lpszPassword;
LPWSTR lpszUserName;
} WININETFTPSESSIONW, *LPWININETFTPSESSIONW;
typedef struct
{
BOOL bIsDirectory;
LPWSTR lpszName;
DWORD nSize;
struct tm tmLastModified;
unsigned short permissions;
} FILEPROPERTIESW, *LPFILEPROPERTIESW;
typedef struct
{
WININETHANDLEHEADER hdr;
DWORD index;
DWORD size;
LPFILEPROPERTIESW lpafp;
} WININETFINDNEXTW, *LPWININETFINDNEXTW;
typedef enum
{
FTPPUTFILEW,
FTPSETCURRENTDIRECTORYW,
FTPCREATEDIRECTORYW,
FTPFINDFIRSTFILEW,
FTPGETCURRENTDIRECTORYW,
FTPOPENFILEW,
FTPGETFILEW,
FTPDELETEFILEW,
FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW,
INTERNETFINDNEXTW,
HTTPSENDREQUESTW,
HTTPOPENREQUESTW,
SENDCALLBACK,
INTERNETOPENURLW,
} ASYNC_FUNC;
struct WORKREQ_FTPPUTFILEW
{
LPWSTR lpszLocalFile;
LPWSTR lpszNewRemoteFile;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_FTPSETCURRENTDIRECTORYW
{
LPWSTR lpszDirectory;
};
struct WORKREQ_FTPCREATEDIRECTORYW
{
LPWSTR lpszDirectory;
};
struct WORKREQ_FTPFINDFIRSTFILEW
{
LPWSTR lpszSearchFile;
LPWIN32_FIND_DATAW lpFindFileData;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_FTPGETCURRENTDIRECTORYW
{
LPWSTR lpszDirectory;
DWORD *lpdwDirectory;
};
struct WORKREQ_FTPOPENFILEW
{
LPWSTR lpszFilename;
DWORD dwAccess;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_FTPGETFILEW
{
LPWSTR lpszRemoteFile;
LPWSTR lpszNewFile;
BOOL fFailIfExists;
DWORD dwLocalFlagsAttribute;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_FTPDELETEFILEW
{
LPWSTR lpszFilename;
};
struct WORKREQ_FTPREMOVEDIRECTORYW
{
LPWSTR lpszDirectory;
};
struct WORKREQ_FTPRENAMEFILEW
{
LPWSTR lpszSrcFile;
LPWSTR lpszDestFile;
};
struct WORKREQ_INTERNETFINDNEXTW
{
LPWIN32_FIND_DATAW lpFindFileData;
};
struct WORKREQ_HTTPOPENREQUESTW
{
LPWSTR lpszVerb;
LPWSTR lpszObjectName;
LPWSTR lpszVersion;
LPWSTR lpszReferrer;
LPCWSTR *lpszAcceptTypes;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_HTTPSENDREQUESTW
{
LPWSTR lpszHeader;
DWORD dwHeaderLength;
LPVOID lpOptional;
DWORD dwOptionalLength;
};
struct WORKREQ_SENDCALLBACK
{
DWORD dwContext;
DWORD dwInternetStatus;
LPVOID lpvStatusInfo;
DWORD dwStatusInfoLength;
};
struct WORKREQ_INTERNETOPENURLW
{
HINTERNET hInternet;
LPWSTR lpszUrl;
LPWSTR lpszHeaders;
DWORD dwHeadersLength;
DWORD dwFlags;
DWORD dwContext;
};
typedef struct WORKREQ
{
ASYNC_FUNC asyncall;
WININETHANDLEHEADER *hdr;
union {
struct WORKREQ_FTPPUTFILEW FtpPutFileW;
struct WORKREQ_FTPSETCURRENTDIRECTORYW FtpSetCurrentDirectoryW;
struct WORKREQ_FTPCREATEDIRECTORYW FtpCreateDirectoryW;
struct WORKREQ_FTPFINDFIRSTFILEW FtpFindFirstFileW;
struct WORKREQ_FTPGETCURRENTDIRECTORYW FtpGetCurrentDirectoryW;
struct WORKREQ_FTPOPENFILEW FtpOpenFileW;
struct WORKREQ_FTPGETFILEW FtpGetFileW;
struct WORKREQ_FTPDELETEFILEW FtpDeleteFileW;
struct WORKREQ_FTPREMOVEDIRECTORYW FtpRemoveDirectoryW;
struct WORKREQ_FTPRENAMEFILEW FtpRenameFileW;
struct WORKREQ_INTERNETFINDNEXTW InternetFindNextW;
struct WORKREQ_HTTPOPENREQUESTW HttpOpenRequestW;
struct WORKREQ_HTTPSENDREQUESTW HttpSendRequestW;
struct WORKREQ_SENDCALLBACK SendCallback;
struct WORKREQ_INTERNETOPENURLW InternetOpenUrlW;
} u;
struct WORKREQ *next;
struct WORKREQ *prev;
} WORKREQUEST, *LPWORKREQUEST;
HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info );
LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet );
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info );
BOOL WININET_Release( LPWININETHANDLEHEADER info );
BOOL WININET_FreeHandle( HINTERNET hinternet );
HINTERNET WININET_FindHandle( LPWININETHANDLEHEADER info );
time_t ConvertTimeString(LPCWSTR asctime);
HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD dwContext,
DWORD dwInternalFlags);
HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD dwContext,
DWORD dwInternalFlags);
BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
struct hostent **phe, struct sockaddr_in *psa);
void INTERNET_SetLastError(DWORD dwError);
DWORD INTERNET_GetLastError(void);
BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest);
LPSTR INTERNET_GetResponseBuffer(void);
LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen);
BOOLAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD dwContext);
BOOLAPI FTP_FtpSetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
BOOLAPI FTP_FtpCreateDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
INTERNETAPI HINTERNET WINAPI FTP_FtpFindFirstFileW(LPWININETFTPSESSIONW lpwfs,
LPCWSTR lpszSearchFile, LPWIN32_FIND_DATAW lpFindFileData, DWORD dwFlags, DWORD dwContext);
BOOLAPI FTP_FtpGetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPWSTR lpszCurrentDirectory,
LPDWORD lpdwCurrentDirectory);
BOOL FTP_ConvertFileProp(LPFILEPROPERTIESW lpafp, LPWIN32_FIND_DATAW lpFindFileData);
BOOL FTP_FtpRenameFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszSrc, LPCWSTR lpszDest);
BOOL FTP_FtpRemoveDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
BOOL FTP_FtpDeleteFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName);
HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName,
DWORD fdwAccess, DWORD dwFlags, DWORD dwContext);
BOOLAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, LPCWSTR lpszNewFile,
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
DWORD dwContext);
BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength);
INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD dwContext);
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength);
VOID SendSyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength);
BOOL HTTP_InsertProxyAuthorization( LPWININETHTTPREQW lpwhr,
LPCWSTR username, LPCWSTR password );
BOOL NETCON_connected(WININET_NETCONNECTION *connection);
void NETCON_init(WININET_NETCONNECTION *connnection, BOOL useSSL);
BOOL NETCON_create(WININET_NETCONNECTION *connection, int domain,
int type, int protocol);
BOOL NETCON_close(WININET_NETCONNECTION *connection);
BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr,
unsigned int addrlen);
BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len, int flags,
int *sent /* out */);
BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags,
int *recvd /* out */);
BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer);
#define MAX_REPLY_LEN 0x5B4
/* Used for debugging - maybe need to be shared in the Wine debugging code ? */
typedef struct
{
DWORD val;
const char* name;
} wininet_flag_info;
extern void dump_INTERNET_FLAGS(DWORD dwFlags) ;
#endif /* _WINE_INTERNET_H_ */

View file

@ -0,0 +1,502 @@
/*
* Wininet - networking layer. Uses unix sockets or OpenSSL.
*
* Copyright 2002 TransGaming Technologies Inc.
*
* David Hammerton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "wine/library.h"
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "winerror.h"
#include "wine/debug.h"
#include "internet.h"
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
/* FIXME!!!!!!
* This should use winsock - To use winsock the functions will have to change a bit
* as they are designed for unix sockets.
* SSL stuff should use crypt32.dll
*/
#ifdef HAVE_OPENSSL_SSL_H
#ifndef SONAME_LIBSSL
#define SONAME_LIBSSL "libssl.so"
#endif
#ifndef SONAME_LIBCRYPTO
#define SONAME_LIBCRYPTO "libcrypto.so"
#endif
static void *OpenSSL_ssl_handle;
static void *OpenSSL_crypto_handle;
static SSL_METHOD *meth;
static SSL_CTX *ctx;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
/* OpenSSL functions that we use */
MAKE_FUNCPTR(SSL_library_init);
MAKE_FUNCPTR(SSL_load_error_strings);
MAKE_FUNCPTR(SSLv23_method);
MAKE_FUNCPTR(SSL_CTX_new);
MAKE_FUNCPTR(SSL_new);
MAKE_FUNCPTR(SSL_set_bio);
MAKE_FUNCPTR(SSL_connect);
MAKE_FUNCPTR(SSL_write);
MAKE_FUNCPTR(SSL_read);
MAKE_FUNCPTR(SSL_CTX_get_timeout);
MAKE_FUNCPTR(SSL_CTX_set_timeout);
/* OpenSSL's libcrypto functions that we use */
MAKE_FUNCPTR(BIO_new_socket);
MAKE_FUNCPTR(BIO_new_fp);
#undef MAKE_FUNCPTR
#endif
void NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL)
{
connection->useSSL = useSSL;
connection->socketFD = -1;
if (connection->useSSL)
{
#ifdef HAVE_OPENSSL_SSL_H
TRACE("using SSL connection\n");
connection->ssl_sock = -1;
if (OpenSSL_ssl_handle) /* already initilzed everything */
return;
OpenSSL_ssl_handle = wine_dlopen(SONAME_LIBSSL, RTLD_NOW, NULL, 0);
if (!OpenSSL_ssl_handle)
{
ERR("trying to use a SSL connection, but couldn't load %s. Expect trouble.\n",
SONAME_LIBSSL);
connection->useSSL = FALSE;
return;
}
OpenSSL_crypto_handle = wine_dlopen(SONAME_LIBCRYPTO, RTLD_NOW, NULL, 0);
if (!OpenSSL_crypto_handle)
{
ERR("trying to use a SSL connection, but couldn't load %s. Expect trouble.\n",
SONAME_LIBCRYPTO);
connection->useSSL = FALSE;
return;
}
/* mmm nice ugly macroness */
#define DYNSSL(x) \
p##x = wine_dlsym(OpenSSL_ssl_handle, #x, NULL, 0); \
if (!p##x) \
{ \
ERR("failed to load symbol %s\n", #x); \
connection->useSSL = FALSE; \
return; \
}
DYNSSL(SSL_library_init);
DYNSSL(SSL_load_error_strings);
DYNSSL(SSLv23_method);
DYNSSL(SSL_CTX_new);
DYNSSL(SSL_new);
DYNSSL(SSL_set_bio);
DYNSSL(SSL_connect);
DYNSSL(SSL_write);
DYNSSL(SSL_read);
DYNSSL(SSL_CTX_get_timeout);
DYNSSL(SSL_CTX_set_timeout);
#undef DYNSSL
#define DYNCRYPTO(x) \
p##x = wine_dlsym(OpenSSL_crypto_handle, #x, NULL, 0); \
if (!p##x) \
{ \
ERR("failed to load symbol %s\n", #x); \
connection->useSSL = FALSE; \
return; \
}
DYNCRYPTO(BIO_new_fp);
DYNCRYPTO(BIO_new_socket);
#undef DYNCRYPTO
pSSL_library_init();
pSSL_load_error_strings();
pBIO_new_fp(stderr, BIO_NOCLOSE); /* FIXME: should use winedebug stuff */
meth = pSSLv23_method();
/* FIXME: SECURITY PROBLEM! WE ARN'T VERIFYING THE HOSTS CERTIFICATES OR ANYTHING */
#else
FIXME("can't use SSL, not compiled in.\n");
connection->useSSL = FALSE;
#endif
}
}
BOOL NETCON_connected(WININET_NETCONNECTION *connection)
{
if (!connection->useSSL)
{
if (connection->socketFD == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
if (connection->ssl_sock == -1)
return FALSE;
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_create
* Basically calls 'socket()' unless useSSL is supplised,
* in which case we do other things.
*/
BOOL NETCON_create(WININET_NETCONNECTION *connection, int domain,
int type, int protocol)
{
if (!connection->useSSL)
{
connection->socketFD = socket(domain, type, protocol);
if (connection->socketFD == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
connection->ssl_sock = socket(domain, type, protocol);
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_close
* Basically calls 'close()' unless we should use SSL
*/
BOOL NETCON_close(WININET_NETCONNECTION *connection)
{
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
int result;
result = closesocket(connection->socketFD);
connection->socketFD = -1;
if (result == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
closesocket(connection->ssl_sock);
connection->ssl_sock = -1;
/* FIXME should we call SSL_shutdown here?? Probably on whatever is the
* opposite of NETCON_init.... */
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_connect
* Basically calls 'connect()' unless we should use SSL
*/
BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *serv_addr,
unsigned int addrlen)
{
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
int result;
result = connect(connection->socketFD, serv_addr, addrlen);
if (result == -1)
{
closesocket(connection->socketFD);
connection->socketFD = -1;
return FALSE;
}
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
BIO *sbio;
ctx = pSSL_CTX_new(meth);
connection->ssl_s = pSSL_new(ctx);
if (connect(connection->ssl_sock, serv_addr, addrlen) == -1)
return FALSE;
sbio = pBIO_new_socket(connection->ssl_sock, BIO_NOCLOSE);
pSSL_set_bio(connection->ssl_s, sbio, sbio);
if (pSSL_connect(connection->ssl_s) <= 0)
{
ERR("ssl couldn't connect\n");
return FALSE;
}
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_send
* Basically calls 'send()' unless we should use SSL
* number of chars send is put in *sent
*/
BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len, int flags,
int *sent /* out */)
{
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
*sent = send(connection->socketFD, msg, len, flags);
if (*sent == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
if (flags)
FIXME("SSL_write doesn't support any flags (%08x)\n", flags);
*sent = pSSL_write(connection->ssl_s, msg, len);
if (*sent < 1 && len)
return FALSE;
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_recv
* Basically calls 'recv()' unless we should use SSL
* number of chars received is put in *recvd
*/
BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags,
int *recvd /* out */)
{
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
*recvd = recv(connection->socketFD, buf, len, flags);
if (*recvd == -1)
return FALSE;
return TRUE;
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
static char *peek_msg = NULL;
static char *peek_msg_mem = NULL;
if (flags & (~MSG_PEEK))
FIXME("SSL_read does not support the following flag: %08x\n", flags);
/* this ugly hack is all for MSG_PEEK. eww gross */
if (flags & MSG_PEEK && !peek_msg)
{
peek_msg = peek_msg_mem = HeapAlloc(GetProcessHeap(), 0, (sizeof(char) * len) + 1);
}
else if (flags & MSG_PEEK && peek_msg)
{
size_t peek_msg_len = strlen(peek_msg);
if (len < peek_msg_len)
FIXME("buffer isn't big enough. Do the expect us to wrap?\n");
memcpy(buf, peek_msg, min(len,peek_msg_len+1));
*recvd = min(len, peek_msg_len);
return TRUE;
}
else if (peek_msg)
{
size_t peek_msg_len = strlen(peek_msg);
memcpy(buf, peek_msg, min(len,peek_msg_len+1));
peek_msg += *recvd = min(len, peek_msg_len);
if (*peek_msg == '\0' || *(peek_msg - 1) == '\0')
{
HeapFree(GetProcessHeap(), 0, peek_msg_mem);
peek_msg_mem = NULL;
peek_msg = NULL;
}
return TRUE;
}
*recvd = pSSL_read(connection->ssl_s, buf, len);
if (flags & MSG_PEEK) /* must copy stuff into buffer */
{
if (!*recvd)
{
HeapFree(GetProcessHeap(), 0, peek_msg_mem);
peek_msg_mem = NULL;
peek_msg = NULL;
}
else
{
memcpy(peek_msg, buf, *recvd);
peek_msg[*recvd] = '\0';
}
}
if (*recvd < 1 && len)
return FALSE;
return TRUE;
#else
return FALSE;
#endif
}
}
/******************************************************************************
* NETCON_getNextLine
*/
BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer)
{
TRACE("\n");
if (!NETCON_connected(connection)) return FALSE;
if (!connection->useSSL)
{
struct timeval tv;
fd_set infd;
BOOL bSuccess = FALSE;
DWORD nRecv = 0;
FD_ZERO(&infd);
FD_SET(connection->socketFD, &infd);
tv.tv_sec=RESPONSE_TIMEOUT;
tv.tv_usec=0;
while (nRecv < *dwBuffer)
{
if (select(connection->socketFD+1,&infd,NULL,NULL,&tv) > 0)
{
if (recv(connection->socketFD, &lpszBuffer[nRecv], 1, 0) <= 0)
{
INTERNET_SetLastError(ERROR_CONNECTION_ABORTED); /* fixme: right error? */
goto lend;
}
if (lpszBuffer[nRecv] == '\n')
{
bSuccess = TRUE;
break;
}
if (lpszBuffer[nRecv] != '\r')
nRecv++;
}
else
{
INTERNET_SetLastError(ERROR_INTERNET_TIMEOUT);
goto lend;
}
}
lend: /* FIXME: don't use labels */
if (bSuccess)
{
lpszBuffer[nRecv++] = '\0';
*dwBuffer = nRecv;
TRACE(":%lu %s\n", nRecv, lpszBuffer);
return TRUE;
}
else
{
return FALSE;
}
}
else
{
#ifdef HAVE_OPENSSL_SSL_H
long prev_timeout;
DWORD nRecv = 0;
BOOL success = TRUE;
prev_timeout = pSSL_CTX_get_timeout(ctx);
pSSL_CTX_set_timeout(ctx, RESPONSE_TIMEOUT);
while (nRecv < *dwBuffer)
{
int recv = 1;
if (!NETCON_recv(connection, &lpszBuffer[nRecv], 1, 0, &recv))
{
INTERNET_SetLastError(ERROR_CONNECTION_ABORTED);
success = FALSE;
}
if (lpszBuffer[nRecv] == '\n')
{
success = TRUE;
break;
}
if (lpszBuffer[nRecv] != '\r')
nRecv++;
}
pSSL_CTX_set_timeout(ctx, prev_timeout);
if (success)
{
lpszBuffer[nRecv++] = '\0';
*dwBuffer = nRecv;
TRACE("_SSL:%lu %s\n", nRecv, lpszBuffer);
return TRUE;
}
return FALSE;
#else
return FALSE;
#endif
}
}

View file

@ -0,0 +1,29 @@
/*
* Wininet resource definitions
*
* Copyright 2003 Mike McCormack for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define IDD_PROXYDLG 0x400
#define IDC_PROXY 0x401
#define IDC_REALM 0x402
#define IDC_USERNAME 0x403
#define IDC_PASSWORD 0x404
#define IDC_SAVEPASSWORD 0x405
#define IDS_LANCONNECTION 0x500

View file

@ -0,0 +1,53 @@
/*
* Top level resource file for Wininet
*
* Copyright 2003 Mike McCormack for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winnls.h"
#include "resource.h"
/*
* Everything that does not depend on language,
* like textless bitmaps etc, go into the
* neutral language. This will prevent them from
* being duplicated for each language.
*/
/* #include "wininet_xx.rc" */
/*
* Everything specific to any language goes
* in one of the specific files.
* Note that you can and may override resources
* which also have a neutral version. This is to
* get localized bitmaps for example.
*/
#include "wininet_Cs.rc"
#include "wininet_De.rc"
#include "wininet_En.rc"
#include "wininet_Es.rc"
#include "wininet_Fr.rc"
#include "wininet_It.rc"
#include "wininet_Ja.rc"
#include "wininet_Nl.rc"
#include "wininet_Pt.rc"
#include "wininet_Ru.rc"
#include "wininet_Si.rc"

View file

@ -0,0 +1,4 @@
Makefile
generated.ok
http.ok
testlist.c

View file

@ -0,0 +1,14 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = wininet.dll
IMPORTS = wininet
CTESTS = \
generated.c \
http.c
@MAKE_TEST_RULES@
### Dependencies:

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,501 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "wine/test.h"
#define TEST_URL "http://www.winehq.org/site/about"
#define TEST_URL_PATH "/site/about"
#define TEST_URL2 "http://www.myserver.com/myscript.php?arg=1"
#define TEST_URL2_SERVER "www.myserver.com"
#define TEST_URL2_PATH "/myscript.php"
#define TEST_URL2_PATHEXTRA "/myscript.php?arg=1"
#define TEST_URL2_EXTRA "?arg=1"
int goon = 0;
VOID WINAPI callback(
HINTERNET hInternet,
DWORD dwContext,
DWORD dwInternetStatus,
LPVOID lpvStatusInformation,
DWORD dwStatusInformationLength
)
{
char name[124];
switch (dwInternetStatus)
{
case INTERNET_STATUS_RESOLVING_NAME:
strcpy(name,"INTERNET_STATUS_RESOLVING_NAME");
break;
case INTERNET_STATUS_NAME_RESOLVED:
strcpy(name,"INTERNET_STATUS_NAME_RESOLVED");
break;
case INTERNET_STATUS_CONNECTING_TO_SERVER:
strcpy(name,"INTERNET_STATUS_CONNECTING_TO_SERVER");
break;
case INTERNET_STATUS_CONNECTED_TO_SERVER:
strcpy(name,"INTERNET_STATUS_CONNECTED_TO_SERVER");
break;
case INTERNET_STATUS_SENDING_REQUEST:
strcpy(name,"INTERNET_STATUS_SENDING_REQUEST");
break;
case INTERNET_STATUS_REQUEST_SENT:
strcpy(name,"INTERNET_STATUS_REQUEST_SENT");
break;
case INTERNET_STATUS_RECEIVING_RESPONSE:
strcpy(name,"INTERNET_STATUS_RECEIVING_RESPONSE");
break;
case INTERNET_STATUS_RESPONSE_RECEIVED:
strcpy(name,"INTERNET_STATUS_RESPONSE_RECEIVED");
break;
case INTERNET_STATUS_CTL_RESPONSE_RECEIVED:
strcpy(name,"INTERNET_STATUS_CTL_RESPONSE_RECEIVED");
break;
case INTERNET_STATUS_PREFETCH:
strcpy(name,"INTERNET_STATUS_PREFETCH");
break;
case INTERNET_STATUS_CLOSING_CONNECTION:
strcpy(name,"INTERNET_STATUS_CLOSING_CONNECTION");
break;
case INTERNET_STATUS_CONNECTION_CLOSED:
strcpy(name,"INTERNET_STATUS_CONNECTION_CLOSED");
break;
case INTERNET_STATUS_HANDLE_CREATED:
strcpy(name,"INTERNET_STATUS_HANDLE_CREATED");
break;
case INTERNET_STATUS_HANDLE_CLOSING:
strcpy(name,"INTERNET_STATUS_HANDLE_CLOSING");
break;
case INTERNET_STATUS_REQUEST_COMPLETE:
strcpy(name,"INTERNET_STATUS_REQUEST_COMPLETE");
goon = 1;
break;
case INTERNET_STATUS_REDIRECT:
strcpy(name,"INTERNET_STATUS_REDIRECT");
break;
case INTERNET_STATUS_INTERMEDIATE_RESPONSE:
strcpy(name,"INTERNET_STATUS_INTERMEDIATE_RESPONSE");
break;
}
trace("Callback %p 0x%lx %s(%li) %p %ld\n",hInternet,dwContext,name,dwInternetStatus,lpvStatusInformation,dwStatusInformationLength);
}
void winapi_test(int flags)
{
DWORD rc;
CHAR buffer[4000];
DWORD length;
DWORD out;
const char *types[2] = { "*", NULL };
HINTERNET hi, hic = 0, hor = 0;
trace("Starting with flags 0x%x\n",flags);
trace("InternetOpenA <--\n");
hi = InternetOpenA("",0x0,0x0,0x0,flags);
ok((hi != 0x0),"InternetOpen Failed\n");
trace("InternetOpenA -->\n");
if (hi == 0x0) goto abort;
InternetSetStatusCallback(hi,&callback);
trace("InternetConnectA <--\n");
hic=InternetConnectA(hi,"www.winehq.org",0x0,0x0,0x0,0x3,0x0,0xdeadbeef);
ok((hic != 0x0),"InternetConnect Failed\n");
trace("InternetConnectA -->\n");
if (hic == 0x0) goto abort;
trace("HttpOpenRequestA <--\n");
hor = HttpOpenRequestA(hic, "GET",
"/about/",
0x0,0x0,types,0x00400800,0xdeadbead);
if (hor == 0x0 && GetLastError() == 12007 /* ERROR_INTERNET_NAME_NOT_RESOLVED */) {
/*
* If the internet name can't be resolved we are probably behind
* a firewall or in some other way not directly connected to the
* Internet. Not enough reason to fail the test. Just ignore and
* abort.
*/
} else {
ok((hor != 0x0),"HttpOpenRequest Failed\n");
}
trace("HttpOpenRequestA -->\n");
if (hor == 0x0) goto abort;
trace("HttpSendRequestA -->\n");
SetLastError(0);
rc = HttpSendRequestA(hor, "", 0xffffffff,0x0,0x0);
if (flags)
ok(((rc == 0)&&(GetLastError()==997)),
"Asynchronous HttpSendRequest NOT returning 0 with error 997\n");
else
ok((rc != 0) || GetLastError() == 12007, /* 12007 == XP */
"Synchronous HttpSendRequest returning 0, error %ld\n", GetLastError());
trace("HttpSendRequestA <--\n");
while ((flags)&&(!goon))
Sleep(100);
length = 4;
rc = InternetQueryOptionA(hor,0x17,&out,&length);
trace("Option 0x17 -> %li %li\n",rc,out);
length = 100;
rc = InternetQueryOptionA(hor,0x22,buffer,&length);
trace("Option 0x22 -> %li %s\n",rc,buffer);
length = 4000;
rc = HttpQueryInfoA(hor,0x16,buffer,&length,0x0);
buffer[length]=0;
trace("Option 0x16 -> %li %s\n",rc,buffer);
length = 4000;
rc = InternetQueryOptionA(hor,0x22,buffer,&length);
buffer[length]=0;
trace("Option 0x22 -> %li %s\n",rc,buffer);
length = 16;
rc = HttpQueryInfoA(hor,0x5,&buffer,&length,0x0);
trace("Option 0x5 -> %li %s (%li)\n",rc,buffer,GetLastError());
length = 100;
rc = HttpQueryInfoA(hor,0x1,buffer,&length,0x0);
buffer[length]=0;
trace("Option 0x1 -> %li %s\n",rc,buffer);
length = 100;
trace("Entering Query loop\n");
while (length)
{
rc = InternetQueryDataAvailable(hor,&length,0x0,0x0);
ok(!(rc == 0 && length != 0),"InternetQueryDataAvailable failed\n");
if (length)
{
char *buffer;
buffer = HeapAlloc(GetProcessHeap(),0,length+1);
rc = InternetReadFile(hor,buffer,length,&length);
buffer[length]=0;
trace("ReadFile -> %li %li\n",rc,length);
HeapFree(GetProcessHeap(),0,buffer);
}
}
abort:
if (hor != 0x0) {
rc = InternetCloseHandle(hor);
ok ((rc != 0), "InternetCloseHandle of handle opened by HttpOpenRequestA failed\n");
rc = InternetCloseHandle(hor);
ok ((rc == 0), "Double close of handle opened by HttpOpenRequestA succeeded\n");
}
if (hic != 0x0) {
rc = InternetCloseHandle(hic);
ok ((rc != 0), "InternetCloseHandle of handle opened by InternetConnectA failed\n");
}
if (hi != 0x0) {
rc = InternetCloseHandle(hi);
ok ((rc != 0), "InternetCloseHandle of handle opened by InternetOpenA failed\n");
if (flags)
Sleep(100);
}
}
void InternetOpenUrlA_test(void)
{
HINTERNET myhinternet, myhttp;
char buffer[0x400];
URL_COMPONENTSA urlComponents;
char protocol[32], hostName[1024], userName[1024];
char password[1024], extra[1024], path[1024];
DWORD size, readbytes, totalbytes=0;
BOOL ret;
myhinternet = InternetOpen("Winetest",0,NULL,NULL,INTERNET_FLAG_NO_CACHE_WRITE);
ok((myhinternet != 0), "InternetOpen failed, error %lx\n",GetLastError());
size = 0x400;
ret = InternetCanonicalizeUrl(TEST_URL, buffer, &size,ICU_BROWSER_MODE);
ok( ret, "InternetCanonicalizeUrl failed, error %lx\n",GetLastError());
urlComponents.dwStructSize = sizeof(URL_COMPONENTSA);
urlComponents.lpszScheme = protocol;
urlComponents.dwSchemeLength = 32;
urlComponents.lpszHostName = hostName;
urlComponents.dwHostNameLength = 1024;
urlComponents.lpszUserName = userName;
urlComponents.dwUserNameLength = 1024;
urlComponents.lpszPassword = password;
urlComponents.dwPasswordLength = 1024;
urlComponents.lpszUrlPath = path;
urlComponents.dwUrlPathLength = 2048;
urlComponents.lpszExtraInfo = extra;
urlComponents.dwExtraInfoLength = 1024;
ret = InternetCrackUrl(TEST_URL, 0,0,&urlComponents);
ok( ret, "InternetCrackUrl failed, error %lx\n",GetLastError());
SetLastError(0);
myhttp = InternetOpenUrl(myhinternet, TEST_URL, 0, 0,
INTERNET_FLAG_RELOAD|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_FLAG_TRANSFER_BINARY,0);
if (GetLastError() == 12007)
return; /* WinXP returns this when not connected to the net */
ok((myhttp != 0),"InternetOpenUrl failed, error %lx\n",GetLastError());
ret = InternetReadFile(myhttp, buffer,0x400,&readbytes);
ok( ret, "InternetReadFile failed, error %lx\n",GetLastError());
totalbytes += readbytes;
while (readbytes && InternetReadFile(myhttp, buffer,0x400,&readbytes))
totalbytes += readbytes;
trace("read 0x%08lx bytes\n",totalbytes);
}
void InternetCrackUrl_test(void)
{
URL_COMPONENTSA urlComponents;
char protocol[32], hostName[1024], userName[1024];
char password[1024], extra[1024], path[1024];
BOOL ret;
urlComponents.dwStructSize = sizeof(URL_COMPONENTSA);
urlComponents.lpszScheme = protocol;
urlComponents.dwSchemeLength = 32;
urlComponents.lpszHostName = hostName;
urlComponents.dwHostNameLength = 1024;
urlComponents.lpszUserName = userName;
urlComponents.dwUserNameLength = 1024;
urlComponents.lpszPassword = password;
urlComponents.dwPasswordLength = 1024;
urlComponents.lpszUrlPath = path;
urlComponents.dwUrlPathLength = 2048;
urlComponents.lpszExtraInfo = extra;
urlComponents.dwExtraInfoLength = 1024;
ret = InternetCrackUrl(TEST_URL, 0,0,&urlComponents);
ok( ret, "InternetCrackUrl failed, error %lx\n",GetLastError());
ok((strcmp(TEST_URL_PATH,path) == 0),"path cracked wrong\n");
/* Bug 1805: Confirm the returned lengths are correct: */
/* 1. When extra info split out explicitly */
ZeroMemory(&urlComponents, sizeof(urlComponents));
urlComponents.dwStructSize = sizeof(urlComponents);
urlComponents.dwHostNameLength = 1;
urlComponents.dwUrlPathLength = 1;
urlComponents.dwExtraInfoLength = 1;
ok(InternetCrackUrlA(TEST_URL2, 0, 0, &urlComponents),"InternetCrackUrl failed, error 0x%lx\n", GetLastError());
ok(urlComponents.dwUrlPathLength == strlen(TEST_URL2_PATH),".dwUrlPathLength should be %d, but is %ld\n", strlen(TEST_URL2_PATH), urlComponents.dwUrlPathLength);
ok(!strncmp(urlComponents.lpszUrlPath,TEST_URL2_PATH,strlen(TEST_URL2_PATH)),"lpszUrlPath should be %s but is %s\n", TEST_URL2_PATH, urlComponents.lpszUrlPath);
ok(urlComponents.dwHostNameLength == strlen(TEST_URL2_SERVER),".dwHostNameLength should be %d, but is %ld\n", strlen(TEST_URL2_SERVER), urlComponents.dwHostNameLength);
ok(!strncmp(urlComponents.lpszHostName,TEST_URL2_SERVER,strlen(TEST_URL2_SERVER)),"lpszHostName should be %s but is %s\n", TEST_URL2_SERVER, urlComponents.lpszHostName);
ok(urlComponents.dwExtraInfoLength == strlen(TEST_URL2_EXTRA),".dwExtraInfoLength should be %d, but is %ld\n", strlen(TEST_URL2_EXTRA), urlComponents.dwExtraInfoLength);
ok(!strncmp(urlComponents.lpszExtraInfo,TEST_URL2_EXTRA,strlen(TEST_URL2_EXTRA)),"lpszExtraInfo should be %s but is %s\n", TEST_URL2_EXTRA, urlComponents.lpszHostName);
/* 2. When extra info is not split out explicitly and is in url path */
ZeroMemory(&urlComponents, sizeof(urlComponents));
urlComponents.dwStructSize = sizeof(urlComponents);
urlComponents.dwHostNameLength = 1;
urlComponents.dwUrlPathLength = 1;
ok(InternetCrackUrlA(TEST_URL2, 0, 0, &urlComponents),"InternetCrackUrl failed with GLE 0x%lx\n",GetLastError());
ok(urlComponents.dwUrlPathLength == strlen(TEST_URL2_PATHEXTRA),".dwUrlPathLength should be %d, but is %ld\n", strlen(TEST_URL2_PATHEXTRA), urlComponents.dwUrlPathLength);
ok(!strncmp(urlComponents.lpszUrlPath,TEST_URL2_PATHEXTRA,strlen(TEST_URL2_PATHEXTRA)),"lpszUrlPath should be %s but is %s\n", TEST_URL2_PATHEXTRA, urlComponents.lpszUrlPath);
ok(urlComponents.dwHostNameLength == strlen(TEST_URL2_SERVER),".dwHostNameLength should be %d, but is %ld\n", strlen(TEST_URL2_SERVER), urlComponents.dwHostNameLength);
ok(!strncmp(urlComponents.lpszHostName,TEST_URL2_SERVER,strlen(TEST_URL2_SERVER)),"lpszHostName should be %s but is %s\n", TEST_URL2_SERVER, urlComponents.lpszHostName);
}
void InternetCrackUrlW_test(void)
{
WCHAR url[] = {
'h','t','t','p',':','/','/','1','9','2','.','1','6','8','.','0','.','2','2','/',
'C','F','I','D','E','/','m','a','i','n','.','c','f','m','?','C','F','S','V','R',
'=','I','D','E','&','A','C','T','I','O','N','=','I','D','E','_','D','E','F','A',
'U','L','T', 0 };
URL_COMPONENTSW comp;
WCHAR scheme[20], host[20], user[20], pwd[20], urlpart[50], extra[50];
BOOL r;
urlpart[0]=0;
scheme[0]=0;
extra[0]=0;
host[0]=0;
user[0]=0;
pwd[0]=0;
memset(&comp, 0, sizeof comp);
comp.dwStructSize = sizeof comp;
comp.lpszScheme = scheme;
comp.dwSchemeLength = sizeof scheme;
comp.lpszHostName = host;
comp.dwHostNameLength = sizeof host;
comp.lpszUserName = user;
comp.dwUserNameLength = sizeof user;
comp.lpszPassword = pwd;
comp.dwPasswordLength = sizeof pwd;
comp.lpszUrlPath = urlpart;
comp.dwUrlPathLength = sizeof urlpart;
comp.lpszExtraInfo = extra;
comp.dwExtraInfoLength = sizeof extra;
r = InternetCrackUrlW(url, 0, 0, &comp );
ok( r, "failed to crack url\n");
ok( comp.dwSchemeLength == 4, "scheme length wrong\n");
ok( comp.dwHostNameLength == 12, "host length wrong\n");
ok( comp.dwUserNameLength == 0, "user length wrong\n");
ok( comp.dwPasswordLength == 0, "password length wrong\n");
ok( comp.dwUrlPathLength == 15, "url length wrong\n");
ok( comp.dwExtraInfoLength == 29, "extra length wrong\n");
urlpart[0]=0;
scheme[0]=0;
extra[0]=0;
host[0]=0;
user[0]=0;
pwd[0]=0;
memset(&comp, 0, sizeof comp);
comp.dwStructSize = sizeof comp;
comp.lpszHostName = host;
comp.dwHostNameLength = sizeof host;
comp.lpszUrlPath = urlpart;
comp.dwUrlPathLength = sizeof urlpart;
r = InternetCrackUrlW(url, 0, 0, &comp );
ok( r, "failed to crack url\n");
ok( comp.dwSchemeLength == 0, "scheme length wrong\n");
ok( comp.dwHostNameLength == 12, "host length wrong\n");
ok( comp.dwUserNameLength == 0, "user length wrong\n");
ok( comp.dwPasswordLength == 0, "password length wrong\n");
ok( comp.dwUrlPathLength == 44, "url length wrong\n");
ok( comp.dwExtraInfoLength == 0, "extra length wrong\n");
urlpart[0]=0;
scheme[0]=0;
extra[0]=0;
host[0]=0;
user[0]=0;
pwd[0]=0;
memset(&comp, 0, sizeof comp);
comp.dwStructSize = sizeof comp;
comp.lpszHostName = host;
comp.dwHostNameLength = sizeof host;
comp.lpszUrlPath = urlpart;
comp.dwUrlPathLength = sizeof urlpart;
comp.lpszExtraInfo = NULL;
comp.dwExtraInfoLength = sizeof extra;
r = InternetCrackUrlW(url, 0, 0, &comp );
ok( r, "failed to crack url\n");
ok( comp.dwSchemeLength == 0, "scheme length wrong\n");
ok( comp.dwHostNameLength == 12, "host length wrong\n");
ok( comp.dwUserNameLength == 0, "user length wrong\n");
ok( comp.dwPasswordLength == 0, "password length wrong\n");
ok( comp.dwUrlPathLength == 15, "url length wrong\n");
ok( comp.dwExtraInfoLength == 29, "extra length wrong\n");
}
static void InternetTimeFromSystemTimeA_test()
{
BOOL ret;
static const SYSTEMTIME time = { 2005, 1, 5, 7, 12, 6, 35, 0 };
char string[INTERNET_RFC1123_BUFSIZE];
static const char expect[] = "Fri, 07 Jan 2005 12:06:35 GMT";
ret = InternetTimeFromSystemTimeA( &time, INTERNET_RFC1123_FORMAT, string, sizeof(string) );
ok( ret, "InternetTimeFromSystemTimeA failed (%ld)\n", GetLastError() );
ok( !memcmp( string, expect, sizeof(expect) ),
"InternetTimeFromSystemTimeA failed (%ld)\n", GetLastError() );
}
static void InternetTimeFromSystemTimeW_test()
{
BOOL ret;
static const SYSTEMTIME time = { 2005, 1, 5, 7, 12, 6, 35, 0 };
WCHAR string[INTERNET_RFC1123_BUFSIZE + 1];
static const WCHAR expect[] = { 'F','r','i',',',' ','0','7',' ','J','a','n',' ','2','0','0','5',' ',
'1','2',':','0','6',':','3','5',' ','G','M','T',0 };
ret = InternetTimeFromSystemTimeW( &time, INTERNET_RFC1123_FORMAT, string, sizeof(string) );
ok( ret, "InternetTimeFromSystemTimeW failed (%ld)\n", GetLastError() );
ok( !memcmp( string, expect, sizeof(expect) ),
"InternetTimeFromSystemTimeW failed (%ld)\n", GetLastError() );
}
static void InternetTimeToSystemTimeA_test()
{
BOOL ret;
SYSTEMTIME time;
static const SYSTEMTIME expect = { 2005, 1, 5, 7, 12, 6, 35, 0 };
static const char string[] = "Fri, 07 Jan 2005 12:06:35 GMT";
static const char string2[] = " fri 7 jan 2005 12 06 35";
ret = InternetTimeToSystemTimeA( string, &time, 0 );
ok( ret, "InternetTimeToSystemTimeA failed (%ld)\n", GetLastError() );
ok( !memcmp( &time, &expect, sizeof(expect) ),
"InternetTimeToSystemTimeA failed (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeA( string2, &time, 0 );
ok( ret, "InternetTimeToSystemTimeA failed (%ld)\n", GetLastError() );
ok( !memcmp( &time, &expect, sizeof(expect) ),
"InternetTimeToSystemTimeA failed (%ld)\n", GetLastError() );
}
static void InternetTimeToSystemTimeW_test()
{
BOOL ret;
SYSTEMTIME time;
static const SYSTEMTIME expect = { 2005, 1, 5, 7, 12, 6, 35, 0 };
static const WCHAR string[] = { 'F','r','i',',',' ','0','7',' ','J','a','n',' ','2','0','0','5',' ',
'1','2',':','0','6',':','3','5',' ','G','M','T',0 };
static const WCHAR string2[] = { ' ','f','r','i',' ','7',' ','j','a','n',' ','2','0','0','5',' ',
'1','2',' ','0','6',' ','3','5',0 };
static const WCHAR string3[] = { 'F','r',0 };
ret = InternetTimeToSystemTimeW( NULL, NULL, 0 );
ok( !ret, "InternetTimeToSystemTimeW succeeded (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( NULL, &time, 0 );
ok( !ret, "InternetTimeToSystemTimeW succeeded (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string, NULL, 0 );
ok( !ret, "InternetTimeToSystemTimeW succeeded (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string, &time, 1 );
ok( ret, "InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string, &time, 0 );
ok( ret, "InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ok( !memcmp( &time, &expect, sizeof(expect) ),
"InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string2, &time, 0 );
ok( ret, "InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ok( !memcmp( &time, &expect, sizeof(expect) ),
"InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
ret = InternetTimeToSystemTimeW( string3, &time, 0 );
ok( ret, "InternetTimeToSystemTimeW failed (%ld)\n", GetLastError() );
}
START_TEST(http)
{
winapi_test(0x10000000);
winapi_test(0x00000000);
InternetCrackUrl_test();
InternetOpenUrlA_test();
InternetCrackUrlW_test();
InternetTimeFromSystemTimeA_test();
InternetTimeFromSystemTimeW_test();
InternetTimeToSystemTimeA_test();
InternetTimeToSystemTimeW_test();
}

View file

@ -0,0 +1,84 @@
/*
* Unit test suite for wininet functions
*
* Copyright 2004 Francois Gouget
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* The Windows headers don't define A/W types for any of the following
* structures and pointers :-(
* Because for these structures there's not alignment or packing difference
* between the A and W versions, we just define a set of macros so the
* generated tests work anyway.
*/
#ifndef GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ABSTRACT_ATTRIBUTE_TYPEA GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ABSTRACT_ATTRIBUTE_TYPEW GOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define GOPHER_ADMIN_ATTRIBUTE_TYPEA GOPHER_ADMIN_ATTRIBUTE_TYPE
#define GOPHER_ADMIN_ATTRIBUTE_TYPEW GOPHER_ADMIN_ATTRIBUTE_TYPE
#define GOPHER_ASK_ATTRIBUTE_TYPEA GOPHER_ASK_ATTRIBUTE_TYPE
#define GOPHER_ASK_ATTRIBUTE_TYPEW GOPHER_ASK_ATTRIBUTE_TYPE
#define GOPHER_ATTRIBUTE_ENUMERATORA GOPHER_ATTRIBUTE_ENUMERATOR
#define GOPHER_ATTRIBUTE_ENUMERATORW GOPHER_ATTRIBUTE_ENUMERATOR
#define GOPHER_ATTRIBUTE_TYPEA GOPHER_ATTRIBUTE_TYPE
#define GOPHER_ATTRIBUTE_TYPEW GOPHER_ATTRIBUTE_TYPE
#define GOPHER_LOCATION_ATTRIBUTE_TYPEA GOPHER_LOCATION_ATTRIBUTE_TYPE
#define GOPHER_LOCATION_ATTRIBUTE_TYPEW GOPHER_LOCATION_ATTRIBUTE_TYPE
#define GOPHER_ORGANIZATION_ATTRIBUTE_TYPEA GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define GOPHER_ORGANIZATION_ATTRIBUTE_TYPEW GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define GOPHER_PROVIDER_ATTRIBUTE_TYPEA GOPHER_PROVIDER_ATTRIBUTE_TYPE
#define GOPHER_PROVIDER_ATTRIBUTE_TYPEW GOPHER_PROVIDER_ATTRIBUTE_TYPE
#define GOPHER_SITE_ATTRIBUTE_TYPEA GOPHER_SITE_ATTRIBUTE_TYPE
#define GOPHER_SITE_ATTRIBUTE_TYPEW GOPHER_SITE_ATTRIBUTE_TYPE
#define GOPHER_UNKNOWN_ATTRIBUTE_TYPEA GOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define GOPHER_UNKNOWN_ATTRIBUTE_TYPEW GOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define GOPHER_VERSION_ATTRIBUTE_TYPEA GOPHER_VERSION_ATTRIBUTE_TYPE
#define GOPHER_VERSION_ATTRIBUTE_TYPEW GOPHER_VERSION_ATTRIBUTE_TYPE
#define GOPHER_VIEW_ATTRIBUTE_TYPEA GOPHER_VIEW_ATTRIBUTE_TYPE
#define GOPHER_VIEW_ATTRIBUTE_TYPEW GOPHER_VIEW_ATTRIBUTE_TYPE
#define INTERNET_CERTIFICATE_INFOA INTERNET_CERTIFICATE_INFO
#define INTERNET_CERTIFICATE_INFOW INTERNET_CERTIFICATE_INFO
#define INTERNET_PROXY_INFOA INTERNET_PROXY_INFO
#define INTERNET_PROXY_INFOW INTERNET_PROXY_INFO
#define LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEA LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define LPGOPHER_ABSTRACT_ATTRIBUTE_TYPEW LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE
#define LPGOPHER_ADMIN_ATTRIBUTE_TYPEA LPGOPHER_ADMIN_ATTRIBUTE_TYPE
#define LPGOPHER_ADMIN_ATTRIBUTE_TYPEW LPGOPHER_ADMIN_ATTRIBUTE_TYPE
#define LPGOPHER_ASK_ATTRIBUTE_TYPEA LPGOPHER_ASK_ATTRIBUTE_TYPE
#define LPGOPHER_ASK_ATTRIBUTE_TYPEW LPGOPHER_ASK_ATTRIBUTE_TYPE
#define LPGOPHER_ATTRIBUTE_TYPEA LPGOPHER_ATTRIBUTE_TYPE
#define LPGOPHER_ATTRIBUTE_TYPEW LPGOPHER_ATTRIBUTE_TYPE
#define LPGOPHER_LOCATION_ATTRIBUTE_TYPEA LPGOPHER_LOCATION_ATTRIBUTE_TYPE
#define LPGOPHER_LOCATION_ATTRIBUTE_TYPEW LPGOPHER_LOCATION_ATTRIBUTE_TYPE
#define LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEA LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPEW LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE
#define LPGOPHER_PROVIDER_ATTRIBUTE_TYPEA LPGOPHER_PROVIDER_ATTRIBUTE_TYPE
#define LPGOPHER_PROVIDER_ATTRIBUTE_TYPEW LPGOPHER_PROVIDER_ATTRIBUTE_TYPE
#define LPGOPHER_SITE_ATTRIBUTE_TYPEA LPGOPHER_SITE_ATTRIBUTE_TYPE
#define LPGOPHER_SITE_ATTRIBUTE_TYPEW LPGOPHER_SITE_ATTRIBUTE_TYPE
#define LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEA LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define LPGOPHER_UNKNOWN_ATTRIBUTE_TYPEW LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE
#define LPGOPHER_VERSION_ATTRIBUTE_TYPEA LPGOPHER_VERSION_ATTRIBUTE_TYPE
#define LPGOPHER_VERSION_ATTRIBUTE_TYPEW LPGOPHER_VERSION_ATTRIBUTE_TYPE
#define LPGOPHER_VIEW_ATTRIBUTE_TYPEA LPGOPHER_VIEW_ATTRIBUTE_TYPE
#define LPGOPHER_VIEW_ATTRIBUTE_TYPEW LPGOPHER_VIEW_ATTRIBUTE_TYPE
#define LPINTERNET_CERTIFICATE_INFOA LPINTERNET_CERTIFICATE_INFO
#define LPINTERNET_CERTIFICATE_INFOW LPINTERNET_CERTIFICATE_INFO
#define LPINTERNET_PROXY_INFOA LPINTERNET_PROXY_INFO
#define LPINTERNET_PROXY_INFOW LPINTERNET_PROXY_INFO
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,301 @@
/*
* Wininet - Utility functions
*
* Copyright 1999 Corel Corporation
* Copyright 2002 CodeWeavers Inc.
*
* Ulrich Czekalla
* Aric Stewart
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "windef.h"
#include "winbase.h"
#include "wininet.h"
#include "winerror.h"
#include "winnls.h"
#include "wine/debug.h"
#include "internet.h"
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
#define TIME_STRING_LEN 30
time_t ConvertTimeString(LPCWSTR asctime)
{
WCHAR tmpChar[TIME_STRING_LEN];
WCHAR *tmpChar2;
struct tm t;
int timelen = strlenW(asctime);
if(!asctime || !timelen)
return 0;
/* The atoiWs below relie on that tmpChar is \0 padded? */
strncpyW(tmpChar, asctime, TIME_STRING_LEN);
/* Assert that the string is the expected length */
if (tmpChar[TIME_STRING_LEN - 1] != '\0')
{
tmpChar[TIME_STRING_LEN - 1] = '\0';
FIXME("\n");
}
/* Convert a time such as 'Mon, 15 Nov 1999 16:09:35 GMT' into a SYSTEMTIME structure
* We assume the time is in this format
* and divide it into easy to swallow chunks
*/
tmpChar[3]='\0';
tmpChar[7]='\0';
tmpChar[11]='\0';
tmpChar[16]='\0';
tmpChar[19]='\0';
tmpChar[22]='\0';
tmpChar[25]='\0';
t.tm_year = atoiW(tmpChar+12) - 1900;
t.tm_mday = atoiW(tmpChar+5);
t.tm_hour = atoiW(tmpChar+17);
t.tm_min = atoiW(tmpChar+20);
t.tm_sec = atoiW(tmpChar+23);
/* and month */
tmpChar2 = tmpChar + 8;
switch(tmpChar2[2])
{
case 'n':
if(tmpChar2[1]=='a')
t.tm_mon = 0;
else
t.tm_mon = 5;
break;
case 'b':
t.tm_mon = 1;
break;
case 'r':
if(tmpChar2[1]=='a')
t.tm_mon = 2;
else
t.tm_mon = 3;
break;
case 'y':
t.tm_mon = 4;
break;
case 'l':
t.tm_mon = 6;
break;
case 'g':
t.tm_mon = 7;
break;
case 'p':
t.tm_mon = 8;
break;
case 't':
t.tm_mon = 9;
break;
case 'v':
t.tm_mon = 10;
break;
case 'c':
t.tm_mon = 11;
break;
default:
FIXME("\n");
}
return mktime(&t);
}
BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
struct hostent **phe, struct sockaddr_in *psa)
{
WCHAR *found;
char *name;
int len, sz;
TRACE("%s\n", debugstr_w(lpszServerName));
/* Validate server name first
* Check if there is sth. like
* pinger.macromedia.com:80
* if yes, eliminate the :80....
*/
found = strchrW(lpszServerName, ':');
if (found)
len = found - lpszServerName;
else
len = strlenW(lpszServerName);
sz = WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, NULL, 0, NULL, NULL );
name = HeapAlloc(GetProcessHeap(), 0, sz+1);
WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, name, sz, NULL, NULL );
name[sz] = 0;
*phe = gethostbyname(name);
HeapFree( GetProcessHeap(), 0, name );
if (NULL == *phe)
{
TRACE("Failed to get hostname: (%s)\n", debugstr_w(lpszServerName) );
return FALSE;
}
memset(psa,0,sizeof(struct sockaddr_in));
memcpy((char *)&psa->sin_addr, (*phe)->h_addr, (*phe)->h_length);
psa->sin_family = (*phe)->h_addrtype;
psa->sin_port = htons((u_short)nServerPort);
return TRUE;
}
/*
* Helper function for sending async Callbacks
*/
static const char *get_callback_name(DWORD dwInternetStatus) {
static const wininet_flag_info internet_status[] = {
#define FE(x) { x, #x }
FE(INTERNET_STATUS_RESOLVING_NAME),
FE(INTERNET_STATUS_NAME_RESOLVED),
FE(INTERNET_STATUS_CONNECTING_TO_SERVER),
FE(INTERNET_STATUS_CONNECTED_TO_SERVER),
FE(INTERNET_STATUS_SENDING_REQUEST),
FE(INTERNET_STATUS_REQUEST_SENT),
FE(INTERNET_STATUS_RECEIVING_RESPONSE),
FE(INTERNET_STATUS_RESPONSE_RECEIVED),
FE(INTERNET_STATUS_CTL_RESPONSE_RECEIVED),
FE(INTERNET_STATUS_PREFETCH),
FE(INTERNET_STATUS_CLOSING_CONNECTION),
FE(INTERNET_STATUS_CONNECTION_CLOSED),
FE(INTERNET_STATUS_HANDLE_CREATED),
FE(INTERNET_STATUS_HANDLE_CLOSING),
FE(INTERNET_STATUS_REQUEST_COMPLETE),
FE(INTERNET_STATUS_REDIRECT),
FE(INTERNET_STATUS_INTERMEDIATE_RESPONSE),
FE(INTERNET_STATUS_USER_INPUT_REQUIRED),
FE(INTERNET_STATUS_STATE_CHANGE),
FE(INTERNET_STATUS_COOKIE_SENT),
FE(INTERNET_STATUS_COOKIE_RECEIVED),
FE(INTERNET_STATUS_PRIVACY_IMPACTED),
FE(INTERNET_STATUS_P3P_HEADER),
FE(INTERNET_STATUS_P3P_POLICYREF),
FE(INTERNET_STATUS_COOKIE_HISTORY)
#undef FE
};
DWORD i;
for (i = 0; i < (sizeof(internet_status) / sizeof(internet_status[0])); i++) {
if (internet_status[i].val == dwInternetStatus) return internet_status[i].name;
}
return "Unknown";
}
VOID SendSyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength)
{
HINTERNET hHttpSession;
LPVOID lpvNewInfo = NULL;
if( !hdr->lpfnStatusCB )
return;
/* the IE5 version of wininet does not
send callbacks if dwContext is zero */
if( !dwContext )
return;
hHttpSession = WININET_FindHandle( hdr );
if( !hHttpSession ) {
TRACE(" Could not convert header '%p' into a handle !\n", hdr);
return;
}
lpvNewInfo = lpvStatusInfo;
if(!(hdr->dwInternalFlags & INET_CALLBACKW)) {
switch(dwInternetStatus)
{
case INTERNET_STATUS_RESOLVING_NAME:
case INTERNET_STATUS_REDIRECT:
lpvNewInfo = WININET_strdup_WtoA(lpvStatusInfo);
}
}
TRACE(" callback(%p) (%08lx (%p), %08lx, %ld (%s), %p, %ld)\n",
hdr->lpfnStatusCB, (DWORD) hHttpSession, hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus),
lpvNewInfo, dwStatusInfoLength);
hdr->lpfnStatusCB(hHttpSession, dwContext, dwInternetStatus,
lpvNewInfo, dwStatusInfoLength);
TRACE(" end callback().\n");
if(lpvNewInfo != lpvStatusInfo)
HeapFree(GetProcessHeap(), 0, lpvNewInfo);
WININET_Release( hdr );
}
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength)
{
TRACE("(%p, %08lx, %ld (%s), %p, %ld): %sasync call with callback %p\n",
hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus),
lpvStatusInfo, dwStatusInfoLength,
hdr->dwFlags & INTERNET_FLAG_ASYNC ? "" : "non ",
hdr->lpfnStatusCB);
if (!(hdr->lpfnStatusCB))
return;
if (hdr->dwFlags & INTERNET_FLAG_ASYNC)
{
WORKREQUEST workRequest;
struct WORKREQ_SENDCALLBACK *req;
void *lpvStatusInfo_copy = lpvStatusInfo;
if (lpvStatusInfo)
{
lpvStatusInfo_copy = HeapAlloc(GetProcessHeap(), 0, dwStatusInfoLength);
memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength);
}
workRequest.asyncall = SENDCALLBACK;
workRequest.hdr = WININET_AddRef( hdr );
req = &workRequest.u.SendCallback;
req->dwContext = dwContext;
req->dwInternetStatus = dwInternetStatus;
req->lpvStatusInfo = lpvStatusInfo_copy;
req->dwStatusInfoLength = dwStatusInfoLength;
INTERNET_AsyncCall(&workRequest);
}
else
SendSyncCallback(hdr, dwContext, dwInternetStatus,
lpvStatusInfo, dwStatusInfoLength);
}

View file

@ -0,0 +1,28 @@
/*
* Copyright 2002 CodeWeavers
*
* Aric Stewart
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define WINE_FILEDESCRIPTION_STR "Wine WinInet"
#define WINE_FILENAME_STR "wininet.dll"
#define WINE_FILEVERSION 5,0,0,0
#define WINE_FILEVERSION_STR "5.0.0.0"
#define WINE_PRODUCTVERSION 5,0,0,0
#define WINE_PRODUCTVERSION_STR "5.0"
#include "wine/wine_common_ver.rc"

View file

@ -0,0 +1,245 @@
101 stub -noname DoConnectoidsExist
102 stub -noname GetDiskInfoA
103 stub -noname PerformOperationOverUrlCacheA
104 stub -noname HttpCheckDavComplianceA
105 stub -noname HttpCheckDavComplianceW
108 stub -noname ImportCookieFileA
109 stub -noname ExportCookieFileA
110 stub -noname ImportCookieFileW
111 stub -noname ExportCookieFileW
112 stub -noname IsProfilesEnabled
116 stub -noname IsDomainlegalCookieDomainA
117 stub -noname IsDomainLegalCookieDomainW
118 stub -noname FindP3PPolicySymbol
120 stub -noname MapResourceToPolicy
121 stub -noname GetP3PPolicy
122 stub -noname FreeP3PObject
123 stub -noname GetP3PRequestStatus
@ stdcall InternetInitializeAutoProxyDll(long)
@ stub ShowCertificate
@ stdcall CommitUrlCacheEntryA(str str long long long long long str long str str)
@ stdcall CommitUrlCacheEntryW(wstr wstr long long long long long wstr long wstr wstr)
@ stdcall CreateMD5SSOHash(wstr wstr wstr ptr)
@ stdcall CreateUrlCacheContainerA(long long long long long long long long)
@ stdcall CreateUrlCacheContainerW(long long long long long long long long)
@ stdcall CreateUrlCacheEntryA(str long str ptr long)
@ stdcall CreateUrlCacheEntryW(wstr long wstr ptr long)
@ stdcall CreateUrlCacheGroup(long ptr)
@ stdcall DeleteIE3Cache(ptr ptr str long)
@ stdcall DeleteUrlCacheContainerA(long long)
@ stdcall DeleteUrlCacheContainerW(long long)
@ stdcall DeleteUrlCacheEntry(str) DeleteUrlCacheEntryA
@ stdcall DeleteUrlCacheEntryA(str)
@ stdcall DeleteUrlCacheEntryW(wstr)
@ stdcall DeleteUrlCacheGroup(double long ptr)
@ stdcall DetectAutoProxyUrl(str long long)
@ stdcall DllInstall(long ptr) WININET_DllInstall
@ stdcall FindCloseUrlCache(long)
@ stdcall FindFirstUrlCacheContainerA(ptr ptr ptr long)
@ stdcall FindFirstUrlCacheContainerW(ptr ptr ptr long)
@ stdcall FindFirstUrlCacheEntryA(str ptr ptr)
@ stdcall FindFirstUrlCacheEntryExA(str long long double ptr ptr ptr ptr ptr)
@ stdcall FindFirstUrlCacheEntryExW(wstr long long double ptr ptr ptr ptr ptr)
@ stdcall FindFirstUrlCacheEntryW(wstr ptr ptr)
@ stdcall FindFirstUrlCacheGroup(long long ptr long ptr ptr)
@ stdcall FindNextUrlCacheContainerA(long ptr ptr)
@ stdcall FindNextUrlCacheContainerW(long ptr ptr)
@ stdcall FindNextUrlCacheEntryA(long ptr ptr)
@ stdcall FindNextUrlCacheEntryExA(long ptr ptr ptr ptr ptr)
@ stdcall FindNextUrlCacheEntryExW(long ptr ptr ptr ptr ptr)
@ stdcall FindNextUrlCacheEntryW(long ptr ptr)
@ stdcall FindNextUrlCacheGroup(long ptr ptr)
@ stub ForceNexusLookup
@ stub ForceNexusLookupExW
@ stub FreeUrlCacheSpaceA
@ stub FreeUrlCacheSpaceW
@ stdcall FtpCommandA(long long long str ptr ptr)
@ stdcall FtpCommandW(long long long wstr ptr ptr)
@ stdcall FtpCreateDirectoryA(ptr str)
@ stdcall FtpCreateDirectoryW(ptr wstr)
@ stdcall FtpDeleteFileA(ptr str)
@ stdcall FtpDeleteFileW(ptr wstr)
@ stdcall FtpFindFirstFileA(ptr str ptr long long)
@ stdcall FtpFindFirstFileW(ptr wstr ptr long long)
@ stdcall FtpGetCurrentDirectoryA(ptr str ptr)
@ stdcall FtpGetCurrentDirectoryW(ptr wstr ptr)
@ stdcall FtpGetFileA(ptr str str long long long long)
@ stub FtpGetFileEx
@ stdcall FtpGetFileSize(long ptr)
@ stdcall FtpGetFileW(ptr wstr wstr long long long long)
@ stdcall FtpOpenFileA(ptr str long long long)
@ stdcall FtpOpenFileW(ptr wstr long long long)
@ stdcall FtpPutFileA(ptr str str long long)
@ stub FtpPutFileEx
@ stdcall FtpPutFileW(ptr wstr wstr long long)
@ stdcall FtpRemoveDirectoryA(ptr str)
@ stdcall FtpRemoveDirectoryW(ptr wstr)
@ stdcall FtpRenameFileA(ptr str str)
@ stdcall FtpRenameFileW(ptr wstr wstr)
@ stdcall FtpSetCurrentDirectoryA(ptr str)
@ stdcall FtpSetCurrentDirectoryW(ptr wstr)
@ stdcall GetUrlCacheConfigInfoA(ptr ptr long)
@ stdcall GetUrlCacheConfigInfoW(ptr ptr long)
@ stdcall GetUrlCacheEntryInfoA(str ptr long)
@ stdcall GetUrlCacheEntryInfoExA(str ptr ptr str ptr ptr long)
@ stdcall GetUrlCacheEntryInfoExW(wstr ptr ptr wstr ptr ptr long)
@ stdcall GetUrlCacheEntryInfoW(wstr ptr long)
@ stdcall GetUrlCacheGroupAttributeA(double long long ptr ptr ptr)
@ stdcall GetUrlCacheGroupAttributeW(double long long ptr ptr ptr)
@ stub GetUrlCacheHeaderData
@ stdcall GopherCreateLocatorA(str long str str long str ptr)
@ stdcall GopherCreateLocatorW(wstr long wstr wstr long wstr ptr)
@ stdcall GopherFindFirstFileA(ptr str str ptr long long)
@ stdcall GopherFindFirstFileW(ptr wstr wstr ptr long long)
@ stdcall GopherGetAttributeA(ptr str str ptr long ptr ptr long)
@ stdcall GopherGetAttributeW(ptr wstr wstr ptr long ptr ptr long)
@ stdcall GopherGetLocatorTypeA(str ptr)
@ stdcall GopherGetLocatorTypeW(wstr ptr)
@ stdcall GopherOpenFileA(ptr str str long long)
@ stdcall GopherOpenFileW(ptr wstr wstr long long)
@ stdcall HttpAddRequestHeadersA(ptr str long long)
@ stdcall HttpAddRequestHeadersW(ptr wstr long long)
@ stub HttpCheckDavCompliance
@ stdcall HttpEndRequestA(ptr ptr long long)
@ stdcall HttpEndRequestW(ptr ptr long long)
@ stdcall HttpOpenRequestA(ptr str str str str ptr long long)
@ stdcall HttpOpenRequestW(ptr wstr wstr wstr wstr ptr long long)
@ stdcall HttpQueryInfoA(ptr long ptr ptr ptr)
@ stdcall HttpQueryInfoW(ptr long ptr ptr ptr)
@ stdcall HttpSendRequestA(ptr str long ptr long)
@ stdcall HttpSendRequestExA(long ptr ptr long long)
@ stdcall HttpSendRequestExW(long ptr ptr long long)
@ stdcall HttpSendRequestW(ptr wstr long ptr long)
@ stub IncrementUrlCacheHeaderData
@ stub InternetAlgIdToStringA
@ stub InternetAlgIdToStringW
@ stdcall InternetAttemptConnect(long)
@ stdcall InternetAutodial(long ptr)
@ stub InternetAutodialCallback
@ stdcall InternetAutodialHangup(long)
@ stdcall InternetCanonicalizeUrlA(str str ptr long)
@ stdcall InternetCanonicalizeUrlW(wstr wstr ptr long)
@ stdcall InternetCheckConnectionA(ptr long long)
@ stdcall InternetCheckConnectionW(ptr long long)
@ stdcall InternetClearAllPerSiteCookieDecisions()
@ stdcall InternetCloseHandle(long)
@ stdcall InternetCombineUrlA(str str str ptr long)
@ stdcall InternetCombineUrlW(wstr wstr wstr ptr long)
@ stdcall InternetConfirmZoneCrossing(long str str long) InternetConfirmZoneCrossingA
@ stdcall InternetConfirmZoneCrossingA(long str str long)
@ stdcall InternetConfirmZoneCrossingW(long wstr wstr long)
@ stdcall InternetConnectA(ptr str long str str long long long)
@ stdcall InternetConnectW(ptr wstr long wstr wstr long long long)
@ stdcall InternetCrackUrlA(str long long ptr)
@ stdcall InternetCrackUrlW(wstr long long ptr)
@ stdcall InternetCreateUrlA(ptr long ptr ptr)
@ stdcall InternetCreateUrlW(ptr long ptr ptr)
@ stub InternetDebugGetLocalTime
@ stdcall InternetDial(long str long ptr long) InternetDialA
@ stdcall InternetDialA(long str long ptr long)
@ stdcall InternetDialW(long wstr long ptr long)
@ stdcall InternetEnumPerSiteCookieDecisionA(ptr ptr ptr long)
@ stdcall InternetEnumPerSiteCookieDecisionW(ptr ptr ptr long)
@ stdcall InternetErrorDlg(long long long long ptr)
@ stdcall InternetFindNextFileA(ptr ptr)
@ stdcall InternetFindNextFileW(ptr ptr)
@ stub InternetFortezzaCommand
@ stub InternetGetCertByURL
@ stub InternetGetCertByURLA
@ stdcall InternetGetConnectedState(ptr long)
@ stdcall InternetGetConnectedStateEx(ptr ptr long long) InternetGetConnectedStateExA
@ stdcall InternetGetConnectedStateExA(ptr ptr long long)
@ stdcall InternetGetConnectedStateExW(ptr ptr long long)
@ stdcall InternetGetCookieA(str str ptr long)
@ stdcall InternetGetCookieExA(str str ptr ptr long ptr)
@ stdcall InternetGetCookieExW(wstr wstr ptr ptr long ptr)
@ stdcall InternetGetCookieW(wstr wstr ptr long)
@ stdcall InternetGetLastResponseInfoA(ptr ptr ptr)
@ stdcall InternetGetLastResponseInfoW(ptr ptr ptr)
@ stdcall InternetGetPerSiteCookieDecisionA(str ptr)
@ stdcall InternetGetPerSiteCookieDecisionW(wstr ptr)
@ stdcall InternetGoOnline(str long long) InternetGoOnlineA
@ stdcall InternetGoOnlineA(str long long)
@ stdcall InternetGoOnlineW(wstr long long)
@ stdcall InternetHangUp(long long)
@ stdcall InternetLockRequestFile(ptr ptr)
@ stdcall InternetOpenA(str long str str long)
@ stub InternetOpenServerPushParse
@ stdcall InternetOpenW(wstr long wstr wstr long)
@ stdcall InternetOpenUrlA(ptr str str long long long)
@ stdcall InternetOpenUrlW(ptr wstr wstr long long long)
@ stdcall InternetQueryDataAvailable(ptr ptr long long)
@ stub InternetQueryFortezzaStatus
@ stdcall InternetQueryOptionA(ptr long ptr ptr)
@ stdcall InternetQueryOptionW(ptr long ptr ptr)
@ stdcall InternetReadFile(ptr ptr long ptr)
@ stdcall InternetReadFileExA(ptr ptr long long)
@ stdcall InternetReadFileExW(ptr ptr long long)
@ stub InternetSecurityProtocolToStringA
@ stub InternetSecurityProtocolToStringW
@ stub InternetServerPushParse
@ stdcall InternetSetCookieA(str str str)
@ stdcall InternetSetCookieExA(str str str long ptr)
@ stdcall InternetSetCookieExW(wstr wstr wstr long ptr)
@ stdcall InternetSetCookieW(wstr wstr wstr)
@ stub InternetSetDialState
@ stub InternetSetDialStateA
@ stub InternetSetDialStateW
@ stdcall InternetSetFilePointer(ptr long ptr long long)
@ stdcall InternetSetOptionA(ptr long ptr long)
@ stdcall InternetSetOptionExA(ptr long ptr long long)
@ stdcall InternetSetOptionExW(ptr long ptr long long)
@ stdcall InternetSetOptionW(ptr long ptr long)
@ stdcall InternetSetPerSiteCookieDecisionA(str long)
@ stdcall InternetSetPerSiteCookieDecisionW(wstr long)
@ stdcall InternetSetStatusCallback(ptr ptr) InternetSetStatusCallbackA
@ stdcall InternetSetStatusCallbackA(ptr ptr)
@ stdcall InternetSetStatusCallbackW(ptr ptr)
@ stub InternetShowSecurityInfoByURL
@ stub InternetShowSecurityInfoByURLA
@ stub InternetShowSecurityInfoByURLW
@ stdcall InternetTimeFromSystemTime(ptr long ptr long) InternetTimeFromSystemTimeA
@ stdcall InternetTimeFromSystemTimeA(ptr long ptr long)
@ stdcall InternetTimeFromSystemTimeW(ptr long ptr long)
@ stdcall InternetTimeToSystemTime(str ptr long) InternetTimeToSystemTimeA
@ stdcall InternetTimeToSystemTimeA(str ptr long)
@ stdcall InternetTimeToSystemTimeW(wstr ptr long)
@ stdcall InternetUnlockRequestFile(ptr)
@ stdcall InternetWriteFile(ptr ptr long ptr)
@ stub InternetWriteFileExA
@ stub InternetWriteFileExW
@ stdcall IsHostInProxyBypassList(long str long)
@ stub IsUrlCacheEntryExpiredA
@ stub IsUrlCacheEntryExpiredW
@ stub LoadUrlCacheContent
@ stub ParseX509EncodedCertificateForListBoxEntry
@ stub PrivacyGetZonePreferenceW # (long long ptr ptr ptr)
@ stub PrivacySetZonePreferenceW # (long long long wstr)
@ stdcall ReadUrlCacheEntryStream(ptr long ptr ptr long)
@ stub RegisterUrlCacheNotification
@ stdcall ResumeSuspendedDownload(long long)
@ stdcall RetrieveUrlCacheEntryFileA(str ptr ptr long)
@ stdcall RetrieveUrlCacheEntryFileW(wstr ptr ptr long)
@ stdcall RetrieveUrlCacheEntryStreamA(str ptr ptr long long)
@ stdcall RetrieveUrlCacheEntryStreamW(wstr ptr ptr long long)
@ stub RunOnceUrlCache
@ stdcall SetUrlCacheConfigInfoA(ptr long)
@ stdcall SetUrlCacheConfigInfoW(ptr long)
@ stdcall SetUrlCacheEntryGroup(str long double ptr long ptr) SetUrlCacheEntryGroupA
@ stdcall SetUrlCacheEntryGroupA(str long double ptr long ptr)
@ stdcall SetUrlCacheEntryGroupW(wstr long double ptr long ptr)
@ stdcall SetUrlCacheEntryInfoA(str ptr long)
@ stdcall SetUrlCacheEntryInfoW(wstr ptr long)
@ stdcall SetUrlCacheGroupAttributeA(double long long ptr ptr)
@ stdcall SetUrlCacheGroupAttributeW(double long long ptr ptr)
@ stub SetUrlCacheHeaderData
@ stub ShowClientAuthCerts
@ stub ShowSecurityInfo
@ stub ShowX509EncodedCertificate
@ stdcall UnlockUrlCacheEntryFile(str long) UnlockUrlCacheEntryFileA
@ stdcall UnlockUrlCacheEntryFileA(str long)
@ stdcall UnlockUrlCacheEntryFileW(wstr long)
@ stdcall UnlockUrlCacheEntryStream(ptr long)
@ stub UpdateUrlCacheContentPath
@ stub UrlZonesDetach

View file

@ -0,0 +1,41 @@
/*
* Czech resources for wininet
* Copyright 2003 Mike McCormack for CodeWeavers
* Copyright 2004 David Kredba
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Zadání sí»ového hesla"
FONT 8, "MS Shell Dlg"
{
LTEXT "Prosím zadejte své u¾iv. jméno a heslo:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Plné jméno", -1, 40, 46, 50, 10
LTEXT "U¾ivatel", -1, 40, 66, 50, 10
LTEXT "Heslo", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Ulo¾it toto heslo (nebezpeèné) ?", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Storno", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View file

@ -0,0 +1,44 @@
/*
* Copyright 2004 Henning Gerhardt
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Netzwerkkennung eingeben"
FONT 8, "MS Shell Dlg"
{
LTEXT "Geben Sie Benutzernamen und Kennwort ein:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Ben&utzername", -1, 40, 66, 50, 10
LTEXT "Kenn&wort", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "Dieses &Kennwort speichern (unsicher)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Abbrechen", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "LAN Verbindung"
}

View file

@ -0,0 +1,44 @@
/*
* Copyright 2003 Mike McCormack for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Enter Network Password"
FONT 8, "MS Shell Dlg"
{
LTEXT "Please enter your username and password:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "User", -1, 40, 66, 50, 10
LTEXT "Password", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Save this password (insecure)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Cancel", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "LAN Connection"
}

View file

@ -0,0 +1,44 @@
/*
* Copyright 2003, 2005 José Manuel Ferrer Ortiz
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Introduzca contraseña de red"
FONT 8, "MS Shell Dlg"
{
LTEXT "Por favor introduzca su nombre de usuario y contraseña:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Dominio", -1, 40, 46, 50, 10
LTEXT "Usuario", -1, 40, 66, 50, 10
LTEXT "Contraseña", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Guardar esta contraseña (inseguro)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Aceptar", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "Conexión LAN"
}

View file

@ -0,0 +1,49 @@
/*
* Wininet
* French language support
*
* Copyright 2003 Mike McCormack for CodeWeavers
* Copyright 2003 Vincent Béron
* Copyright 2005 Jonathan Ernst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Entrez le mot de passe réseau"
FONT 8, "MS Shell Dlg"
{
LTEXT "Entrez votre nom d'utilisateur et votre mot de passe :", -1, 40, 6, 150, 15
LTEXT "Mandataire", -1, 40, 26, 50, 10
LTEXT "Domaine", -1, 40, 46, 50, 10
LTEXT "Utilisateur", -1, 40, 66, 50, 10
LTEXT "Mot de passe", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Enregistrer ce mot de passe (risqué)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Annuler", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "Connexion LAN"
}

View file

@ -0,0 +1,40 @@
/*
* Copyright 2003 Mike McCormack for CodeWeavers
* Copyright 2003 Ivan Leo Puoti
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Inserire la password di rete"
FONT 8, "MS Shell Dlg"
{
LTEXT "Inserire il nome utente e la password:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Utente", -1, 40, 66, 50, 10
LTEXT "Password", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Salva questa password (insicuro)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Annulla", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View file

@ -0,0 +1,39 @@
/*
* Copyright 2003 Mike McCormack for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "ネットワークパスワードの入力"
FONT 9, "MS UI Gothic"
{
LTEXT "ユーザ名とパスワードを入力して下さい:", -1, 40, 6, 150, 15
LTEXT "プロキシ", -1, 40, 26, 50, 10
LTEXT "地域", -1, 40, 46, 50, 10
LTEXT "ユーザ名", -1, 40, 66, 50, 10
LTEXT "パスワード", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "パスワードを保存する(&S)(セキュアではありません)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "キャンセル", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View file

@ -0,0 +1,41 @@
/*
* wininet (Dutch resources)
*
* Copyright 2003 Hans Leidekker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Netwerkwachtwoord invoeren"
FONT 8, "MS Shell Dlg"
{
LTEXT "Voer uw gebruikersnaam en wachtwoord in:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Gebruikersnaam", -1, 40, 66, 50, 10
LTEXT "Wachtwoord", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Wachtwoord opslaan (onveilig)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Annuleren", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View file

@ -0,0 +1,44 @@
/*
* Copyright 2003 Marcelo Duarte
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Entrar Senha da Rede"
FONT 8, "MS Shell Dlg"
{
LTEXT "Por favor, entre com o nome de usuário e a senha:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Usuário", -1, 40, 66, 50, 10
LTEXT "Senha", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Salvar esta senha (inseguro)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "Conexão LAN"
}

View file

@ -0,0 +1,41 @@
/*
* wininet.dll (Russian resources)
*
* Copyright 2003 Igor Stepin
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Ââîä ñåòåâîãî ïàðîëÿ"
FONT 8, "MS Shell Dlg"
{
LTEXT "Ââåäèòå èìÿ ïîëüçîâàòåëÿ è ïàðîëü:", -1, 40, 6, 150, 15
LTEXT "Ïðîêñè", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Ïîëüçîâàòåëü", -1, 40, 66, 50, 10
LTEXT "Ïàðîëü", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Ñîõðàíèòü ýòîò ïàðîëü (íåáåçîïàñíî)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Îòìåíà", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View file

@ -0,0 +1,39 @@
/*
* Copyright 2003 Rok Mandeljc <rok.mandeljc@gimb.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Vnos omrežnega gesla"
FONT 8, "MS Shell Dlg"
{
LTEXT "Vnesite uporabniško ime in geslo:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Uporabniško ime", -1, 40, 66, 50, 10
LTEXT "Geslo", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Shrani geslo (nezašèiteno)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "V redu", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Preklièi", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}

View file

@ -0,0 +1,41 @@
/*
* WinInet
*
* Copyright (c) 2000 Patrik Stridvall
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
/***********************************************************************
* DllInstall (WININET.@)
*/
HRESULT WINAPI WININET_DllInstall(BOOL bInstall, LPCWSTR cmdline)
{
FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
debugstr_w(cmdline));
return S_OK;
}