- Add winhttp.dll from Wine

- Add winhttp.h from Wine
- Add rbuild file for winfax.dll
- Add winhttp and winfax to bootcd

svn path=/trunk/; revision=32346
This commit is contained in:
Dmitry Chapyshev 2008-02-13 16:46:28 +00:00
parent 206e93a129
commit 7bbd9b91ed
8 changed files with 374 additions and 0 deletions

View file

@ -163,4 +163,5 @@
<property name="BASEADDRESS_BEEPMIDI" value="0x7ef0000" />
<property name="BASEADDRESS_FREETYPE" value="0x7f000000" />
<property name="BASEADDRESS_MSCOREE" value="0x79000000" />
<property name="BASEADDRESS_WINHTTP" value="0x70c60000" />
</group>

View file

@ -269,6 +269,8 @@ dll\win32\usp10\usp10.dll 1
dll\win32\uxtheme\uxtheme.dll 1
dll\win32\vdmdbg\vdmdbg.dll 1
dll\win32\version\version.dll 1
dll\win32\winfax\winfax.dll 1
dll\win32\winhttp\winhttp.dll 1
dll\win32\wininet\wininet.dll 1
dll\win32\winmm\winmm.dll 1
dll\win32\winspool\winspool.drv 1

View file

@ -322,6 +322,12 @@
<directory name="version">
<xi:include href="version/version.rbuild" />
</directory>
<directory name="winfax">
<xi:include href="winfax/winfax.rbuild" />
</directory>
<directory name="winhttp">
<xi:include href="winhttp/winhttp.rbuild" />
</directory>
<directory name="wininet">
<xi:include href="wininet/wininet.rbuild" />
</directory>

View file

@ -0,0 +1,13 @@
<module name="winfax" type="win32dll" baseaddress="${BASEADDRESS_WINFAX}" installbase="system32" installname="winfax.dll" allowwarnings="true" entrypoint="0">
<importlibrary definition="winfax.def" />
<include base="winfax">.</include>
<define name="__REACTOS__" />
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<define name="WINVER">0x501</define>
<library>kernel32</library>
<library>ntdll</library>
<file>winfax.c</file>
<file>winfax.rc</file>
</module>

View file

@ -0,0 +1,131 @@
/*
* Copyright 2007 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "winhttp.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(winhttp);
/******************************************************************
* DllMain (winhttp.@)
*/
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
/******************************************************************
* DllGetClassObject (winhttp.@)
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
FIXME("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
/******************************************************************
* DllCanUnloadNow (winhttp.@)
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
FIXME("()\n");
return S_FALSE;
}
/***********************************************************************
* DllRegisterServer (winhttp.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
FIXME("()\n");
return S_OK;
}
/***********************************************************************
* DllUnregisterServer (winhttp.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
FIXME("()\n");
return S_OK;
}
/***********************************************************************
* WinHttpCheckPlatform (winhttp.@)
*/
BOOL WINAPI WinHttpCheckPlatform(void)
{
FIXME("stub\n");
SetLastError(ERROR_NOT_SUPPORTED);
return FALSE;
}
/***********************************************************************
* WinHttpGetIEProxyConfigForCurrentUser (winhttp.@)
*/
BOOL WINAPI WinHttpGetIEProxyConfigForCurrentUser(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG* config)
{
if(!config)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
/* TODO: read from HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings */
FIXME("returning no proxy used\n");
config->fAutoDetect = FALSE;
config->lpszAutoConfigUrl = NULL;
config->lpszProxy = NULL;
config->lpszProxyBypass = NULL;
SetLastError(ERROR_SUCCESS);
return TRUE;
}
/***********************************************************************
* WinHttpOpen (winhttp.@)
*/
HINTERNET WINAPI WinHttpOpen(LPCWSTR pwszUserAgent, DWORD dwAccessType,
LPCWSTR pwszProxyName, LPCWSTR pwszProxyByPass,
DWORD dwFlags)
{
FIXME("(%s, %d, %s, %s, 0x%x): stub\n", debugstr_w(pwszUserAgent),
dwAccessType, debugstr_w(pwszProxyName), debugstr_w(pwszProxyByPass),
dwFlags);
SetLastError(ERROR_NOT_SUPPORTED);
return NULL;
}

View file

@ -0,0 +1,16 @@
<module name="winhttp" type="win32dll" baseaddress="${BASEADDRESS_WINHTTP}" installbase="system32" installname="winhttp.dll" allowwarnings="true" entrypoint="0">
<importlibrary definition="winhttp.spec.def" />
<include base="winhttp">.</include>
<include base="ReactOS">include/reactos/wine</include>
<define name="__REACTOS__" />
<define name="__WINESRC__" />
<define name="__USE_W32API" />
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<define name="WINVER">0x501</define>
<library>wine</library>
<library>kernel32</library>
<library>ntdll</library>
<file>main.c</file>
<file>winhttp.spec</file>
</module>

