mirror of
https://github.com/reactos/reactos.git
synced 2025-05-22 18:45:00 +00:00
Autosyncing with Wine HEAD
svn path=/trunk/; revision=30894
This commit is contained in:
parent
0fd742014c
commit
45a4774b49
37 changed files with 3677 additions and 2104 deletions
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -39,8 +39,6 @@
|
|||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
|
||||
#include "wine/list.h"
|
||||
|
||||
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
|
||||
|
||||
|
||||
|
@ -176,7 +174,7 @@ static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path)
|
|||
return newDomain;
|
||||
}
|
||||
|
||||
static void COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen)
|
||||
static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen)
|
||||
{
|
||||
URL_COMPONENTSW UrlComponents;
|
||||
|
||||
|
@ -186,10 +184,14 @@ static void COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostName
|
|||
UrlComponents.lpszUrlPath = path;
|
||||
UrlComponents.lpszUserName = NULL;
|
||||
UrlComponents.lpszHostName = hostName;
|
||||
UrlComponents.dwExtraInfoLength = 0;
|
||||
UrlComponents.dwPasswordLength = 0;
|
||||
UrlComponents.dwSchemeLength = 0;
|
||||
UrlComponents.dwUserNameLength = 0;
|
||||
UrlComponents.dwHostNameLength = hostNameLen;
|
||||
UrlComponents.dwUrlPathLength = pathLen;
|
||||
|
||||
InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents);
|
||||
return 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 */
|
||||
|
@ -202,8 +204,8 @@ static BOOL COOKIE_matchDomain(LPCWSTR lpszCookieDomain, LPCWSTR lpszCookiePath,
|
|||
if (!searchDomain->lpCookieDomain)
|
||||
return FALSE;
|
||||
|
||||
TRACE("comparing domain %s with %s\n",
|
||||
debugstr_w(lpszCookieDomain),
|
||||
TRACE("comparing domain %s with %s\n",
|
||||
debugstr_w(lpszCookieDomain),
|
||||
debugstr_w(searchDomain->lpCookieDomain));
|
||||
|
||||
if (allow_partial && !strstrW(lpszCookieDomain, searchDomain->lpCookieDomain))
|
||||
|
@ -256,15 +258,23 @@ static void COOKIE_deleteDomain(cookie_domain *deadDomain)
|
|||
BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
|
||||
LPWSTR lpCookieData, LPDWORD lpdwSize)
|
||||
{
|
||||
BOOL ret;
|
||||
struct list * cursor;
|
||||
int cnt = 0, domain_count = 0;
|
||||
int cookie_count = 0;
|
||||
unsigned int cnt = 0, domain_count = 0, cookie_count = 0;
|
||||
WCHAR hostName[2048], path[2048];
|
||||
|
||||
TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName),
|
||||
lpCookieData, lpdwSize);
|
||||
lpCookieData, lpdwSize);
|
||||
|
||||
COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
|
||||
if (!lpszUrl)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hostName[0] = 0;
|
||||
ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
|
||||
if (!ret || !hostName[0]) return FALSE;
|
||||
|
||||
LIST_FOR_EACH(cursor, &domain_list)
|
||||
{
|
||||
|
@ -274,28 +284,35 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
|
|||
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; /* '; ' */
|
||||
unsigned int len;
|
||||
|
||||
if (cookie_count) cnt += 2; /* '; ' */
|
||||
cnt += strlenW(thisCookie->lpCookieName);
|
||||
cnt += 1; /* = */
|
||||
cnt += strlenW(thisCookie->lpCookieData);
|
||||
if ((len = strlenW(thisCookie->lpCookieData)))
|
||||
{
|
||||
cnt += 1; /* = */
|
||||
cnt += len;
|
||||
}
|
||||
}
|
||||
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));
|
||||
static const WCHAR szname[] = { '%','s',0 };
|
||||
static const WCHAR szdata[] = { '=','%','s',0 };
|
||||
|
||||
if (cookie_count) cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
|
||||
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szname, thisCookie->lpCookieName);
|
||||
|
||||
if (thisCookie->lpCookieData[0])
|
||||
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szdata, thisCookie->lpCookieData);
|
||||
|
||||
TRACE("Cookie: %s\n", debugstr_w(lpCookieData));
|
||||
}
|
||||
cookie_count++;
|
||||
}
|
||||
|
@ -311,15 +328,14 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
|
|||
|
||||
if (lpCookieData == NULL)
|
||||
{
|
||||
cnt += 1; /* NULL */
|
||||
*lpdwSize = cnt*sizeof(WCHAR);
|
||||
TRACE("returning\n");
|
||||
return TRUE;
|
||||
*lpdwSize = (cnt + 1) * sizeof(WCHAR);
|
||||
TRACE("returning %u\n", *lpdwSize);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
*lpdwSize = (cnt + 1)*sizeof(WCHAR);
|
||||
*lpdwSize = cnt + 1;
|
||||
|
||||
TRACE("Returning %i (from %i domains): %s\n", cnt, domain_count,
|
||||
TRACE("Returning %u (from %u domains): %s\n", cnt, domain_count,
|
||||
debugstr_w(lpCookieData));
|
||||
|
||||
return (cnt ? TRUE : FALSE);
|
||||
|
@ -365,12 +381,16 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
|
|||
{
|
||||
szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
||||
if( !szCookieData )
|
||||
return FALSE;
|
||||
{
|
||||
r = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
|
||||
|
||||
r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
|
||||
|
||||
*lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
|
||||
lpCookieData, *lpdwSize, NULL, NULL );
|
||||
*lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
|
||||
lpCookieData, *lpdwSize, NULL, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, szCookieData );
|
||||
|
@ -380,6 +400,34 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
|
|||
return r;
|
||||
}
|
||||
|
||||
static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWSTR cookie_data)
|
||||
{
|
||||
cookie_domain *thisCookieDomain = NULL;
|
||||
cookie *thisCookie;
|
||||
struct list *cursor;
|
||||
|
||||
LIST_FOR_EACH(cursor, &domain_list)
|
||||
{
|
||||
thisCookieDomain = LIST_ENTRY(cursor, cookie_domain, entry);
|
||||
if (COOKIE_matchDomain(domain, NULL /* FIXME: path */, thisCookieDomain, FALSE))
|
||||
break;
|
||||
thisCookieDomain = NULL;
|
||||
}
|
||||
|
||||
if (!thisCookieDomain)
|
||||
thisCookieDomain = COOKIE_addDomain(domain, path);
|
||||
|
||||
if ((thisCookie = COOKIE_findCookie(thisCookieDomain, cookie_name)))
|
||||
COOKIE_deleteCookie(thisCookie, FALSE);
|
||||
|
||||
TRACE("setting cookie %s=%s for domain %s\n", debugstr_w(cookie_name),
|
||||
debugstr_w(cookie_data), debugstr_w(thisCookieDomain->lpCookieDomain));
|
||||
|
||||
if (!COOKIE_addCookie(thisCookieDomain, cookie_name, cookie_data))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* InternetSetCookieW (WININET.@)
|
||||
|
@ -394,64 +442,47 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
|
|||
BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
|
||||
LPCWSTR lpCookieData)
|
||||
{
|
||||
cookie_domain *thisCookieDomain = NULL;
|
||||
cookie *thisCookie;
|
||||
BOOL ret;
|
||||
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))
|
||||
if (!lpszUrl || !lpCookieData)
|
||||
{
|
||||
TRACE("no cookie data, not adding\n");
|
||||
return FALSE;
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hostName[0] = path[0] = 0;
|
||||
ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
|
||||
if (!ret || !hostName[0]) 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;
|
||||
unsigned int len;
|
||||
WCHAR *cookie, *data;
|
||||
|
||||
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);
|
||||
len = strlenW(lpCookieData);
|
||||
if (!(cookie = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR))))
|
||||
{
|
||||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
return FALSE;
|
||||
}
|
||||
strcpyW(cookie, lpCookieData);
|
||||
|
||||
/* 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].
|
||||
*/
|
||||
if (!(data = strchrW(cookie, '='))) data = cookie + len;
|
||||
else data++;
|
||||
|
||||
ret = set_cookie(hostName, path, cookie, data);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, cookie);
|
||||
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;
|
||||
return set_cookie(hostName, path, lpszCookieName, lpCookieData);
|
||||
}
|
||||
|
||||
|
||||
|
@ -513,7 +544,7 @@ BOOL WINAPI InternetSetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
|
|||
DWORD WINAPI InternetSetCookieExA( LPCSTR lpszURL, LPCSTR lpszCookieName, LPCSTR lpszCookieData,
|
||||
DWORD dwFlags, DWORD_PTR dwReserved)
|
||||
{
|
||||
FIXME("(%s, %s, %s, 0x%08lx, 0x%08lx) stub\n",
|
||||
FIXME("(%s, %s, %s, 0x%08x, 0x%08lx) stub\n",
|
||||
debugstr_a(lpszURL), debugstr_a(lpszCookieName), debugstr_a(lpszCookieData),
|
||||
dwFlags, dwReserved);
|
||||
return TRUE;
|
||||
|
@ -532,7 +563,7 @@ DWORD WINAPI InternetSetCookieExA( LPCSTR lpszURL, LPCSTR lpszCookieName, LPCSTR
|
|||
DWORD WINAPI InternetSetCookieExW( LPCWSTR lpszURL, LPCWSTR lpszCookieName, LPCWSTR lpszCookieData,
|
||||
DWORD dwFlags, DWORD_PTR dwReserved)
|
||||
{
|
||||
FIXME("(%s, %s, %s, 0x%08lx, 0x%08lx) stub\n",
|
||||
FIXME("(%s, %s, %s, 0x%08x, 0x%08lx) stub\n",
|
||||
debugstr_w(lpszURL), debugstr_w(lpszCookieName), debugstr_w(lpszCookieData),
|
||||
dwFlags, dwReserved);
|
||||
return TRUE;
|
||||
|
@ -546,7 +577,7 @@ DWORD WINAPI InternetSetCookieExW( LPCWSTR lpszURL, LPCWSTR lpszCookieName, LPCW
|
|||
BOOL WINAPI InternetGetCookieExA( LPCSTR pchURL, LPCSTR pchCookieName, LPSTR pchCookieData,
|
||||
LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved)
|
||||
{
|
||||
FIXME("(%s, %s, %s, %p, 0x%08lx, %p) stub\n",
|
||||
FIXME("(%s, %s, %s, %p, 0x%08x, %p) stub\n",
|
||||
debugstr_a(pchURL), debugstr_a(pchCookieName), debugstr_a(pchCookieData),
|
||||
pcchCookieData, dwFlags, lpReserved);
|
||||
return FALSE;
|
||||
|
@ -565,7 +596,7 @@ BOOL WINAPI InternetGetCookieExA( LPCSTR pchURL, LPCSTR pchCookieName, LPSTR pch
|
|||
BOOL WINAPI InternetGetCookieExW( LPCWSTR pchURL, LPCWSTR pchCookieName, LPWSTR pchCookieData,
|
||||
LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved)
|
||||
{
|
||||
FIXME("(%s, %s, %s, %p, 0x%08lx, %p) stub\n",
|
||||
FIXME("(%s, %s, %s, %p, 0x%08x, %p) stub\n",
|
||||
debugstr_w(pchURL), debugstr_w(pchCookieName), debugstr_w(pchCookieData),
|
||||
pcchCookieData, dwFlags, lpReserved);
|
||||
return FALSE;
|
||||
|
@ -641,7 +672,7 @@ BOOL WINAPI InternetGetPerSiteCookieDecisionW( LPCWSTR pwchHostName, unsigned lo
|
|||
*/
|
||||
BOOL WINAPI InternetSetPerSiteCookieDecisionA( LPCSTR pchHostName, DWORD dwDecision )
|
||||
{
|
||||
FIXME("(%s, 0x%08lx) stub\n", debugstr_a(pchHostName), dwDecision);
|
||||
FIXME("(%s, 0x%08x) stub\n", debugstr_a(pchHostName), dwDecision);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -650,6 +681,6 @@ BOOL WINAPI InternetSetPerSiteCookieDecisionA( LPCSTR pchHostName, DWORD dwDecis
|
|||
*/
|
||||
BOOL WINAPI InternetSetPerSiteCookieDecisionW( LPCWSTR pchHostName, DWORD dwDecision )
|
||||
{
|
||||
FIXME("(%s, 0x%08lx) stub\n", debugstr_w(pchHostName), dwDecision);
|
||||
FIXME("(%s, 0x%08x) stub\n", debugstr_w(pchHostName), dwDecision);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -29,7 +29,6 @@
|
|||
#include "winreg.h"
|
||||
#include "wininet.h"
|
||||
#include "winnetwk.h"
|
||||
#include "winnls.h"
|
||||
#include "wine/debug.h"
|
||||
#include "winerror.h"
|
||||
#define NO_SHLWAPI_STREAM
|
||||
|
@ -68,11 +67,11 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
|
|||
if (NULL == lpwhr)
|
||||
return FALSE;
|
||||
|
||||
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
|
||||
lpwhs = lpwhr->lpHttpSession;
|
||||
if (NULL == lpwhs)
|
||||
return FALSE;
|
||||
|
||||
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
|
||||
hIC = lpwhs->lpAppInfo;
|
||||
if (NULL == hIC)
|
||||
return FALSE;
|
||||
|
||||
|
@ -80,7 +79,7 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
|
|||
|
||||
/* FIXME: perhaps it would be better to use InternetCrackUrl here */
|
||||
p = strchrW(szBuf, ':');
|
||||
if(*p)
|
||||
if (p)
|
||||
*p = 0;
|
||||
|
||||
return TRUE;
|
||||
|
@ -108,19 +107,22 @@ static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
|
|||
* dealing with 'Basic' Authentication
|
||||
*/
|
||||
p = strchrW( szBuf, ' ' );
|
||||
if( p && !strncmpW( p+1, szRealm, strlenW(szRealm) ) )
|
||||
if( !p || strncmpW( p+1, szRealm, strlenW(szRealm) ) )
|
||||
{
|
||||
/* remove quotes */
|
||||
p += 7;
|
||||
if( *p == '"' )
|
||||
{
|
||||
p++;
|
||||
q = strrchrW( p, '"' );
|
||||
if( q )
|
||||
*q = 0;
|
||||
}
|
||||
ERR("proxy response wrong? (%s)\n", debugstr_w(szBuf));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* remove quotes */
|
||||
p += 7;
|
||||
if( *p == '"' )
|
||||
{
|
||||
p++;
|
||||
q = strrchrW( p, '"' );
|
||||
if( q )
|
||||
*q = 0;
|
||||
}
|
||||
strcpyW( szBuf, p );
|
||||
|
||||
return TRUE;
|
||||
|
@ -129,7 +131,7 @@ static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
|
|||
/***********************************************************************
|
||||
* WININET_GetSetPassword
|
||||
*/
|
||||
static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
|
||||
static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
|
||||
LPCWSTR szRealm, BOOL bSet )
|
||||
{
|
||||
WCHAR szResource[0x80], szUserPass[0x40];
|
||||
|
@ -158,11 +160,11 @@ static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
|
|||
if( bSet )
|
||||
{
|
||||
szUserPass[0] = 0;
|
||||
GetWindowTextW( hUserItem, szUserPass,
|
||||
GetWindowTextW( hUserItem, szUserPass,
|
||||
(sizeof szUserPass-1)/sizeof(WCHAR) );
|
||||
lstrcatW(szUserPass, szColon);
|
||||
u_len = strlenW( szUserPass );
|
||||
GetWindowTextW( hPassItem, szUserPass+u_len,
|
||||
GetWindowTextW( hPassItem, szUserPass+u_len,
|
||||
(sizeof szUserPass)/sizeof(WCHAR)-u_len );
|
||||
|
||||
r_len = (strlenW( szResource ) + 1)*sizeof(WCHAR);
|
||||
|
@ -205,27 +207,27 @@ static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
|
|||
lpwhr = (LPWININETHTTPREQW) WININET_GetObject( hRequest );
|
||||
if( !lpwhr )
|
||||
return FALSE;
|
||||
|
||||
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
|
||||
|
||||
lpwhs = lpwhr->lpHttpSession;
|
||||
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
|
||||
{
|
||||
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
|
||||
hIC = lpwhs->lpAppInfo;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -259,7 +261,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog(
|
|||
}
|
||||
|
||||
/* extract the name of the proxy server */
|
||||
if( WININET_GetProxyServer( params->hRequest,
|
||||
if( WININET_GetProxyServer( params->hRequest,
|
||||
szServer, sizeof szServer/sizeof(WCHAR)) )
|
||||
{
|
||||
hitem = GetDlgItem( hdlg, IDC_PROXY );
|
||||
|
@ -285,7 +287,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog(
|
|||
hitem = GetDlgItem( hdlg, IDC_USERNAME );
|
||||
if( hitem )
|
||||
GetWindowTextW( hitem, username, sizeof username/sizeof(WCHAR) );
|
||||
|
||||
|
||||
password[0] = 0;
|
||||
hitem = GetDlgItem( hdlg, IDC_PASSWORD );
|
||||
if( hitem )
|
||||
|
@ -296,7 +298,7 @@ static INT_PTR WINAPI WININET_ProxyPasswordDialog(
|
|||
SendMessageW( hitem, BM_GETSTATE, 0, 0 ) &&
|
||||
WININET_GetAuthRealm( params->hRequest,
|
||||
szRealm, sizeof szRealm/sizeof(WCHAR)) &&
|
||||
WININET_GetProxyServer( params->hRequest,
|
||||
WININET_GetProxyServer( params->hRequest,
|
||||
szServer, sizeof szServer/sizeof(WCHAR)) )
|
||||
{
|
||||
WININET_GetSetPassword( hdlg, szServer, szRealm, TRUE );
|
||||
|
@ -333,7 +335,7 @@ static INT WININET_GetConnectionStatus( HINTERNET hRequest )
|
|||
return -1;
|
||||
dwStatus = atoiW( szStatus );
|
||||
|
||||
TRACE("request %p status = %ld\n", hRequest, dwStatus );
|
||||
TRACE("request %p status = %d\n", hRequest, dwStatus );
|
||||
|
||||
return dwStatus;
|
||||
}
|
||||
|
@ -349,7 +351,7 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
|
|||
HMODULE hwininet = GetModuleHandleA( "wininet.dll" );
|
||||
INT dwStatus;
|
||||
|
||||
TRACE("%p %p %ld %08lx %p\n", hWnd, hRequest, dwError, dwFlags, lppvData);
|
||||
TRACE("%p %p %d %08x %p\n", hWnd, hRequest, dwError, dwFlags, lppvData);
|
||||
|
||||
params.hWnd = hWnd;
|
||||
params.hRequest = hRequest;
|
||||
|
@ -377,7 +379,7 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
|
|||
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);
|
||||
FIXME("Need to display dialog for error %d\n", dwError);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -65,7 +65,7 @@ BOOL WINAPI GopherCreateLocatorA(
|
|||
|
||||
/***********************************************************************
|
||||
* GopherCreateLocatorW (WININET.@)
|
||||
*
|
||||
*
|
||||
* See GopherCreateLocatorA.
|
||||
*/
|
||||
BOOL WINAPI GopherCreateLocatorW(
|
||||
|
@ -93,7 +93,7 @@ BOOL WINAPI GopherCreateLocatorW(
|
|||
* - 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
|
||||
* lpFindData [O] retrieved information
|
||||
* dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
|
||||
* dwContext [I] application private value
|
||||
*
|
||||
|
@ -108,7 +108,7 @@ HINTERNET WINAPI GopherFindFirstFileA(
|
|||
LPGOPHER_FIND_DATAA
|
||||
lpFindData,
|
||||
DWORD dwFlags,
|
||||
DWORD dwContext
|
||||
DWORD_PTR dwContext
|
||||
)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
|
@ -127,7 +127,7 @@ HINTERNET WINAPI GopherFindFirstFileW(
|
|||
LPGOPHER_FIND_DATAW
|
||||
lpFindData,
|
||||
DWORD dwFlags,
|
||||
DWORD dwContext
|
||||
DWORD_PTR dwContext
|
||||
)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
|
@ -138,7 +138,7 @@ HINTERNET WINAPI GopherFindFirstFileW(
|
|||
* GopherGetAttributeA (WININET.@)
|
||||
*
|
||||
* Retrieves the specific attribute information from the server.
|
||||
*
|
||||
*
|
||||
* RETURNS
|
||||
* TRUE on success
|
||||
* FALSE on failure
|
||||
|
@ -152,7 +152,7 @@ BOOL WINAPI GopherGetAttributeA(
|
|||
LPDWORD lpdwCharactersReturned,
|
||||
GOPHER_ATTRIBUTE_ENUMERATORA
|
||||
lpfnEnumerator,
|
||||
DWORD dwContext
|
||||
DWORD_PTR dwContext
|
||||
)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
|
@ -173,7 +173,7 @@ BOOL WINAPI GopherGetAttributeW(
|
|||
LPDWORD lpdwCharactersReturned,
|
||||
GOPHER_ATTRIBUTE_ENUMERATORW
|
||||
lpfnEnumerator,
|
||||
DWORD dwContext
|
||||
DWORD_PTR dwContext
|
||||
)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
|
@ -231,7 +231,7 @@ HINTERNET WINAPI GopherOpenFileA(
|
|||
LPCSTR lpszLocator,
|
||||
LPCSTR lpszView,
|
||||
DWORD dwFlags,
|
||||
DWORD dwContext
|
||||
DWORD_PTR dwContext
|
||||
)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
|
@ -248,7 +248,7 @@ HINTERNET WINAPI GopherOpenFileW(
|
|||
LPCWSTR lpszLocator,
|
||||
LPCWSTR lpszView,
|
||||
DWORD dwFlags,
|
||||
DWORD dwContext
|
||||
DWORD_PTR dwContext
|
||||
)
|
||||
{
|
||||
FIXME("stub\n");
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -17,13 +17,18 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _WINE_INTERNET_H_
|
||||
#define _WINE_INTERNET_H_
|
||||
|
||||
#ifndef __WINE_CONFIG_H
|
||||
# error You must include config.h to use this header
|
||||
#endif
|
||||
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
#include <time.h>
|
||||
#ifdef HAVE_NETDB_H
|
||||
|
@ -36,6 +41,10 @@
|
|||
#ifdef HAVE_OPENSSL_SSL_H
|
||||
#define DSA __ssl_DSA /* avoid conflict with commctrl.h */
|
||||
#undef FAR
|
||||
/* avoid conflict with wincrypt.h */
|
||||
#undef PKCS7_SIGNER_INFO
|
||||
#undef X509_NAME
|
||||
#undef X509_CERT_PAIR
|
||||
# include <openssl/ssl.h>
|
||||
#undef FAR
|
||||
#define FAR do_not_use_this_in_wine
|
||||
|
@ -63,24 +72,18 @@ typedef struct
|
|||
SSL *ssl_s;
|
||||
char *peek_msg;
|
||||
char *peek_msg_mem;
|
||||
size_t peek_len;
|
||||
#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 )
|
||||
static inline 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 )
|
||||
static inline LPWSTR WININET_strdup_AtoW( LPCSTR str )
|
||||
{
|
||||
int len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0);
|
||||
LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
|
||||
|
@ -89,7 +92,7 @@ inline static LPWSTR WININET_strdup_AtoW( LPCSTR str )
|
|||
return ret;
|
||||
}
|
||||
|
||||
inline static LPSTR WININET_strdup_WtoA( LPCWSTR str )
|
||||
static inline LPSTR WININET_strdup_WtoA( LPCWSTR str )
|
||||
{
|
||||
int len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
LPSTR ret = HeapAlloc( GetProcessHeap(), 0, len );
|
||||
|
@ -98,7 +101,7 @@ inline static LPSTR WININET_strdup_WtoA( LPCWSTR str )
|
|||
return ret;
|
||||
}
|
||||
|
||||
inline static void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND_DATAA dataA)
|
||||
static inline void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND_DATAA dataA)
|
||||
{
|
||||
dataA->dwFileAttributes = dataW->dwFileAttributes;
|
||||
dataA->ftCreationTime = dataW->ftCreationTime;
|
||||
|
@ -108,10 +111,10 @@ inline static void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND
|
|||
dataA->nFileSizeLow = dataW->nFileSizeLow;
|
||||
dataA->dwReserved0 = dataW->dwReserved0;
|
||||
dataA->dwReserved1 = dataW->dwReserved1;
|
||||
WideCharToMultiByte(CP_ACP, 0, dataW->cFileName, -1,
|
||||
WideCharToMultiByte(CP_ACP, 0, dataW->cFileName, -1,
|
||||
dataA->cFileName, sizeof(dataA->cFileName),
|
||||
NULL, NULL);
|
||||
WideCharToMultiByte(CP_ACP, 0, dataW->cAlternateFileName, -1,
|
||||
WideCharToMultiByte(CP_ACP, 0, dataW->cAlternateFileName, -1,
|
||||
dataA->cAlternateFileName, sizeof(dataA->cAlternateFileName),
|
||||
NULL, NULL);
|
||||
}
|
||||
|
@ -123,7 +126,7 @@ typedef enum
|
|||
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_HFTPFINDNEXT = INTERNET_HANDLE_TYPE_FTP_FIND,
|
||||
WH_HHTTPREQ = INTERNET_HANDLE_TYPE_HTTP_REQUEST,
|
||||
} WH_TYPE;
|
||||
|
||||
|
@ -133,19 +136,22 @@ typedef enum
|
|||
struct _WININETHANDLEHEADER;
|
||||
typedef struct _WININETHANDLEHEADER WININETHANDLEHEADER, *LPWININETHANDLEHEADER;
|
||||
|
||||
typedef void (*WININET_object_destructor)( LPWININETHANDLEHEADER );
|
||||
typedef void (*WININET_object_function)( LPWININETHANDLEHEADER );
|
||||
|
||||
struct _WININETHANDLEHEADER
|
||||
{
|
||||
WH_TYPE htype;
|
||||
HINTERNET hInternet;
|
||||
DWORD dwFlags;
|
||||
DWORD dwContext;
|
||||
DWORD_PTR dwContext;
|
||||
DWORD dwError;
|
||||
DWORD dwInternalFlags;
|
||||
DWORD dwRefCount;
|
||||
WININET_object_destructor destroy;
|
||||
WININET_object_function close_connection;
|
||||
WININET_object_function destroy;
|
||||
INTERNET_STATUS_CALLBACK lpfnStatusCB;
|
||||
struct _WININETHANDLEHEADER *lpwhparent;
|
||||
struct list entry;
|
||||
struct list children;
|
||||
};
|
||||
|
||||
|
||||
|
@ -164,9 +170,11 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
WININETAPPINFOW *lpAppInfo;
|
||||
LPWSTR lpszHostName; /* the final destination of the request */
|
||||
LPWSTR lpszServerName; /* the name of the server we directly connect to */
|
||||
LPWSTR lpszUserName;
|
||||
LPWSTR lpszPassword;
|
||||
INTERNET_PORT nHostPort; /* the final destination port of the request */
|
||||
INTERNET_PORT nServerPort; /* the port of the server we directly connect to */
|
||||
struct sockaddr_in socketAddress;
|
||||
|
@ -185,35 +193,46 @@ typedef struct
|
|||
} HTTPHEADERW, *LPHTTPHEADERW;
|
||||
|
||||
|
||||
struct HttpAuthInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
WININETHTTPSESSIONW *lpHttpSession;
|
||||
LPWSTR lpszPath;
|
||||
LPWSTR lpszVerb;
|
||||
LPWSTR lpszRawHeaders;
|
||||
WININET_NETCONNECTION netConnection;
|
||||
LPWSTR lpszVersion;
|
||||
LPWSTR lpszStatusText;
|
||||
DWORD dwContentLength; /* total number of bytes to be read */
|
||||
DWORD dwContentRead; /* bytes of the content read so far */
|
||||
HTTPHEADERW *pCustHeaders;
|
||||
DWORD nCustHeaders;
|
||||
struct HttpAuthInfo *pAuthInfo;
|
||||
struct HttpAuthInfo *pProxyAuthInfo;
|
||||
} WININETHTTPREQW, *LPWININETHTTPREQW;
|
||||
|
||||
|
||||
struct _WININETFTPSESSIONW;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
struct _WININETFTPSESSIONW *lpFtpSession;
|
||||
BOOL session_deleted;
|
||||
int nDataSocket;
|
||||
} WININETFILE, *LPWININETFILE;
|
||||
} WININETFTPFILE, *LPWININETFTPFILE;
|
||||
|
||||
|
||||
typedef struct
|
||||
typedef struct _WININETFTPSESSIONW
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
WININETAPPINFOW *lpAppInfo;
|
||||
int sndSocket;
|
||||
int lstnSocket;
|
||||
int pasvSocket; /* data socket connected by us in case of passive FTP */
|
||||
LPWININETFILE download_in_progress;
|
||||
LPWININETFTPFILE download_in_progress;
|
||||
struct sockaddr_in socketAddress;
|
||||
struct sockaddr_in lstnSocketAddress;
|
||||
LPWSTR lpszPassword;
|
||||
|
@ -234,37 +253,18 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
WININETFTPSESSIONW *lpFtpSession;
|
||||
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,
|
||||
INTERNETREADFILEEXA,
|
||||
} ASYNC_FUNC;
|
||||
} WININETFTPFINDNEXTW, *LPWININETFTPFINDNEXTW;
|
||||
|
||||
struct WORKREQ_FTPPUTFILEW
|
||||
{
|
||||
LPWSTR lpszLocalFile;
|
||||
LPWSTR lpszNewRemoteFile;
|
||||
DWORD dwFlags;
|
||||
DWORD dwContext;
|
||||
DWORD_PTR dwContext;
|
||||
};
|
||||
|
||||
struct WORKREQ_FTPSETCURRENTDIRECTORYW
|
||||
|
@ -282,7 +282,7 @@ struct WORKREQ_FTPFINDFIRSTFILEW
|
|||
LPWSTR lpszSearchFile;
|
||||
LPWIN32_FIND_DATAW lpFindFileData;
|
||||
DWORD dwFlags;
|
||||
DWORD dwContext;
|
||||
DWORD_PTR dwContext;
|
||||
};
|
||||
|
||||
struct WORKREQ_FTPGETCURRENTDIRECTORYW
|
||||
|
@ -296,7 +296,7 @@ struct WORKREQ_FTPOPENFILEW
|
|||
LPWSTR lpszFilename;
|
||||
DWORD dwAccess;
|
||||
DWORD dwFlags;
|
||||
DWORD dwContext;
|
||||
DWORD_PTR dwContext;
|
||||
};
|
||||
|
||||
struct WORKREQ_FTPGETFILEW
|
||||
|
@ -306,7 +306,7 @@ struct WORKREQ_FTPGETFILEW
|
|||
BOOL fFailIfExists;
|
||||
DWORD dwLocalFlagsAttribute;
|
||||
DWORD dwFlags;
|
||||
DWORD dwContext;
|
||||
DWORD_PTR dwContext;
|
||||
};
|
||||
|
||||
struct WORKREQ_FTPDELETEFILEW
|
||||
|
@ -325,22 +325,11 @@ struct WORKREQ_FTPRENAMEFILEW
|
|||
LPWSTR lpszDestFile;
|
||||
};
|
||||
|
||||
struct WORKREQ_INTERNETFINDNEXTW
|
||||
struct WORKREQ_FTPFINDNEXTW
|
||||
{
|
||||
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;
|
||||
|
@ -353,7 +342,7 @@ struct WORKREQ_HTTPSENDREQUESTW
|
|||
|
||||
struct WORKREQ_SENDCALLBACK
|
||||
{
|
||||
DWORD dwContext;
|
||||
DWORD_PTR dwContext;
|
||||
DWORD dwInternetStatus;
|
||||
LPVOID lpvStatusInfo;
|
||||
DWORD dwStatusInfoLength;
|
||||
|
@ -366,7 +355,7 @@ struct WORKREQ_INTERNETOPENURLW
|
|||
LPWSTR lpszHeaders;
|
||||
DWORD dwHeadersLength;
|
||||
DWORD dwFlags;
|
||||
DWORD dwContext;
|
||||
DWORD_PTR dwContext;
|
||||
};
|
||||
|
||||
struct WORKREQ_INTERNETREADFILEEXA
|
||||
|
@ -376,7 +365,7 @@ struct WORKREQ_INTERNETREADFILEEXA
|
|||
|
||||
typedef struct WORKREQ
|
||||
{
|
||||
ASYNC_FUNC asyncall;
|
||||
void (*asyncproc)(struct WORKREQ*);
|
||||
WININETHANDLEHEADER *hdr;
|
||||
|
||||
union {
|
||||
|
@ -390,17 +379,13 @@ typedef struct WORKREQ
|
|||
struct WORKREQ_FTPDELETEFILEW FtpDeleteFileW;
|
||||
struct WORKREQ_FTPREMOVEDIRECTORYW FtpRemoveDirectoryW;
|
||||
struct WORKREQ_FTPRENAMEFILEW FtpRenameFileW;
|
||||
struct WORKREQ_INTERNETFINDNEXTW InternetFindNextW;
|
||||
struct WORKREQ_HTTPOPENREQUESTW HttpOpenRequestW;
|
||||
struct WORKREQ_FTPFINDNEXTW FtpFindNextW;
|
||||
struct WORKREQ_HTTPSENDREQUESTW HttpSendRequestW;
|
||||
struct WORKREQ_SENDCALLBACK SendCallback;
|
||||
struct WORKREQ_INTERNETOPENURLW InternetOpenUrlW;
|
||||
struct WORKREQ_INTERNETREADFILEEXA InternetReadFileExA;
|
||||
} u;
|
||||
|
||||
struct WORKREQ *next;
|
||||
struct WORKREQ *prev;
|
||||
|
||||
} WORKREQUEST, *LPWORKREQUEST;
|
||||
|
||||
HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info );
|
||||
|
@ -408,18 +393,17 @@ 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,
|
||||
LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
|
||||
DWORD dwInternalFlags);
|
||||
|
||||
HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
|
||||
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
|
||||
LPCWSTR lpszPassword, DWORD dwFlags, DWORD dwContext,
|
||||
LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
|
||||
DWORD dwInternalFlags);
|
||||
|
||||
BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
|
||||
|
@ -430,13 +414,17 @@ DWORD INTERNET_GetLastError(void);
|
|||
BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest);
|
||||
LPSTR INTERNET_GetResponseBuffer(void);
|
||||
LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen);
|
||||
BOOL INTERNET_ReadFile(LPWININETHANDLEHEADER lpwh, LPVOID lpBuffer,
|
||||
DWORD dwNumOfBytesToRead, LPDWORD pdwNumOfBytesRead,
|
||||
BOOL bWait, BOOL bSendCompletionStatus);
|
||||
|
||||
BOOLAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
|
||||
LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD dwContext);
|
||||
LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD_PTR 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);
|
||||
LPCWSTR lpszSearchFile, LPWIN32_FIND_DATAW lpFindFileData, DWORD dwFlags, DWORD_PTR dwContext);
|
||||
BOOL WINAPI FTP_FindNextFileW(LPWININETFTPFINDNEXTW lpwh, LPVOID lpvFindData);
|
||||
BOOLAPI FTP_FtpGetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPWSTR lpszCurrentDirectory,
|
||||
LPDWORD lpdwCurrentDirectory);
|
||||
BOOL FTP_ConvertFileProp(LPFILEPROPERTIESW lpafp, LPWIN32_FIND_DATAW lpFindFileData);
|
||||
|
@ -444,10 +432,10 @@ BOOL FTP_FtpRenameFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszSrc, LPCWSTR lps
|
|||
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);
|
||||
DWORD fdwAccess, DWORD dwFlags, DWORD_PTR dwContext);
|
||||
BOOLAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, LPCWSTR lpszNewFile,
|
||||
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
|
||||
DWORD dwContext);
|
||||
DWORD_PTR dwContext);
|
||||
|
||||
BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
|
||||
DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength,
|
||||
|
@ -455,13 +443,14 @@ BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
|
|||
INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
|
||||
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
|
||||
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
|
||||
DWORD dwFlags, DWORD dwContext);
|
||||
DWORD dwFlags, DWORD_PTR dwContext);
|
||||
BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr);
|
||||
|
||||
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
|
||||
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
|
||||
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
|
||||
DWORD dwStatusInfoLength);
|
||||
|
||||
VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
|
||||
VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
|
||||
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
|
||||
DWORD dwStatusInfoLength);
|
||||
|
||||
|
@ -479,6 +468,7 @@ BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len,
|
|||
int *sent /* out */);
|
||||
BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags,
|
||||
int *recvd /* out */);
|
||||
BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *available);
|
||||
BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer);
|
||||
LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection);
|
||||
BOOL NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value);
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -33,6 +33,9 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -44,6 +47,7 @@
|
|||
#include "winbase.h"
|
||||
#include "wininet.h"
|
||||
#include "winerror.h"
|
||||
#include "wincrypt.h"
|
||||
|
||||
/* To avoid conflicts with the Unix socket headers. we only need it for
|
||||
* the error codes anyway. */
|
||||
|
@ -52,9 +56,10 @@
|
|||
|
||||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
#include "wincrypt.h"
|
||||
|
||||
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
|
||||
#define sock_get_error(x) WSAGetLastError()
|
||||
#undef FIONREAD
|
||||
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
@ -65,17 +70,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
|||
* SSL stuff should use crypt32.dll
|
||||
*/
|
||||
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
|
||||
#include <openssl/err.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;
|
||||
|
||||
|
@ -117,7 +115,7 @@ BOOL NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL)
|
|||
connection->socketFD = -1;
|
||||
if (useSSL)
|
||||
{
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
TRACE("using SSL connection\n");
|
||||
if (OpenSSL_ssl_handle) /* already initialized everything */
|
||||
return TRUE;
|
||||
|
@ -204,6 +202,72 @@ BOOL NETCON_connected(WININET_NETCONNECTION *connection)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#ifndef __REACTOS__
|
||||
/* translate a unix error code into a winsock one */
|
||||
static int sock_get_error( int err )
|
||||
{
|
||||
switch (err)
|
||||
{
|
||||
case EINTR: return WSAEINTR;
|
||||
case EBADF: return WSAEBADF;
|
||||
case EPERM:
|
||||
case EACCES: return WSAEACCES;
|
||||
case EFAULT: return WSAEFAULT;
|
||||
case EINVAL: return WSAEINVAL;
|
||||
case EMFILE: return WSAEMFILE;
|
||||
case EWOULDBLOCK: return WSAEWOULDBLOCK;
|
||||
case EINPROGRESS: return WSAEINPROGRESS;
|
||||
case EALREADY: return WSAEALREADY;
|
||||
case ENOTSOCK: return WSAENOTSOCK;
|
||||
case EDESTADDRREQ: return WSAEDESTADDRREQ;
|
||||
case EMSGSIZE: return WSAEMSGSIZE;
|
||||
case EPROTOTYPE: return WSAEPROTOTYPE;
|
||||
case ENOPROTOOPT: return WSAENOPROTOOPT;
|
||||
case EPROTONOSUPPORT: return WSAEPROTONOSUPPORT;
|
||||
case ESOCKTNOSUPPORT: return WSAESOCKTNOSUPPORT;
|
||||
case EOPNOTSUPP: return WSAEOPNOTSUPP;
|
||||
case EPFNOSUPPORT: return WSAEPFNOSUPPORT;
|
||||
case EAFNOSUPPORT: return WSAEAFNOSUPPORT;
|
||||
case EADDRINUSE: return WSAEADDRINUSE;
|
||||
case EADDRNOTAVAIL: return WSAEADDRNOTAVAIL;
|
||||
case ENETDOWN: return WSAENETDOWN;
|
||||
case ENETUNREACH: return WSAENETUNREACH;
|
||||
case ENETRESET: return WSAENETRESET;
|
||||
case ECONNABORTED: return WSAECONNABORTED;
|
||||
case EPIPE:
|
||||
case ECONNRESET: return WSAECONNRESET;
|
||||
case ENOBUFS: return WSAENOBUFS;
|
||||
case EISCONN: return WSAEISCONN;
|
||||
case ENOTCONN: return WSAENOTCONN;
|
||||
case ESHUTDOWN: return WSAESHUTDOWN;
|
||||
case ETOOMANYREFS: return WSAETOOMANYREFS;
|
||||
case ETIMEDOUT: return WSAETIMEDOUT;
|
||||
case ECONNREFUSED: return WSAECONNREFUSED;
|
||||
case ELOOP: return WSAELOOP;
|
||||
case ENAMETOOLONG: return WSAENAMETOOLONG;
|
||||
case EHOSTDOWN: return WSAEHOSTDOWN;
|
||||
case EHOSTUNREACH: return WSAEHOSTUNREACH;
|
||||
case ENOTEMPTY: return WSAENOTEMPTY;
|
||||
#ifdef EPROCLIM
|
||||
case EPROCLIM: return WSAEPROCLIM;
|
||||
#endif
|
||||
#ifdef EUSERS
|
||||
case EUSERS: return WSAEUSERS;
|
||||
#endif
|
||||
#ifdef EDQUOT
|
||||
case EDQUOT: return WSAEDQUOT;
|
||||
#endif
|
||||
#ifdef ESTALE
|
||||
case ESTALE: return WSAESTALE;
|
||||
#endif
|
||||
#ifdef EREMOTE
|
||||
case EREMOTE: return WSAEREMOTE;
|
||||
#endif
|
||||
default: errno=err; perror("sock_set_error"); return WSAEFAULT;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
* NETCON_create
|
||||
* Basically calls 'socket()'
|
||||
|
@ -211,15 +275,15 @@ BOOL NETCON_connected(WININET_NETCONNECTION *connection)
|
|||
BOOL NETCON_create(WININET_NETCONNECTION *connection, int domain,
|
||||
int type, int protocol)
|
||||
{
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
if (connection->useSSL)
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
connection->socketFD = socket(domain, type, protocol);
|
||||
if (INVALID_SOCKET == connection->socketFD)
|
||||
if (connection->socketFD == -1)
|
||||
{
|
||||
INTERNET_SetLastError(WSAGetLastError());
|
||||
INTERNET_SetLastError(sock_get_error(errno));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -235,12 +299,13 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection)
|
|||
|
||||
if (!NETCON_connected(connection)) return FALSE;
|
||||
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
if (connection->useSSL)
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,connection->peek_msg_mem);
|
||||
connection->peek_msg = NULL;
|
||||
connection->peek_msg_mem = NULL;
|
||||
connection->peek_len = 0;
|
||||
|
||||
pSSL_shutdown(connection->ssl_s);
|
||||
pSSL_free(connection->ssl_s);
|
||||
|
@ -253,14 +318,14 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection)
|
|||
result = closesocket(connection->socketFD);
|
||||
connection->socketFD = -1;
|
||||
|
||||
if (0 != result)
|
||||
if (result == -1)
|
||||
{
|
||||
INTERNET_SetLastError(WSAGetLastError());
|
||||
INTERNET_SetLastError(sock_get_error(errno));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
static BOOL check_hostname(X509 *cert, char *hostname)
|
||||
{
|
||||
/* FIXME: implement */
|
||||
|
@ -273,7 +338,7 @@ static BOOL check_hostname(X509 *cert, char *hostname)
|
|||
*/
|
||||
BOOL NETCON_secure_connect(WININET_NETCONNECTION *connection, LPCWSTR hostname)
|
||||
{
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
long verify_res;
|
||||
X509 *cert;
|
||||
int len;
|
||||
|
@ -334,14 +399,14 @@ BOOL NETCON_secure_connect(WININET_NETCONNECTION *connection, LPCWSTR hostname)
|
|||
* the moment */
|
||||
}
|
||||
|
||||
len = WideCharToMultiByte(CP_THREAD_ACP, 0, hostname, -1, NULL, 0, NULL, NULL);
|
||||
len = WideCharToMultiByte(CP_UNIXCP, 0, hostname, -1, NULL, 0, NULL, NULL);
|
||||
hostname_unix = HeapAlloc(GetProcessHeap(), 0, len);
|
||||
if (!hostname_unix)
|
||||
{
|
||||
INTERNET_SetLastError(ERROR_OUTOFMEMORY);
|
||||
goto fail;
|
||||
}
|
||||
WideCharToMultiByte(CP_THREAD_ACP, 0, hostname, -1, hostname_unix, len, NULL, NULL);
|
||||
WideCharToMultiByte(CP_UNIXCP, 0, hostname, -1, hostname_unix, len, NULL, NULL);
|
||||
|
||||
if (!check_hostname(cert, hostname_unix))
|
||||
{
|
||||
|
@ -377,10 +442,10 @@ BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *se
|
|||
if (!NETCON_connected(connection)) return FALSE;
|
||||
|
||||
result = connect(connection->socketFD, serv_addr, addrlen);
|
||||
if (SOCKET_ERROR == result)
|
||||
if (result == -1)
|
||||
{
|
||||
WARN("Unable to connect to host (%s)\n", strerror(errno));
|
||||
INTERNET_SetLastError(WSAGetLastError());
|
||||
INTERNET_SetLastError(sock_get_error(errno));
|
||||
|
||||
closesocket(connection->socketFD);
|
||||
connection->socketFD = -1;
|
||||
|
@ -402,16 +467,16 @@ BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len,
|
|||
if (!connection->useSSL)
|
||||
{
|
||||
*sent = send(connection->socketFD, msg, len, flags);
|
||||
if (SOCKET_ERROR == *sent)
|
||||
if (*sent == -1)
|
||||
{
|
||||
INTERNET_SetLastError(WSAGetLastError());
|
||||
INTERNET_SetLastError(sock_get_error(errno));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
if (flags)
|
||||
FIXME("SSL_write doesn't support any flags (%08x)\n", flags);
|
||||
*sent = pSSL_write(connection->ssl_s, msg, len);
|
||||
|
@ -432,21 +497,24 @@ BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len,
|
|||
BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags,
|
||||
int *recvd /* out */)
|
||||
{
|
||||
*recvd = 0;
|
||||
if (!NETCON_connected(connection)) return FALSE;
|
||||
if (!len)
|
||||
return TRUE;
|
||||
if (!connection->useSSL)
|
||||
{
|
||||
*recvd = recv(connection->socketFD, buf, len, flags);
|
||||
if (SOCKET_ERROR == *recvd)
|
||||
if (*recvd == -1)
|
||||
{
|
||||
INTERNET_SetLastError(WSAGetLastError());
|
||||
INTERNET_SetLastError(sock_get_error(errno));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
if (flags & (~MSG_PEEK))
|
||||
#ifdef SONAME_LIBSSL
|
||||
if (flags & ~(MSG_PEEK|MSG_WAITALL))
|
||||
FIXME("SSL_read does not support the following flag: %08x\n", flags);
|
||||
|
||||
/* this ugly hack is all for MSG_PEEK. eww gross */
|
||||
|
@ -456,29 +524,33 @@ BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int f
|
|||
}
|
||||
else if (flags & MSG_PEEK && connection->peek_msg)
|
||||
{
|
||||
size_t peek_msg_len = strlen(connection->peek_msg);
|
||||
if (len < peek_msg_len)
|
||||
if (len < connection->peek_len)
|
||||
FIXME("buffer isn't big enough. Do the expect us to wrap?\n");
|
||||
memcpy(buf, connection->peek_msg, min(len,peek_msg_len+1));
|
||||
*recvd = min(len, peek_msg_len);
|
||||
*recvd = min(len, connection->peek_len);
|
||||
memcpy(buf, connection->peek_msg, *recvd);
|
||||
return TRUE;
|
||||
}
|
||||
else if (connection->peek_msg)
|
||||
{
|
||||
size_t peek_msg_len = strlen(connection->peek_msg);
|
||||
memcpy(buf, connection->peek_msg, min(len,peek_msg_len+1));
|
||||
connection->peek_msg += *recvd = min(len, peek_msg_len);
|
||||
if (*connection->peek_msg == '\0' || *(connection->peek_msg - 1) == '\0')
|
||||
*recvd = min(len, connection->peek_len);
|
||||
memcpy(buf, connection->peek_msg, *recvd);
|
||||
connection->peek_len -= *recvd;
|
||||
connection->peek_msg += *recvd;
|
||||
if (connection->peek_len == 0)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, connection->peek_msg_mem);
|
||||
connection->peek_msg_mem = NULL;
|
||||
connection->peek_msg = NULL;
|
||||
}
|
||||
return TRUE;
|
||||
/* check if we got enough data from the peek buffer */
|
||||
if (!(flags & MSG_WAITALL) || (*recvd == len))
|
||||
return TRUE;
|
||||
/* otherwise, fall through */
|
||||
}
|
||||
*recvd = pSSL_read(connection->ssl_s, buf, len);
|
||||
*recvd += pSSL_read(connection->ssl_s, (char*)buf + *recvd, len - *recvd);
|
||||
if (flags & MSG_PEEK) /* must copy stuff into buffer */
|
||||
{
|
||||
connection->peek_len = *recvd;
|
||||
if (!*recvd)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, connection->peek_msg_mem);
|
||||
|
@ -486,10 +558,7 @@ BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int f
|
|||
connection->peek_msg = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy(connection->peek_msg, buf, *recvd);
|
||||
connection->peek_msg[*recvd] = '\0';
|
||||
}
|
||||
}
|
||||
if (*recvd < 1 && len)
|
||||
return FALSE;
|
||||
|
@ -500,6 +569,36 @@ BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int f
|
|||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* NETCON_query_data_available
|
||||
* Returns the number of bytes of peeked data plus the number of bytes of
|
||||
* queued, but unread data.
|
||||
*/
|
||||
BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *available)
|
||||
{
|
||||
*available = 0;
|
||||
if (!NETCON_connected(connection))
|
||||
return FALSE;
|
||||
|
||||
#ifdef SONAME_LIBSSL
|
||||
if (connection->peek_msg) *available = connection->peek_len;
|
||||
#endif
|
||||
|
||||
#ifdef FIONREAD
|
||||
if (!connection->useSSL)
|
||||
{
|
||||
int unread;
|
||||
int retval = ioctl(connection->socketFD, FIONREAD, &unread);
|
||||
if (!retval)
|
||||
{
|
||||
TRACE("%d bytes of queued, but unread data\n", unread);
|
||||
*available += unread;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* NETCON_getNextLine
|
||||
*/
|
||||
|
@ -516,7 +615,6 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
|
|||
fd_set infd;
|
||||
BOOL bSuccess = FALSE;
|
||||
DWORD nRecv = 0;
|
||||
int r;
|
||||
|
||||
FD_ZERO(&infd);
|
||||
FD_SET(connection->socketFD, &infd);
|
||||
|
@ -527,10 +625,9 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
|
|||
{
|
||||
if (select(connection->socketFD+1,&infd,NULL,NULL,&tv) > 0)
|
||||
{
|
||||
r = recv(connection->socketFD, &lpszBuffer[nRecv], 1, 0);
|
||||
if (0 == r || SOCKET_ERROR == r)
|
||||
if (recv(connection->socketFD, &lpszBuffer[nRecv], 1, 0) <= 0)
|
||||
{
|
||||
INTERNET_SetLastError(WSAGetLastError());
|
||||
INTERNET_SetLastError(sock_get_error(errno));
|
||||
goto lend;
|
||||
}
|
||||
|
||||
|
@ -554,7 +651,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
|
|||
{
|
||||
lpszBuffer[nRecv++] = '\0';
|
||||
*dwBuffer = nRecv;
|
||||
TRACE(":%lu %s\n", nRecv, lpszBuffer);
|
||||
TRACE(":%u %s\n", nRecv, lpszBuffer);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
|
@ -564,7 +661,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
|
|||
}
|
||||
else
|
||||
{
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
long prev_timeout;
|
||||
DWORD nRecv = 0;
|
||||
BOOL success = TRUE;
|
||||
|
@ -595,7 +692,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
|
|||
{
|
||||
lpszBuffer[nRecv++] = '\0';
|
||||
*dwBuffer = nRecv;
|
||||
TRACE("_SSL:%lu %s\n", nRecv, lpszBuffer);
|
||||
TRACE("_SSL:%u %s\n", nRecv, lpszBuffer);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
@ -608,8 +705,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
|
|||
|
||||
LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection)
|
||||
{
|
||||
|
||||
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
|
||||
#ifdef SONAME_LIBSSL
|
||||
X509* cert;
|
||||
unsigned char* buffer,*p;
|
||||
INT len;
|
||||
|
@ -674,7 +770,7 @@ BOOL NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value)
|
|||
if (result == -1)
|
||||
{
|
||||
WARN("setsockopt failed (%s)\n", strerror(errno));
|
||||
//INTERNET_SetLastError(sock_get_error(errno));
|
||||
INTERNET_SetLastError(sock_get_error(errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define IDD_PROXYDLG 0x400
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "windef.h"
|
||||
|
@ -44,6 +44,7 @@
|
|||
#include "wininet_Cs.rc"
|
||||
#include "wininet_De.rc"
|
||||
#include "wininet_En.rc"
|
||||
#include "wininet_Eo.rc"
|
||||
#include "wininet_Es.rc"
|
||||
#include "wininet_Fi.rc"
|
||||
#include "wininet_Fr.rc"
|
||||
|
@ -57,5 +58,6 @@
|
|||
#include "wininet_Pt.rc"
|
||||
#include "wininet_Ru.rc"
|
||||
#include "wininet_Si.rc"
|
||||
#include "wininet_Sv.rc"
|
||||
#include "wininet_Tr.rc"
|
||||
#include "wininet_Uk.rc"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -33,11 +33,11 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wininet.h"
|
||||
#include "winerror.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
#define CP_UNIXCP CP_THREAD_ACP
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
|
@ -50,7 +50,7 @@ time_t ConvertTimeString(LPCWSTR asctime)
|
|||
struct tm t;
|
||||
int timelen = strlenW(asctime);
|
||||
|
||||
if(!asctime || !timelen)
|
||||
if(!timelen)
|
||||
return 0;
|
||||
|
||||
/* FIXME: the atoiWs below rely on that tmpChar is \0 padded */
|
||||
|
@ -147,9 +147,9 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
|
|||
else
|
||||
len = strlenW(lpszServerName);
|
||||
|
||||
sz = WideCharToMultiByte( CP_THREAD_ACP, 0, lpszServerName, len, NULL, 0, NULL, NULL );
|
||||
sz = WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, NULL, 0, NULL, NULL );
|
||||
name = HeapAlloc(GetProcessHeap(), 0, sz+1);
|
||||
WideCharToMultiByte( CP_THREAD_ACP, 0, lpszServerName, len, name, sz, NULL, NULL );
|
||||
WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, name, sz, NULL, NULL );
|
||||
name[sz] = 0;
|
||||
phe = gethostbyname(name);
|
||||
HeapFree( GetProcessHeap(), 0, name );
|
||||
|
@ -210,11 +210,10 @@ static const char *get_callback_name(DWORD dwInternetStatus) {
|
|||
return "Unknown";
|
||||
}
|
||||
|
||||
VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
|
||||
VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
|
||||
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
|
||||
DWORD dwStatusInfoLength)
|
||||
{
|
||||
HINTERNET hHttpSession;
|
||||
LPVOID lpvNewInfo = NULL;
|
||||
|
||||
if( !hdr->lpfnStatusCB )
|
||||
|
@ -225,12 +224,6 @@ VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
|
|||
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) {
|
||||
|
@ -238,46 +231,68 @@ VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
|
|||
case INTERNET_STATUS_CONNECTING_TO_SERVER:
|
||||
case INTERNET_STATUS_CONNECTED_TO_SERVER:
|
||||
lpvNewInfo = WININET_strdup_AtoW(lpvStatusInfo);
|
||||
break;
|
||||
case INTERNET_STATUS_RESOLVING_NAME:
|
||||
case INTERNET_STATUS_REDIRECT:
|
||||
lpvNewInfo = WININET_strdupW(lpvStatusInfo);
|
||||
break;
|
||||
}
|
||||
}else {
|
||||
switch(dwInternetStatus)
|
||||
{
|
||||
case INTERNET_STATUS_NAME_RESOLVED:
|
||||
case INTERNET_STATUS_CONNECTING_TO_SERVER:
|
||||
case INTERNET_STATUS_CONNECTED_TO_SERVER:
|
||||
lpvNewInfo = HeapAlloc(GetProcessHeap(), 0, strlen(lpvStatusInfo) + 1);
|
||||
if (lpvNewInfo) strcpy(lpvNewInfo, lpvStatusInfo);
|
||||
break;
|
||||
case INTERNET_STATUS_RESOLVING_NAME:
|
||||
case INTERNET_STATUS_REDIRECT:
|
||||
lpvNewInfo = WININET_strdup_WtoA(lpvStatusInfo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
TRACE(" callback(%p) (%p (%p), %08lx, %ld (%s), %p, %ld)\n",
|
||||
hdr->lpfnStatusCB, hHttpSession, hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus),
|
||||
|
||||
TRACE(" callback(%p) (%p (%p), %08lx, %d (%s), %p, %d)\n",
|
||||
hdr->lpfnStatusCB, hdr->hInternet, hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus),
|
||||
lpvNewInfo, dwStatusInfoLength);
|
||||
|
||||
hdr->lpfnStatusCB(hHttpSession, dwContext, dwInternetStatus,
|
||||
|
||||
hdr->lpfnStatusCB(hdr->hInternet, dwContext, dwInternetStatus,
|
||||
lpvNewInfo, dwStatusInfoLength);
|
||||
|
||||
TRACE(" end callback().\n");
|
||||
|
||||
if(lpvNewInfo != lpvStatusInfo)
|
||||
HeapFree(GetProcessHeap(), 0, lpvNewInfo);
|
||||
|
||||
WININET_Release( hdr );
|
||||
}
|
||||
|
||||
static void SendAsyncCallbackProc(WORKREQUEST *workRequest)
|
||||
{
|
||||
struct WORKREQ_SENDCALLBACK const *req = &workRequest->u.SendCallback;
|
||||
|
||||
TRACE("%p\n", workRequest->hdr);
|
||||
|
||||
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
|
||||
INTERNET_SendCallback(workRequest->hdr,
|
||||
req->dwContext, req->dwInternetStatus, req->lpvStatusInfo,
|
||||
req->dwStatusInfoLength);
|
||||
|
||||
/* And frees the copy of the status info */
|
||||
HeapFree(GetProcessHeap(), 0, req->lpvStatusInfo);
|
||||
}
|
||||
|
||||
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
|
||||
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
|
||||
DWORD dwStatusInfoLength)
|
||||
{
|
||||
TRACE("(%p, %08lx, %ld (%s), %p, %ld): %sasync call with callback %p\n",
|
||||
TRACE("(%p, %08lx, %d (%s), %p, %d): %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;
|
||||
|
@ -290,14 +305,14 @@ VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
|
|||
memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength);
|
||||
}
|
||||
|
||||
workRequest.asyncall = SENDCALLBACK;
|
||||
workRequest.asyncproc = SendAsyncCallbackProc;
|
||||
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
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define WINE_FILEDESCRIPTION_STR "Wine Internet Connectivity"
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="wininet" type="win32dll" baseaddress="${BASEADDRESS_WININET}" installbase="system32" installname="wininet.dll" allowwarnings="true">
|
||||
<autoregister infsection="OleControlDlls" type="DllInstall" />
|
||||
<importlibrary definition="wininet.spec.def" />
|
||||
<include base="wininet">.</include>
|
||||
<include base="ReactOS">include/reactos/wine</include>
|
||||
<define name="__REACTOS__" />
|
||||
<define name="_WIN32_IE">0x600</define>
|
||||
<define name="_WIN32_WINNT">0x501</define>
|
||||
<define name="WINVER">0x501</define>
|
||||
<define name="__WINESRC__" />
|
||||
<define name="WINVER">0x600</define>
|
||||
<define name="_WIN32_WINNT">0x600</define>
|
||||
<library>wine</library>
|
||||
<library>ntdll</library>
|
||||
<library>kernel32</library>
|
||||
<library>mpr</library>
|
||||
<library>shlwapi</library>
|
||||
<library>shell32</library>
|
||||
<library>user32</library>
|
||||
<library>advapi32</library>
|
||||
<library>shell32</library>
|
||||
<library>shlwapi</library>
|
||||
<library>mpr</library>
|
||||
<library>ws2_32</library>
|
||||
<library>crypt32</library>
|
||||
<library>kernel32</library>
|
||||
<library>ntdll</library>
|
||||
<library>secur32</library>
|
||||
<library>crypt32</library>
|
||||
<library>ws2_32</library>
|
||||
<file>cookie.c</file>
|
||||
<file>dialogs.c</file>
|
||||
<file>ftp.c</file>
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
@ stdcall InternetOpenUrlW(ptr wstr wstr long long long)
|
||||
@ stdcall InternetOpenW(wstr long wstr wstr long)
|
||||
@ stdcall InternetQueryDataAvailable(ptr ptr long long)
|
||||
@ stub InternetQueryFortezzaStatus
|
||||
@ stdcall InternetQueryFortezzaStatus(ptr long)
|
||||
@ stdcall InternetQueryOptionA(ptr long ptr ptr)
|
||||
@ stdcall InternetQueryOptionW(ptr long ptr ptr)
|
||||
@ stdcall InternetReadFile(ptr ptr long ptr)
|
||||
|
@ -209,8 +209,8 @@
|
|||
@ stub InternetWriteFileExA
|
||||
@ stub InternetWriteFileExW
|
||||
@ stdcall IsHostInProxyBypassList(long str long)
|
||||
@ stub IsUrlCacheEntryExpiredA
|
||||
@ stub IsUrlCacheEntryExpiredW
|
||||
@ stdcall IsUrlCacheEntryExpiredA(str long ptr)
|
||||
@ stdcall IsUrlCacheEntryExpiredW(wstr long ptr)
|
||||
@ stub LoadUrlCacheContent
|
||||
@ stub ParseX509EncodedCertificateForListBoxEntry
|
||||
@ stub PrivacyGetZonePreferenceW # (long long ptr ptr ptr)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
|
||||
|
@ -22,7 +22,7 @@ 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 "Îáëàñò", -1, 40, 46, 50, 10
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
|
|
46
reactos/dll/win32/wininet/wininet_Eo.rc
Normal file
46
reactos/dll/win32/wininet/wininet_Eo.rc
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Wininet Resources - Esperanto Language Support
|
||||
*
|
||||
* Copyright 2006 Antonio Codazzi
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Enmetu Retan Pasvorton"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "Enmetu uzantonomon kaj pasvorton:", -1, 40, 6, 150, 15
|
||||
LTEXT "Proxy", -1, 40, 26, 50, 10
|
||||
LTEXT "Realm", -1, 40, 46, 50, 10
|
||||
LTEXT "Uzanto", -1, 40, 66, 50, 10
|
||||
LTEXT "Pasvorto", -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 "&Storu pasvorton ( RISKE! )", IDC_SAVEPASSWORD,
|
||||
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Bone", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
|
||||
PUSHBUTTON "Rezigni", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_LANCONNECTION "LAN Interkonekto"
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright 2003 Mike McCormack for CodeWeavers
|
||||
* Copyright 2003 Ivan Leo Puoti
|
||||
* Copyright 2006 Antonio Codazzi
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -14,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
|
||||
|
@ -33,8 +34,13 @@ FONT 8, "MS Shell Dlg"
|
|||
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,
|
||||
CHECKBOX "&Memorizza la password ( RISCHIOSO )", 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
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_LANCONNECTION "Connessione LAN"
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2005 YunSong Hwang
|
||||
* Copyright 2005,2007 YunSong Hwang
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -13,20 +13,20 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
|
||||
|
||||
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, 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, 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
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
|
||||
|
@ -39,3 +39,8 @@ FONT 8, "MS Shell Dlg"
|
|||
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
|
||||
PUSHBUTTON "Annuleren", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_LANCONNECTION "LAN Verbinding"
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
|
||||
|
||||
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
|
|
|
@ -1,27 +1,39 @@
|
|||
/*
|
||||
* translated by TestamenT
|
||||
* testament@users.sourceforge.net
|
||||
* https://sourceforge.net/projects/reactospl
|
||||
* Copyright 2003 Mike McCormack for CodeWeavers
|
||||
* Copyright 2006 Mikolaj Zalewski
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Wpisz has³o sieci"
|
||||
CAPTION "WprowadŸ has³o do sieci"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "Proszê wpisaæ swoj¹ nazwê u¿ytkownika i has³o:", -1, 40, 6, 150, 15
|
||||
LTEXT "Proszê wprowadziæ nazwê u¿ytkownika i has³o:", -1, 40, 6, 150, 15
|
||||
LTEXT "Proxy", -1, 40, 26, 50, 10
|
||||
LTEXT "Domena", -1, 40, 46, 50, 10
|
||||
LTEXT "U¿ytkownik", -1, 40, 66, 50, 10
|
||||
LTEXT "Obszar", -1, 40, 46, 50, 10
|
||||
LTEXT "U¿ytkonik", -1, 40, 66, 50, 10
|
||||
LTEXT "Has³o", -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 "&Zapisz to has³o (niebezpieczne)", IDC_SAVEPASSWORD,
|
||||
CHECKBOX "&Zapamiêtaj to has³o (nie bezpieczne)", 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 "Anuluj", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright 2003 Marcelo Duarte
|
||||
* Copyright 2006-2007 Américo José Melo
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -13,10 +14,10 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
|
@ -38,7 +39,39 @@ FONT 8, "MS Shell Dlg"
|
|||
PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
|
||||
|
||||
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Indicar Senha da Rede"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "Por favor, indique o nome de utilizador e a senha:", -1, 40, 6, 150, 15
|
||||
LTEXT "Proxy", -1, 40, 26, 50, 10
|
||||
LTEXT "Realm", -1, 40, 46, 50, 10
|
||||
LTEXT "Utilizador", -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 "&Gravar 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
|
||||
}
|
||||
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_LANCONNECTION "Conexão LAN"
|
||||
}
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_LANCONNECTION "Ligação LAN"
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
|
||||
|
|
44
reactos/dll/win32/wininet/wininet_Sv.rc
Normal file
44
reactos/dll/win32/wininet/wininet_Sv.rc
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright 2007 Daniel Nylander
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Ange nätverkslösenord"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "Ange ditt användarnamn och lösenord:", -1, 40, 6, 150, 15
|
||||
LTEXT "Proxy", -1, 40, 26, 50, 10
|
||||
LTEXT "Domän", -1, 40, 46, 50, 10
|
||||
LTEXT "Användarnamn", -1, 40, 66, 50, 10
|
||||
LTEXT "Lösenord", -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 "&Spara detta lösenord (osäkert)", 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 "Avbryt", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
|
||||
}
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
IDS_LANCONNECTION "LAN-anslutning"
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
@ -23,6 +23,8 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winerror.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
|
344
reactos/dll/win32/wininet/wininet_ros.diff
Normal file
344
reactos/dll/win32/wininet/wininet_ros.diff
Normal file
|
@ -0,0 +1,344 @@
|
|||
Index: ftp.c
|
||||
===================================================================
|
||||
--- ftp.c (revision 30893)
|
||||
+++ ftp.c (working copy)
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
+typedef size_t socklen_t;
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
Index: http.c
|
||||
===================================================================
|
||||
--- http.c (revision 30893)
|
||||
+++ http.c (working copy)
|
||||
@@ -60,6 +60,8 @@
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
+#include "inet_ntop.c"
|
||||
+
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
static const WCHAR g_szHttp1_0[] = {' ','H','T','T','P','/','1','.','0',0 };
|
||||
Index: inet_ntop.c
|
||||
===================================================================
|
||||
--- inet_ntop.c (revision 30893)
|
||||
+++ inet_ntop.c (working copy)
|
||||
@@ -0,0 +1,189 @@
|
||||
+/* from NetBSD: inet_ntop.c,v 1.9 2000/01/22 22:19:16 mycroft Exp */
|
||||
+
|
||||
+/* Copyright (c) 1996 by Internet Software Consortium.
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
+ * SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#define ENOSPC 28
|
||||
+#define EAFNOSUPPORT 52
|
||||
+
|
||||
+#ifndef IN6ADDRSZ
|
||||
+#define IN6ADDRSZ 16
|
||||
+#endif
|
||||
+
|
||||
+#ifndef INT16SZ
|
||||
+#define INT16SZ 2
|
||||
+#endif
|
||||
+
|
||||
+#ifdef SPRINTF_CHAR
|
||||
+# define SPRINTF(x) strlen(sprintf/**/x)
|
||||
+#else
|
||||
+# define SPRINTF(x) ((size_t)sprintf x)
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ * WARNING: Don't even consider trying to compile this on a system where
|
||||
+ * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
|
||||
+ */
|
||||
+
|
||||
+static const char *inet_ntop4(const u_char *src, char *dst, size_t size);
|
||||
+static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
|
||||
+
|
||||
+/* char *
|
||||
+ * inet_ntop(af, src, dst, size)
|
||||
+ * convert a network format address to presentation format.
|
||||
+ * return:
|
||||
+ * pointer to presentation format address (`dst'), or NULL (see errno).
|
||||
+ * author:
|
||||
+ * Paul Vixie, 1996.
|
||||
+ */
|
||||
+const char *
|
||||
+inet_ntop(int af, const void *src, char *dst, size_t size)
|
||||
+{
|
||||
+
|
||||
+ switch (af) {
|
||||
+ case AF_INET:
|
||||
+ return (inet_ntop4(src, dst, size));
|
||||
+#ifdef INET6
|
||||
+ case AF_INET6:
|
||||
+ return (inet_ntop6(src, dst, size));
|
||||
+#endif
|
||||
+ default:
|
||||
+ errno = EAFNOSUPPORT;
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ /* NOTREACHED */
|
||||
+}
|
||||
+
|
||||
+/* const char *
|
||||
+ * inet_ntop4(src, dst, size)
|
||||
+ * format an IPv4 address, more or less like inet_ntoa()
|
||||
+ * return:
|
||||
+ * `dst' (as a const)
|
||||
+ * notes:
|
||||
+ * (1) uses no statics
|
||||
+ * (2) takes a u_char* not an in_addr as input
|
||||
+ * author:
|
||||
+ * Paul Vixie, 1996.
|
||||
+ */
|
||||
+static const char *
|
||||
+inet_ntop4(const u_char *src, char *dst, size_t size)
|
||||
+{
|
||||
+ static const char fmt[] = "%u.%u.%u.%u";
|
||||
+ char tmp[sizeof "255.255.255.255"];
|
||||
+
|
||||
+ if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
|
||||
+ errno = ENOSPC;
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ strcpy(dst, tmp);
|
||||
+ return (dst);
|
||||
+}
|
||||
+
|
||||
+#ifdef INET6
|
||||
+/* const char *
|
||||
+ * inet_ntop6(src, dst, size)
|
||||
+ * convert IPv6 binary address into presentation (printable) format
|
||||
+ * author:
|
||||
+ * Paul Vixie, 1996.
|
||||
+ */
|
||||
+static const char *
|
||||
+inet_ntop6(const u_char *src, char *dst, size_t size)
|
||||
+{
|
||||
+ /*
|
||||
+ * Note that int32_t and int16_t need only be "at least" large enough
|
||||
+ * to contain a value of the specified size. On some systems, like
|
||||
+ * Crays, there is no such thing as an integer variable with 16 bits.
|
||||
+ * Keep this in mind if you think this function should have been coded
|
||||
+ * to use pointer overlays. All the world's not a VAX.
|
||||
+ */
|
||||
+ char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
|
||||
+ struct { int base, len; } best, cur;
|
||||
+ u_int words[IN6ADDRSZ / INT16SZ];
|
||||
+ int i;
|
||||
+
|
||||
+ /*
|
||||
+ * Preprocess:
|
||||
+ * Copy the input (bytewise) array into a wordwise array.
|
||||
+ * Find the longest run of 0x00's in src[] for :: shorthanding.
|
||||
+ */
|
||||
+ memset(words, '\0', sizeof words);
|
||||
+ for (i = 0; i < IN6ADDRSZ; i++)
|
||||
+ words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
|
||||
+ best.base = -1;
|
||||
+ cur.base = -1;
|
||||
+ for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
|
||||
+ if (words[i] == 0) {
|
||||
+ if (cur.base == -1)
|
||||
+ cur.base = i, cur.len = 1;
|
||||
+ else
|
||||
+ cur.len++;
|
||||
+ } else {
|
||||
+ if (cur.base != -1) {
|
||||
+ if (best.base == -1 || cur.len > best.len)
|
||||
+ best = cur;
|
||||
+ cur.base = -1;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (cur.base != -1) {
|
||||
+ if (best.base == -1 || cur.len > best.len)
|
||||
+ best = cur;
|
||||
+ }
|
||||
+ if (best.base != -1 && best.len < 2)
|
||||
+ best.base = -1;
|
||||
+
|
||||
+ /*
|
||||
+ * Format the result.
|
||||
+ */
|
||||
+ tp = tmp;
|
||||
+ for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
|
||||
+ /* Are we inside the best run of 0x00's? */
|
||||
+ if (best.base != -1 && i >= best.base &&
|
||||
+ i < (best.base + best.len)) {
|
||||
+ if (i == best.base)
|
||||
+ *tp++ = ':';
|
||||
+ continue;
|
||||
+ }
|
||||
+ /* Are we following an initial run of 0x00s or any real hex? */
|
||||
+ if (i != 0)
|
||||
+ *tp++ = ':';
|
||||
+ /* Is this address an encapsulated IPv4? */
|
||||
+ if (i == 6 && best.base == 0 &&
|
||||
+ (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
|
||||
+ if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
|
||||
+ return (NULL);
|
||||
+ tp += strlen(tp);
|
||||
+ break;
|
||||
+ }
|
||||
+ tp += SPRINTF((tp, "%x", words[i]));
|
||||
+ }
|
||||
+ /* Was it a trailing run of 0x00's? */
|
||||
+ if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
|
||||
+ *tp++ = ':';
|
||||
+ *tp++ = '\0';
|
||||
+
|
||||
+ /*
|
||||
+ * Check for overflow, copy, and we're done.
|
||||
+ */
|
||||
+ if ((size_t)(tp - tmp) > size) {
|
||||
+ errno = ENOSPC;
|
||||
+ return (NULL);
|
||||
+ }
|
||||
+ strcpy(dst, tmp);
|
||||
+ return (dst);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
Index: internet.c
|
||||
===================================================================
|
||||
--- internet.c (revision 30893)
|
||||
+++ internet.c (working copy)
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "resource.h"
|
||||
|
||||
#include "wine/unicode.h"
|
||||
+#define CP_UNIXCP CP_THREAD_ACP
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
Index: netconnection.c
|
||||
===================================================================
|
||||
--- netconnection.c (revision 30893)
|
||||
+++ netconnection.c (working copy)
|
||||
@@ -58,6 +58,8 @@
|
||||
#include "internet.h"
|
||||
|
||||
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
|
||||
+#define sock_get_error(x) WSAGetLastError()
|
||||
+#undef FIONREAD
|
||||
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
@@ -200,6 +202,7 @@
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+#ifndef __REACTOS__
|
||||
/* translate a unix error code into a winsock one */
|
||||
static int sock_get_error( int err )
|
||||
{
|
||||
@@ -263,6 +266,7 @@
|
||||
default: errno=err; perror("sock_set_error"); return WSAEFAULT;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
/******************************************************************************
|
||||
* NETCON_create
|
||||
Index: rsrc.rc
|
||||
===================================================================
|
||||
--- rsrc.rc (revision 30893)
|
||||
+++ rsrc.rc (working copy)
|
||||
@@ -60,3 +60,4 @@
|
||||
#include "wininet_Si.rc"
|
||||
#include "wininet_Sv.rc"
|
||||
#include "wininet_Tr.rc"
|
||||
+#include "wininet_Uk.rc"
|
||||
Index: utility.c
|
||||
===================================================================
|
||||
--- utility.c (revision 30893)
|
||||
+++ utility.c (working copy)
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "internet.h"
|
||||
+#define CP_UNIXCP CP_THREAD_ACP
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
Index: wininet.rbuild
|
||||
===================================================================
|
||||
--- wininet.rbuild (revision 30893)
|
||||
+++ wininet.rbuild (working copy)
|
||||
@@ -18,6 +18,7 @@
|
||||
<library>ntdll</library>
|
||||
<library>secur32</library>
|
||||
<library>crypt32</library>
|
||||
+ <library>ws2_32</library>
|
||||
<file>cookie.c</file>
|
||||
<file>dialogs.c</file>
|
||||
<file>ftp.c</file>
|
||||
Index: wininet_Uk.rc
|
||||
===================================================================
|
||||
--- wininet_Uk.rc (revision 30893)
|
||||
+++ wininet_Uk.rc (working copy)
|
||||
@@ -0,0 +1,46 @@
|
||||
+/*
|
||||
+ * wininet.dll (Ukrainian resources)
|
||||
+ *
|
||||
+ * Copyright 2006 Artem Reznikov
|
||||
+ *
|
||||
+ * 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_UKRAINIAN, 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 "Îáëàñòü", -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
|
||||
+}
|
||||
+
|
||||
+STRINGTABLE DISCARDABLE
|
||||
+{
|
||||
+ IDS_LANCONNECTION "ϳäêëþ÷åííÿ ïî ëîêàëüí³é ìåðåæ³"
|
||||
+}
|
Loading…
Reference in a new issue