diff --git a/reactos/baseaddress.rbuild b/reactos/baseaddress.rbuild index 5ea80b4f744..ec3934522a1 100644 --- a/reactos/baseaddress.rbuild +++ b/reactos/baseaddress.rbuild @@ -163,4 +163,5 @@ + diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff index 34c00fea385..615ad71b1f1 100644 --- a/reactos/boot/bootdata/packages/reactos.dff +++ b/reactos/boot/bootdata/packages/reactos.dff @@ -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 diff --git a/reactos/dll/win32/win32.rbuild b/reactos/dll/win32/win32.rbuild index 2902b2628e9..8e8ac10ccda 100644 --- a/reactos/dll/win32/win32.rbuild +++ b/reactos/dll/win32/win32.rbuild @@ -322,6 +322,12 @@ + + + + + + diff --git a/reactos/dll/win32/winfax/winfax.rbuild b/reactos/dll/win32/winfax/winfax.rbuild new file mode 100644 index 00000000000..3e42903c169 --- /dev/null +++ b/reactos/dll/win32/winfax/winfax.rbuild @@ -0,0 +1,13 @@ + + + . + + + 0x600 + 0x501 + 0x501 + kernel32 + ntdll + winfax.c + winfax.rc + \ No newline at end of file diff --git a/reactos/dll/win32/winhttp/main.c b/reactos/dll/win32/winhttp/main.c new file mode 100644 index 00000000000..c3616b66749 --- /dev/null +++ b/reactos/dll/win32/winhttp/main.c @@ -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 + +#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; +} diff --git a/reactos/dll/win32/winhttp/winhttp.rbuild b/reactos/dll/win32/winhttp/winhttp.rbuild new file mode 100644 index 00000000000..3399f6ee256 --- /dev/null +++ b/reactos/dll/win32/winhttp/winhttp.rbuild @@ -0,0 +1,16 @@ + + + . + include/reactos/wine + + + + 0x600 + 0x501 + 0x501 + wine + kernel32 + ntdll + main.c + winhttp.spec + \ No newline at end of file diff --git a/reactos/dll/win32/winhttp/winhttp.spec b/reactos/dll/win32/winhttp/winhttp.spec new file mode 100644 index 00000000000..e1562b6d8fe --- /dev/null +++ b/reactos/dll/win32/winhttp/winhttp.spec @@ -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 diff --git a/reactos/include/psdk/winhttp.h b/reactos/include/psdk/winhttp.h new file mode 100644 index 00000000000..c57563d8fb8 --- /dev/null +++ b/reactos/include/psdk/winhttp.h @@ -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 */