View file

@ -0,0 +1,31 @@
@ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
@ stub WinHttpAddRequestHeaders
@ stdcall WinHttpCheckPlatform()
@ stub WinHttpCloseHandle
@ stub WinHttpConnect
@ stub WinHttpCrackUrl
@ stub WinHttpCreateUrl
@ stub WinHttpDetectAutoProxyConfigUrl
@ stub WinHttpGetDefaultProxyConfiguration
@ stdcall WinHttpGetIEProxyConfigForCurrentUser(ptr)
@ stub WinHttpGetProxyForUrl
@ stdcall WinHttpOpen(wstr long wstr wstr long)
@ stub WinHttpOpenRequest
@ stub WinHttpQueryAuthSchemes
@ stub WinHttpQueryDataAvailable
@ stub WinHttpQueryHeaders
@ stub WinHttpQueryOption
@ stub WinHttpReadData
@ stub WinHttpReceiveResponse
@ stub WinHttpSendRequest
@ stub WinHttpSetCredentials
@ stub WinHttpSetDefaultProxyConfiguration
@ stub WinHttpSetOption
@ stub WinHttpSetStatusCallback
@ stub WinHttpSetTimeouts
@ stub WinHttpTimeFromSystemTime
@ stub WinHttpTimeToSystemTime
@ stub WinHttpWriteData

View file

@ -0,0 +1,174 @@
/*
* Copyright (C) 2007 Francois Gouget
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_WINHTTP_H
#define __WINE_WINHTTP_H
#define WINHTTPAPI
#define BOOLAPI WINHTTPAPI BOOL WINAPI
typedef LPVOID HINTERNET;
typedef HINTERNET *LPHINTERNET;
#define INTERNET_DEFAULT_PORT 0
#define INTERNET_DEFAULT_HTTP_PORT 80
#define INTERNET_DEFAULT_HTTPS_PORT 443
typedef WORD INTERNET_PORT;
typedef INTERNET_PORT *LPINTERNET_PORT;
#define INTERNET_SCHEME_HTTP 1
#define INTERNET_SCHEME_HTTPS 2
typedef int INTERNET_SCHEME, *LPINTERNET_SCHEME;
/* flags for WinHttpOpen */
#define WINHTTP_FLAG_ASYNC 0x10000000
/* flags for WinHttpOpenRequest */
#define WINHTTP_FLAG_ESCAPE_PERCENT 0x00000004
#define WINHTTP_FLAG_NULL_CODEPAGE 0x00000008
#define WINHTTP_FLAG_ESCAPE_DISABLE 0x00000040
#define WINHTTP_FLAG_ESCAPE_DISABLE_QUERY 0x00000080
#define WINHTTP_FLAG_BYPASS_PROXY_CACHE 0x00000100
#define WINHTTP_FLAG_REFRESH WINHTTP_FLAG_BYPASS_PROXY_CACHE
#define WINHTTP_FLAG_SECURE 0x00800000
#define WINHTTP_ACCESS_TYPE_DEFAULT_PROXY 0
#define WINHTTP_ACCESS_TYPE_NO_PROXY 1
#define WINHTTP_ACCESS_TYPE_NAMED_PROXY 3
#define WINHTTP_NO_PROXY_NAME NULL
#define WINHTTP_NO_PROXY_BYPASS NULL
#define WINHTTP_NO_REFERER NULL
#define WINHTTP_DEFAULT_ACCEPT_TYPES NULL
#define WINHTTP_ERROR_BASE 12000
typedef struct
{
DWORD dwStructSize;
LPWSTR lpszScheme;
DWORD dwSchemeLength;
INTERNET_SCHEME nScheme;
LPWSTR lpszHostName;
DWORD dwHostNameLength;
INTERNET_PORT nPort;
LPWSTR lpszUserName;
DWORD dwUserNameLength;
LPWSTR lpszPassword;
DWORD dwPasswordLength;
LPWSTR lpszUrlPath;
DWORD dwUrlPathLength;
LPWSTR lpszExtraInfo;
DWORD dwExtraInfoLength;
} URL_COMPONENTS, *LPURL_COMPONENTS;
typedef URL_COMPONENTS URL_COMPONENTSW;
typedef LPURL_COMPONENTS LPURL_COMPONENTSW;
typedef struct
{
DWORD_PTR dwResult;
DWORD dwError;
} WINHTTP_ASYNC_RESULT, *LPWINHTTP_ASYNC_RESULT;
typedef struct
{
FILETIME ftExpiry;
FILETIME ftStart;
LPWSTR lpszSubjectInfo;
LPWSTR lpszIssuerInfo;
LPWSTR lpszProtocolName;
LPWSTR lpszSignatureAlgName;
LPWSTR lpszEncryptionAlgName;
DWORD dwKeySize;
} WINHTTP_CERTIFICATE_INFO;
typedef struct
{
DWORD dwAccessType;
LPCWSTR lpszProxy;
LPCWSTR lpszProxyBypass;
} WINHTTP_PROXY_INFO, *LPWINHTTP_PROXY_INFO;
typedef WINHTTP_PROXY_INFO WINHTTP_PROXY_INFOW;
typedef LPWINHTTP_PROXY_INFO LPWINHTTP_PROXY_INFOW;
typedef struct
{
BOOL fAutoDetect;
LPWSTR lpszAutoConfigUrl;
LPWSTR lpszProxy;
LPWSTR lpszProxyBypass;
} WINHTTP_CURRENT_USER_IE_PROXY_CONFIG;
typedef VOID (CALLBACK *WINHTTP_STATUS_CALLBACK)(HINTERNET,DWORD_PTR,DWORD,LPVOID,DWORD);
typedef struct
{
DWORD dwFlags;
DWORD dwAutoDetectFlags;
LPCWSTR lpszAutoConfigUrl;
LPVOID lpvReserved;
DWORD dwReserved;
BOOL fAutoLogonIfChallenged;
} WINHTTP_AUTOPROXY_OPTIONS;
typedef struct
{
DWORD dwMajorVersion;
DWORD dwMinorVersion;
} HTTP_VERSION_INFO, *LPHTTP_VERSION_INFO;
#ifdef __cplusplus
extern "C" {
#endif
BOOL WINAPI WinHttpAddRequestHeaders(HINTERNET,LPCWSTR,DWORD,DWORD);
BOOL WINAPI WinHttpDetectAutoProxyConfigUrl(DWORD,LPWSTR*);
BOOL WINAPI WinHttpCheckPlatform(void);
BOOL WINAPI WinHttpCloseHandle(HINTERNET);
HINTERNET WINAPI WinHttpConnect(HINTERNET,LPCWSTR,INTERNET_PORT,DWORD);
BOOL WINAPI WinHttpCrackUrl(LPCWSTR,DWORD,DWORD,LPURL_COMPONENTS);
BOOL WINAPI WinHttpCreateUrl(LPURL_COMPONENTS,DWORD,LPWSTR,LPDWORD);
BOOL WINAPI WinHttpGetDefaultProxyConfiguration(WINHTTP_PROXY_INFO*);
BOOL WINAPI WinHttpGetIEProxyConfigForCurrentUser(WINHTTP_CURRENT_USER_IE_PROXY_CONFIG* config);
BOOL WINAPI WinHttpGetProxyForUrl(HINTERNET,LPCWSTR,WINHTTP_AUTOPROXY_OPTIONS*,WINHTTP_PROXY_INFO*);
HINTERNET WINAPI WinHttpOpen(LPCWSTR,DWORD,LPCWSTR,LPCWSTR,DWORD);
HINTERNET WINAPI WinHttpOpenRequest(HINTERNET,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
BOOL WINAPI WinHttpQueryAuthParams(HINTERNET,DWORD,LPVOID*);
BOOL WINAPI WinHttpQueryAuthSchemes(HINTERNET,LPDWORD,LPDWORD,LPDWORD);
BOOL WINAPI WinHttpQueryDataAvailable(HINTERNET,LPDWORD);
BOOL WINAPI WinHttpQueryHeaders(HINTERNET,DWORD,LPCWSTR,LPVOID,LPDWORD,LPDWORD);
BOOL WINAPI WinHttpReadData(HINTERNET,LPVOID,DWORD,LPDWORD);
BOOL WINAPI WinHttpReceiveResponse(HINTERNET,LPVOID);
BOOL WINAPI WinHttpSendRequest(HINTERNET,LPCWSTR,DWORD,LPVOID,DWORD,DWORD,DWORD_PTR);
BOOL WINAPI WinHttpSetDefaultProxyConfiguration(WINHTTP_PROXY_INFO*);
BOOL WINAPI WinHttpSetCredentials(HINTERNET,DWORD,DWORD,LPCWSTR,LPCWSTR,LPVOID);
BOOL WINAPI WinHttpSetOption(HINTERNET,DWORD,LPVOID,DWORD);
WINHTTP_STATUS_CALLBACK WINAPI WinHttpSetStatusCallback(HINTERNET,WINHTTP_STATUS_CALLBACK,DWORD,DWORD_PTR);
BOOL WINAPI WinHttpSetTimeouts(HINTERNET,int,int,int,int);
BOOL WINAPI WinHttpTimeFromSystemTime(CONST SYSTEMTIME *,LPWSTR);
BOOL WINAPI WinHttpTimeToSystemTime(LPCWSTR,SYSTEMTIME*);
BOOL WINAPI WinHttpWriteData(HINTERNET,LPCVOID,DWORD,LPDWORD);
#ifdef __cplusplus
}
#endif
#endif /* __WINE_WINHTTP_H */