mirror of
https://github.com/reactos/wine.git
synced 2025-01-31 09:01:59 +00:00
Merged urlmon.dll and wininet.dll from the Corel tree (implementation
by Ulrich Czekalla <ulrichc@corel.ca>)
This commit is contained in:
parent
114830e8a9
commit
819fa8ce38
@ -128,6 +128,7 @@ DLLS = \
|
||||
stress \
|
||||
tapi32 \
|
||||
ttydrv \
|
||||
urlmon \
|
||||
user32 \
|
||||
version \
|
||||
w32skrnl \
|
||||
@ -135,6 +136,7 @@ DLLS = \
|
||||
windebug \
|
||||
wineoss.drv \
|
||||
wing \
|
||||
wininet \
|
||||
winmm \
|
||||
winspool \
|
||||
wnaspi32 \
|
||||
|
4
configure
vendored
4
configure
vendored
@ -6271,6 +6271,7 @@ dlls/sound/Makefile
|
||||
dlls/stress/Makefile
|
||||
dlls/tapi32/Makefile
|
||||
dlls/ttydrv/Makefile
|
||||
dlls/urlmon/Makefile
|
||||
dlls/user/Makefile
|
||||
dlls/version/Makefile
|
||||
dlls/win32s/Makefile
|
||||
@ -6278,6 +6279,7 @@ dlls/win87em/Makefile
|
||||
dlls/winaspi/Makefile
|
||||
dlls/windebug/Makefile
|
||||
dlls/wing/Makefile
|
||||
dlls/wininet/Makefile
|
||||
dlls/winmm/Makefile
|
||||
dlls/winmm/joystick/Makefile
|
||||
dlls/winmm/mcianim/Makefile
|
||||
@ -6497,6 +6499,7 @@ dlls/sound/Makefile
|
||||
dlls/stress/Makefile
|
||||
dlls/tapi32/Makefile
|
||||
dlls/ttydrv/Makefile
|
||||
dlls/urlmon/Makefile
|
||||
dlls/user/Makefile
|
||||
dlls/version/Makefile
|
||||
dlls/win32s/Makefile
|
||||
@ -6504,6 +6507,7 @@ dlls/win87em/Makefile
|
||||
dlls/winaspi/Makefile
|
||||
dlls/windebug/Makefile
|
||||
dlls/wing/Makefile
|
||||
dlls/wininet/Makefile
|
||||
dlls/winmm/Makefile
|
||||
dlls/winmm/joystick/Makefile
|
||||
dlls/winmm/mcianim/Makefile
|
||||
|
@ -1027,6 +1027,7 @@ dlls/sound/Makefile
|
||||
dlls/stress/Makefile
|
||||
dlls/tapi32/Makefile
|
||||
dlls/ttydrv/Makefile
|
||||
dlls/urlmon/Makefile
|
||||
dlls/user/Makefile
|
||||
dlls/version/Makefile
|
||||
dlls/win32s/Makefile
|
||||
@ -1034,6 +1035,7 @@ dlls/win87em/Makefile
|
||||
dlls/winaspi/Makefile
|
||||
dlls/windebug/Makefile
|
||||
dlls/wing/Makefile
|
||||
dlls/wininet/Makefile
|
||||
dlls/winmm/Makefile
|
||||
dlls/winmm/joystick/Makefile
|
||||
dlls/winmm/mcianim/Makefile
|
||||
|
@ -37,6 +37,7 @@ DLLFILES = \
|
||||
stress/libstress.@LIBEXT@ \
|
||||
tapi32/libtapi32.@LIBEXT@ \
|
||||
ttydrv/libttydrv.@LIBEXT@ \
|
||||
urlmon/liburlmon.@LIBEXT@ \
|
||||
user/libuser32.@LIBEXT@ \
|
||||
version/libversion.@LIBEXT@ \
|
||||
win32s/libw32skrnl.@LIBEXT@ \
|
||||
@ -44,6 +45,7 @@ DLLFILES = \
|
||||
winaspi/libwnaspi32.@LIBEXT@ \
|
||||
windebug/libwindebug.@LIBEXT@ \
|
||||
wing/libwing.@LIBEXT@ \
|
||||
wininet/libwininet.@LIBEXT@ \
|
||||
winmm/joystick/libjoystick.drv.@LIBEXT@ \
|
||||
winmm/libwinmm.@LIBEXT@ \
|
||||
winmm/mcianim/libmcianim.drv.@LIBEXT@ \
|
||||
@ -118,6 +120,7 @@ SUBDIRS = \
|
||||
stress \
|
||||
tapi32 \
|
||||
ttydrv \
|
||||
urlmon \
|
||||
user \
|
||||
version \
|
||||
win32s \
|
||||
@ -125,6 +128,7 @@ SUBDIRS = \
|
||||
winaspi \
|
||||
windebug \
|
||||
wing \
|
||||
wininet \
|
||||
winmm \
|
||||
winsock \
|
||||
winspool \
|
||||
@ -259,6 +263,9 @@ libtapi32.@LIBEXT@: tapi32/libtapi32.@LIBEXT@
|
||||
libttydrv.@LIBEXT@: ttydrv/libttydrv.@LIBEXT@
|
||||
$(RM) $@ && $(LN_S) ttydrv/libttydrv.@LIBEXT@ $@
|
||||
|
||||
liburlmon.@LIBEXT@: urlmon/liburlmon.@LIBEXT@
|
||||
$(RM) $@ && $(LN_S) urlmon/liburlmon.@LIBEXT@ $@
|
||||
|
||||
libuser32.@LIBEXT@ libuser.@LIBEXT@: user/libuser32.@LIBEXT@
|
||||
$(RM) $@ && $(LN_S) user/libuser32.@LIBEXT@ $@
|
||||
|
||||
@ -280,6 +287,9 @@ libwineoss.drv.@LIBEXT@: winmm/wineoss/libwineoss.drv.@LIBEXT@
|
||||
libwing.@LIBEXT@: wing/libwing.@LIBEXT@
|
||||
$(RM) $@ && $(LN_S) wing/libwing.@LIBEXT@ $@
|
||||
|
||||
libwininet.@LIBEXT@: wininet/libwininet.@LIBEXT@
|
||||
$(RM) $@ && $(LN_S) wininet/libwininet.@LIBEXT@ $@
|
||||
|
||||
libwinmm.@LIBEXT@ libmmsystem.@LIBEXT@: winmm/libwinmm.@LIBEXT@
|
||||
$(RM) $@ && $(LN_S) winmm/libwinmm.@LIBEXT@ $@
|
||||
|
||||
|
3
dlls/urlmon/.cvsignore
Normal file
3
dlls/urlmon/.cvsignore
Normal file
@ -0,0 +1,3 @@
|
||||
Makefile
|
||||
liburlmon.so.1.0
|
||||
urlmon.spec.c
|
16
dlls/urlmon/Makefile.in
Normal file
16
dlls/urlmon/Makefile.in
Normal file
@ -0,0 +1,16 @@
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = urlmon
|
||||
SOVERSION = 1.0
|
||||
IMPORTS = ole32
|
||||
WRCEXTRA = -s -p$(MODULE)
|
||||
|
||||
SPEC_SRCS = urlmon.spec
|
||||
|
||||
C_SRCS = umon.c
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
### Dependencies:
|
37
dlls/urlmon/umon.c
Normal file
37
dlls/urlmon/umon.c
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* UrlMon
|
||||
*
|
||||
* Copyright 1999 Corel Corporation
|
||||
*
|
||||
* Ulrich Czekalla
|
||||
*
|
||||
*/
|
||||
|
||||
#include "windows.h"
|
||||
#include "objbase.h"
|
||||
#include "debugtools.h"
|
||||
|
||||
#include "urlmon.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(win32);
|
||||
|
||||
/***********************************************************************
|
||||
* CreateURLMoniker (URLMON.22)
|
||||
*
|
||||
* Create a url moniker
|
||||
*
|
||||
* RETURNS
|
||||
* S_OK success
|
||||
* E_OUTOFMEMORY out of memory
|
||||
* MK_E_SYNTAX not a valid url
|
||||
*
|
||||
*/
|
||||
HRESULT CreateURLMoniker(IMoniker *pmkContext, LPWSTR szURL, IMoniker **ppmk)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
||||
if (NULL != pmkContext)
|
||||
FIXME("Non-null pmkContext not implemented\n");
|
||||
|
||||
return CreateFileMoniker(szURL, ppmk);
|
||||
}
|
80
dlls/urlmon/urlmon.spec
Normal file
80
dlls/urlmon/urlmon.spec
Normal file
@ -0,0 +1,80 @@
|
||||
name urlmon
|
||||
type win32
|
||||
|
||||
1 stub CDLGetLongPathNameA
|
||||
2 stub CDLGetLongPathNameW
|
||||
@ stub AsyncGetClassBits
|
||||
@ stub AsyncInstallDistributionUnit
|
||||
@ stub BindAsyncMoniker
|
||||
@ stub CoGetClassObjectFromURL
|
||||
@ stub CoInstall
|
||||
@ stub CoInternetCombineUrl
|
||||
@ stub CoInternetCompareUrl
|
||||
@ stub CoInternetCreateSecurityManager
|
||||
@ stub CoInternetCreateZoneManager
|
||||
@ stub CoInternetGetProtocolFlags
|
||||
@ stub CoInternetGetSecurityUrl
|
||||
@ stub CoInternetGetSession
|
||||
@ stub CoInternetParseUrl
|
||||
@ stub CoInternetQueryInfo
|
||||
@ stub CopyBindInfo
|
||||
@ stub CopyStgMedium
|
||||
@ stub CreateAsyncBindCtx
|
||||
@ stub CreateAsyncBindCtxEx
|
||||
@ stub CreateFormatEnumerator
|
||||
@ stdcall CreateURLMoniker(ptr str ptr) CreateURLMoniker
|
||||
@ stub DllCanUnloadNow
|
||||
@ stub DllGetClassObject
|
||||
@ stub DllInstall
|
||||
@ stub DllRegisterServer
|
||||
@ stub DllRegisterServerEx
|
||||
@ stub DllUnregisterServer
|
||||
@ stub Extract
|
||||
@ stub FaultInIEFeature
|
||||
@ stub FindMediaType
|
||||
@ stub FindMediaTypeClass
|
||||
@ stub FindMimeFromData
|
||||
@ stub GetClassFileOrMime
|
||||
@ stub GetClassURL
|
||||
@ stub GetComponentIDFromCLSSPEC
|
||||
@ stub GetMarkOfTheWeb
|
||||
@ stub GetSoftwareUpdateInfo
|
||||
@ stub HlinkGoBack
|
||||
@ stub HlinkGoForward
|
||||
@ stub HlinkNavigateMoniker
|
||||
@ stub HlinkNavigateString
|
||||
@ stub HlinkSimpleNavigateToMoniker
|
||||
@ stub HlinkSimpleNavigateToString
|
||||
@ stub IsAsyncMoniker
|
||||
@ stub IsLoggingEnabledA
|
||||
@ stub IsLoggingEnabledW
|
||||
@ stub IsValidURL
|
||||
@ stub MkParseDisplayNameEx
|
||||
@ stub ObtainUserAgentString
|
||||
@ stub PrivateCoInstall
|
||||
@ stub RegisterBindStatusCallback
|
||||
@ stub RegisterFormatEnumerator
|
||||
@ stub RegisterMediaTypeClass
|
||||
@ stub RegisterMediaTypes
|
||||
@ stub ReleaseBindInfo
|
||||
@ stub RevokeBindStatusCallback
|
||||
@ stub RevokeFormatEnumerator
|
||||
@ stub SetSoftwareUpdateAdvertisementState
|
||||
@ stub URLDownloadA
|
||||
@ stub URLDownloadToCacheFileA
|
||||
@ stub URLDownloadToCacheFileW
|
||||
@ stub URLDownloadToFileA
|
||||
@ stub URLDownloadToFileW
|
||||
@ stub URLDownloadW
|
||||
@ stub URLOpenBlockingStreamA
|
||||
@ stub URLOpenBlockingStreamW
|
||||
@ stub URLOpenPullStreamA
|
||||
@ stub URLOpenPullStreamW
|
||||
@ stub URLOpenStreamA
|
||||
@ stub URLOpenStreamW
|
||||
@ stub UrlMkBuildVersion
|
||||
@ stub UrlMkGetSessionOption
|
||||
@ stub UrlMkSetSessionOption
|
||||
@ stub WriteHitLogging
|
||||
@ stub ZonesReInit
|
||||
|
3
dlls/wininet/.cvsignore
Normal file
3
dlls/wininet/.cvsignore
Normal file
@ -0,0 +1,3 @@
|
||||
Makefile
|
||||
libwininet.so.1.0
|
||||
wininet.spec.c
|
17
dlls/wininet/Makefile.in
Normal file
17
dlls/wininet/Makefile.in
Normal file
@ -0,0 +1,17 @@
|
||||
TOPSRCDIR = @top_srcdir@
|
||||
TOPOBJDIR = ../..
|
||||
SRCDIR = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
MODULE = wininet
|
||||
SOVERSION = 1.0
|
||||
|
||||
SPEC_SRCS = wininet.spec
|
||||
|
||||
C_SRCS = \
|
||||
internet.c \
|
||||
ftp.c \
|
||||
utility.c
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
### Dependencies:
|
2491
dlls/wininet/ftp.c
Normal file
2491
dlls/wininet/ftp.c
Normal file
File diff suppressed because it is too large
Load Diff
1107
dlls/wininet/internet.c
Normal file
1107
dlls/wininet/internet.c
Normal file
File diff suppressed because it is too large
Load Diff
196
dlls/wininet/internet.h
Normal file
196
dlls/wininet/internet.h
Normal file
@ -0,0 +1,196 @@
|
||||
#ifndef _WINE_INTERNET_H_
|
||||
#define _WINE_INTERNET_H_
|
||||
|
||||
typedef enum
|
||||
{
|
||||
WH_HINIT,
|
||||
WH_HFTPSESSION,
|
||||
WH_HGOPHERSESSION,
|
||||
WH_HHTTPSESSION,
|
||||
WH_HHTTPREQ,
|
||||
WH_HFILE,
|
||||
WH_HFINDNEXT,
|
||||
} WH_TYPE;
|
||||
|
||||
typedef struct _WININETHANDLEHEADER
|
||||
{
|
||||
WH_TYPE htype;
|
||||
DWORD dwFlags;
|
||||
DWORD dwContext;
|
||||
DWORD dwError;
|
||||
struct _WININETHANDLEHEADER *lpwhparent;
|
||||
} WININETHANDLEHEADER, *LPWININETHANDLEHEADER;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
LPSTR lpszAgent;
|
||||
LPSTR lpszProxy;
|
||||
LPSTR lpszProxyBypass;
|
||||
DWORD dwAccessType;
|
||||
INTERNET_STATUS_CALLBACK lpfnStatusCB;
|
||||
} WININETAPPINFOA, *LPWININETAPPINFOA;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
LPSTR lpszServerName;
|
||||
LPSTR lpszUserName;
|
||||
INTERNET_PORT nServerPort;
|
||||
struct sockaddr_in socketAddress;
|
||||
struct hostent *phostent;
|
||||
} WININETHTTPSESSIONA, *LPWININETHTTPSESSIONA;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
LPSTR lpszPath;
|
||||
LPSTR lpszReferrer;
|
||||
LPSTR lpszAcceptTypes;
|
||||
LPSTR lpszVerb;
|
||||
LPSTR lpszHostName;
|
||||
LPSTR lpszRedirect;
|
||||
int nSocketFD;
|
||||
int statusCode;
|
||||
int contentLength;
|
||||
time_t nSystemTime;
|
||||
} WININETHTTPREQA, *LPWININETHTTPREQA;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
int sndSocket;
|
||||
int lstnSocket;
|
||||
struct sockaddr_in socketAddress;
|
||||
struct sockaddr_in lstnSocketAddress;
|
||||
struct hostent *phostent;
|
||||
LPSTR lpszPassword;
|
||||
LPSTR lpszUserName;
|
||||
} WININETFTPSESSIONA, *LPWININETFTPSESSIONA;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
int nDataSocket;
|
||||
} WININETFILE, *LPWININETFILE;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOL bIsDirectory;
|
||||
LPSTR lpszName;
|
||||
DWORD nSize;
|
||||
struct tm tmLastModified;
|
||||
unsigned short permissions;
|
||||
} FILEPROPERTIESA, *LPFILEPROPERTIESA;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WININETHANDLEHEADER hdr;
|
||||
int index;
|
||||
DWORD size;
|
||||
LPFILEPROPERTIESA lpafp;
|
||||
} WININETFINDNEXTA, *LPWININETFINDNEXTA;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FTPPUTFILEA,
|
||||
FTPSETCURRENTDIRECTORYA,
|
||||
FTPCREATEDIRECTORYA,
|
||||
FTPFINDFIRSTFILEA,
|
||||
FTPGETCURRENTDIRECTORYA,
|
||||
FTPOPENFILEA,
|
||||
FTPGETFILEA,
|
||||
FTPDELETEFILEA,
|
||||
FTPREMOVEDIRECTORYA,
|
||||
FTPRENAMEFILEA,
|
||||
INTERNETFINDNEXTA,
|
||||
} ASYNC_FUNC;
|
||||
|
||||
typedef struct WORKREQ
|
||||
{
|
||||
ASYNC_FUNC asyncall;
|
||||
DWORD param1;
|
||||
#define HFTPSESSION param1
|
||||
|
||||
DWORD param2;
|
||||
#define LPSZLOCALFILE param2
|
||||
#define LPSZREMOTEFILE param2
|
||||
#define LPSZFILENAME param2
|
||||
#define LPSZSRCFILE param2
|
||||
#define LPSZDIRECTORY param2
|
||||
#define LPSZSEARCHFILE param2
|
||||
|
||||
DWORD param3;
|
||||
#define LPSZNEWREMOTEFILE param3
|
||||
#define LPSZNEWFILE param3
|
||||
#define LPFINDFILEDATA param3
|
||||
#define LPDWDIRECTORY param3
|
||||
#define FDWACCESS param3
|
||||
#define LPSZDESTFILE param3
|
||||
|
||||
DWORD param4;
|
||||
#define DWFLAGS param4
|
||||
|
||||
DWORD param5;
|
||||
#define DWCONTEXT param5
|
||||
|
||||
DWORD param6;
|
||||
#define FFAILIFEXISTS param4
|
||||
|
||||
DWORD param7;
|
||||
#define DWLOCALFLAGSATTRIBUTE param7
|
||||
|
||||
struct WORKREQ *next;
|
||||
struct WORKREQ *prev;
|
||||
|
||||
} WORKREQUEST, *LPWORKREQUEST;
|
||||
|
||||
|
||||
time_t ConvertTimeString(LPCSTR asctime);
|
||||
|
||||
HINTERNET FTP_Connect(HINTERNET hInterent, LPCSTR lpszServerName,
|
||||
INTERNET_PORT nServerPort, LPCSTR lpszUserName,
|
||||
LPCSTR lpszPassword, DWORD dwFlags, DWORD dwContext);
|
||||
|
||||
BOOL GetAddress(LPCSTR lpszServerName, INTERNET_PORT nServerPort,
|
||||
struct hostent **phe, struct sockaddr_in *psa);
|
||||
|
||||
int INTERNET_WriteDataToStream(int nDataSocket, LPCVOID Buffer, DWORD BytesToWrite);
|
||||
int INTERNET_ReadDataFromStream(int nDataSocket, LPVOID Buffer, DWORD BytesToRead);
|
||||
void INTERNET_SetLastError(DWORD dwError);
|
||||
DWORD INTERNET_GetLastError();
|
||||
BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest);
|
||||
LPSTR INTERNET_GetResponseBuffer();
|
||||
|
||||
BOOL FTP_CloseSessionHandle(LPWININETFTPSESSIONA lpwfs);
|
||||
BOOL FTP_CloseFindNextHandle(LPWININETFINDNEXTA lpwfn);
|
||||
BOOLAPI FTP_FtpPutFileA(HINTERNET hConnect, LPCSTR lpszLocalFile,
|
||||
LPCSTR lpszNewRemoteFile, DWORD dwFlags, DWORD dwContext);
|
||||
BOOLAPI FTP_FtpSetCurrentDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory);
|
||||
BOOLAPI FTP_FtpCreateDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory);
|
||||
INTERNETAPI HINTERNET WINAPI FTP_FtpFindFirstFileA(HINTERNET hConnect,
|
||||
LPCSTR lpszSearchFile, LPWIN32_FIND_DATAA lpFindFileData, DWORD dwFlags, DWORD dwContext);
|
||||
BOOLAPI FTP_FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory,
|
||||
LPDWORD lpdwCurrentDirectory);
|
||||
BOOL FTP_ConvertFileProp(LPFILEPROPERTIESA lpafp, LPWIN32_FIND_DATAA lpFindFileData);
|
||||
BOOL FTP_FtpRenameFileA(HINTERNET hFtpSession, LPCSTR lpszSrc, LPCSTR lpszDest);
|
||||
BOOL FTP_FtpRemoveDirectoryA(HINTERNET hFtpSession, LPCSTR lpszDirectory);
|
||||
BOOL FTP_FtpDeleteFileA(HINTERNET hFtpSession, LPCSTR lpszFileName);
|
||||
HINTERNET FTP_FtpOpenFileA(HINTERNET hFtpSession, LPCSTR lpszFileName,
|
||||
DWORD fdwAccess, DWORD dwFlags, DWORD dwContext);
|
||||
BOOLAPI FTP_FtpGetFileA(HINTERNET hInternet, LPCSTR lpszRemoteFile, LPCSTR lpszNewFile,
|
||||
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
|
||||
DWORD dwContext);
|
||||
|
||||
|
||||
#define MAX_REPLY_LEN 0x5B4
|
||||
|
||||
|
||||
#endif /* _WINE_INTERNET_H_ */
|
127
dlls/wininet/utility.c
Normal file
127
dlls/wininet/utility.c
Normal file
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Wininet - Utility functions
|
||||
*
|
||||
* Copyright 1999 Corel Corporation
|
||||
*
|
||||
* Ulrich Czekalla
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "windows.h"
|
||||
#include "wininet.h"
|
||||
#include "winerror.h"
|
||||
#include "winsock.h"
|
||||
|
||||
#include "debugtools.h"
|
||||
#include "internet.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(wininet);
|
||||
|
||||
#define TIME_STRING_LEN 30
|
||||
|
||||
time_t ConvertTimeString(LPCSTR asctime)
|
||||
{
|
||||
char tmpChar[TIME_STRING_LEN];
|
||||
char *tmpChar2;
|
||||
struct tm SystemTime;
|
||||
int timelen = strlen(asctime);
|
||||
|
||||
if(!asctime || !timelen)
|
||||
return 0;
|
||||
|
||||
strncpy(tmpChar, asctime, TIME_STRING_LEN);
|
||||
|
||||
/* Assert that the string is the expected length */
|
||||
if (tmpChar[TIME_STRING_LEN] != '\0')
|
||||
{
|
||||
tmpChar[TIME_STRING_LEN] = '\0';
|
||||
FIXME("\n");
|
||||
}
|
||||
|
||||
/* Convert a time such as 'Mon, 15 Nov 1999 16:09:35 GMT' into a SYSTEMTIME structure
|
||||
* We assume the time is in this format
|
||||
* and divide it into easy to swallow chunks
|
||||
*/
|
||||
tmpChar[3]='\0';
|
||||
tmpChar[7]='\0';
|
||||
tmpChar[11]='\0';
|
||||
tmpChar[16]='\0';
|
||||
tmpChar[19]='\0';
|
||||
tmpChar[22]='\0';
|
||||
tmpChar[25]='\0';
|
||||
|
||||
SystemTime.tm_year = atoi(tmpChar+12) - 1900;
|
||||
SystemTime.tm_mday = atoi(tmpChar+5);
|
||||
SystemTime.tm_hour = atoi(tmpChar+17);
|
||||
SystemTime.tm_min = atoi(tmpChar+20);
|
||||
SystemTime.tm_sec = atoi(tmpChar+23);
|
||||
|
||||
/* and month */
|
||||
tmpChar2 = tmpChar + 8;
|
||||
switch(tmpChar2[2])
|
||||
{
|
||||
case 'n':
|
||||
if(tmpChar2[1]=='a')
|
||||
SystemTime.tm_mon = 0;
|
||||
else
|
||||
SystemTime.tm_mon = 5;
|
||||
break;
|
||||
case 'b':
|
||||
SystemTime.tm_mon = 1;
|
||||
break;
|
||||
case 'r':
|
||||
if(tmpChar2[1]=='a')
|
||||
SystemTime.tm_mon = 2;
|
||||
else
|
||||
SystemTime.tm_mon = 3;
|
||||
break;
|
||||
case 'y':
|
||||
SystemTime.tm_mon = 4;
|
||||
break;
|
||||
case 'l':
|
||||
SystemTime.tm_mon = 6;
|
||||
break;
|
||||
case 'g':
|
||||
SystemTime.tm_mon = 7;
|
||||
break;
|
||||
case 'p':
|
||||
SystemTime.tm_mon = 8;
|
||||
break;
|
||||
case 't':
|
||||
SystemTime.tm_mon = 9;
|
||||
break;
|
||||
case 'v':
|
||||
SystemTime.tm_mon = 10;
|
||||
break;
|
||||
case 'c':
|
||||
SystemTime.tm_mon = 11;
|
||||
break;
|
||||
default:
|
||||
FIXME("\n");
|
||||
}
|
||||
|
||||
return mktime(&SystemTime);
|
||||
}
|
||||
|
||||
|
||||
BOOL GetAddress(LPCSTR lpszServerName, INTERNET_PORT nServerPort,
|
||||
struct hostent **phe, struct sockaddr_in *psa)
|
||||
{
|
||||
*phe = gethostbyname(lpszServerName);
|
||||
if (NULL == *phe)
|
||||
{
|
||||
TRACE("Failed to get hostname %s\n", lpszServerName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
memset(psa,0,sizeof(struct sockaddr_in));
|
||||
memcpy((char *)&psa->sin_addr, (*phe)->h_addr, (*phe)->h_length);
|
||||
psa->sin_family = (*phe)->h_addrtype;
|
||||
psa->sin_port = htons((u_short)nServerPort);
|
||||
|
||||
return TRUE;
|
||||
}
|
165
dlls/wininet/wininet.spec
Normal file
165
dlls/wininet/wininet.spec
Normal file
@ -0,0 +1,165 @@
|
||||
name wininet
|
||||
type win32
|
||||
init WININET_LibMain
|
||||
|
||||
@ stub InternetInitializeAutoProxyDll
|
||||
@ stub ShowCertificate
|
||||
@ stub CommitUrlCacheEntryA
|
||||
@ stub CommitUrlCacheEntryW
|
||||
@ stub CreateUrlCacheContainerA
|
||||
@ stub CreateUrlCacheContainerW
|
||||
@ stub CreateUrlCacheEntryA
|
||||
@ stub CreateUrlCacheEntryW
|
||||
@ stub CreateUrlCacheGroup
|
||||
@ stub DeleteIE3Cache
|
||||
@ stub DeleteUrlCacheContainerA
|
||||
@ stub DeleteUrlCacheContainerW
|
||||
@ stub DeleteUrlCacheEntry
|
||||
@ stub DeleteUrlCacheGroup
|
||||
@ stub DllInstall
|
||||
@ stub FindCloseUrlCache
|
||||
@ stub FindFirstUrlCacheContainerA
|
||||
@ stub FindFirstUrlCacheContainerW
|
||||
@ stub FindFirstUrlCacheEntryA
|
||||
@ stub FindFirstUrlCacheEntryExA
|
||||
@ stub FindFirstUrlCacheEntryExW
|
||||
@ stub FindFirstUrlCacheEntryW
|
||||
@ stub FindNextUrlCacheContainerA
|
||||
@ stub FindNextUrlCacheContainerW
|
||||
@ stub FindNextUrlCacheEntryA
|
||||
@ stub FindNextUrlCacheEntryExA
|
||||
@ stub FindNextUrlCacheEntryExW
|
||||
@ stub FindNextUrlCacheEntryW
|
||||
@ stub FreeUrlCacheSpaceA
|
||||
@ stub FreeUrlCacheSpaceW
|
||||
@ stdcall FtpCreateDirectoryA(ptr str) FtpCreateDirectoryA
|
||||
@ stub FtpCreateDirectoryW
|
||||
@ stdcall FtpDeleteFileA(ptr str) FtpDeleteFileA
|
||||
@ stub FtpDeleteFileW
|
||||
@ stdcall FtpFindFirstFileA(ptr str str long long) FtpFindFirstFileA
|
||||
@ stub FtpFindFirstFileW
|
||||
@ stdcall FtpGetCurrentDirectoryA(ptr str ptr) FtpGetCurrentDirectoryA
|
||||
@ stub FtpGetCurrentDirectoryW
|
||||
@ stdcall FtpGetFileA(ptr str str long long long long) FtpGetFileA
|
||||
@ stub FtpGetFileW
|
||||
@ stdcall FtpOpenFileA(ptr str long long long) FtpOpenFileA
|
||||
@ stub FtpOpenFileW
|
||||
@ stdcall FtpPutFileA(ptr str str long long) FtpPutFileA
|
||||
@ stub FtpPutFileW
|
||||
@ stdcall FtpRemoveDirectoryA(ptr str) FtpRemoveDirectoryA
|
||||
@ stub FtpRemoveDirectoryW
|
||||
@ stdcall FtpRenameFileA(ptr str str) FtpRenameFileA
|
||||
@ stub FtpRenameFileW
|
||||
@ stdcall FtpSetCurrentDirectoryA(ptr str) FtpSetCurrentDirectoryA
|
||||
@ stub FtpSetCurrentDirectoryW
|
||||
@ stub GetUrlCacheConfigInfoA
|
||||
@ stub GetUrlCacheConfigInfoW
|
||||
@ stub GetUrlCacheEntryInfoA
|
||||
@ stub GetUrlCacheEntryInfoExA
|
||||
@ stub GetUrlCacheEntryInfoExW
|
||||
@ stub GetUrlCacheEntryInfoW
|
||||
@ stub GetUrlCacheHeaderData
|
||||
@ stub GopherCreateLocatorA
|
||||
@ stub GopherCreateLocatorW
|
||||
@ stub GopherFindFirstFileA
|
||||
@ stub GopherFindFirstFileW
|
||||
@ stub GopherGetAttributeA
|
||||
@ stub GopherGetAttributeW
|
||||
@ stub GopherGetLocatorTypeA
|
||||
@ stub GopherGetLocatorTypeW
|
||||
@ stub GopherOpenFileA
|
||||
@ stub GopherOpenFileW
|
||||
@ stub HttpAddRequestHeadersA
|
||||
@ stub HttpAddRequestHeadersW
|
||||
@ stub HttpEndRequestA
|
||||
@ stub HttpEndRequestW
|
||||
@ stub HttpOpenRequestA
|
||||
@ stub HttpOpenRequestW
|
||||
@ stub HttpQueryInfoA
|
||||
@ stub HttpQueryInfoW
|
||||
@ stub HttpSendRequestA
|
||||
@ stub HttpSendRequestExA
|
||||
@ stub HttpSendRequestExW
|
||||
@ stub HttpSendRequestW
|
||||
@ stub IncrementUrlCacheHeaderData
|
||||
@ stdcall InternetAttemptConnect(long) InternetAttemptConnect
|
||||
@ stub InternetAutodial
|
||||
@ stub InternetAutodialCallback
|
||||
@ stub InternetAutodialHangup
|
||||
@ stdcall InternetCanonicalizeUrlA(str str ptr long) InternetCanonicalizeUrlA
|
||||
@ stub InternetCanonicalizeUrlW
|
||||
@ stub InternetCheckConnectionA
|
||||
@ stub InternetCheckConnectionW
|
||||
@ stdcall InternetCloseHandle(long) InternetCloseHandle
|
||||
@ stub InternetCombineUrlA
|
||||
@ stub InternetCombineUrlW
|
||||
@ stub InternetConfirmZoneCrossing
|
||||
@ stdcall InternetConnectA(ptr str long str str long long long) InternetConnectA
|
||||
@ stub InternetConnectW
|
||||
@ stdcall InternetCrackUrlA(str long long ptr) InternetCrackUrlA
|
||||
@ stub InternetCrackUrlW
|
||||
@ stub InternetCreateUrlA
|
||||
@ stub InternetCreateUrlW
|
||||
@ stub InternetDebugGetLocalTime
|
||||
@ stub InternetDial
|
||||
@ stub InternetErrorDlg
|
||||
@ stdcall InternetFindNextFileA(ptr ptr) InternetFindNextFileA
|
||||
@ stub InternetFindNextFileW
|
||||
@ stub InternetGetCertByURL
|
||||
@ stub InternetGetConnectedState
|
||||
@ stub InternetGetCookieA
|
||||
@ stub InternetGetCookieW
|
||||
@ stdcall InternetGetLastResponseInfoA(ptr str ptr) InternetGetLastResponseInfoA
|
||||
@ stub InternetGetLastResponseInfoW
|
||||
@ stub InternetGoOnline
|
||||
@ stub InternetHangUp
|
||||
@ stub InternetLockRequestFile
|
||||
@ stdcall InternetOpenA(str long str str long) InternetOpenA
|
||||
@ stub InternetOpenServerPushParse
|
||||
@ stub InternetOpenUrlA
|
||||
@ stub InternetOpenUrlW
|
||||
@ stub InternetOpenW
|
||||
@ stub InternetQueryDataAvailable
|
||||
@ stub InternetQueryOptionA
|
||||
@ stub InternetQueryOptionW
|
||||
@ stdcall InternetReadFile(ptr ptr long ptr) InternetReadFile
|
||||
@ stub InternetReadFileExA
|
||||
@ stub InternetReadFileExW
|
||||
@ stub InternetServerPushParse
|
||||
@ stub InternetSetCookieA
|
||||
@ stub InternetSetCookieW
|
||||
@ stub InternetSetDialState
|
||||
@ stub InternetSetFilePointer
|
||||
@ stub InternetSetOptionA
|
||||
@ stub InternetSetOptionExA
|
||||
@ stub InternetSetOptionExW
|
||||
@ stub InternetSetOptionW
|
||||
@ stdcall InternetSetStatusCallback(ptr ptr) InternetSetStatusCallback
|
||||
@ stub InternetShowSecurityInfoByURL
|
||||
@ stub InternetTimeFromSystemTime
|
||||
@ stub InternetTimeToSystemTime
|
||||
@ stub InternetUnlockRequestFile
|
||||
@ stdcall InternetWriteFile(ptr ptr long ptr) InternetWriteFile
|
||||
@ stub InternetWriteFileExA
|
||||
@ stub InternetWriteFileExW
|
||||
@ stub IsHostInProxyBypassList
|
||||
@ stub LoadUrlCacheContent
|
||||
@ stub ParseX509EncodedCertificateForListBoxEntry
|
||||
@ stub ReadUrlCacheEntryStream
|
||||
@ stub RetrieveUrlCacheEntryFileA
|
||||
@ stub RetrieveUrlCacheEntryFileW
|
||||
@ stub RetrieveUrlCacheEntryStreamA
|
||||
@ stub RetrieveUrlCacheEntryStreamW
|
||||
@ stub RunOnceUrlCache
|
||||
@ stub SetUrlCacheConfigInfoA
|
||||
@ stub SetUrlCacheConfigInfoW
|
||||
@ stub SetUrlCacheEntryGroup
|
||||
@ stub SetUrlCacheEntryInfoA
|
||||
@ stub SetUrlCacheEntryInfoW
|
||||
@ stub SetUrlCacheHeaderData
|
||||
@ stub ShowClientAuthCerts
|
||||
@ stub ShowSecurityInfo
|
||||
@ stub ShowX509EncodedCertificate
|
||||
@ stub UnlockUrlCacheEntryFile
|
||||
@ stub UnlockUrlCacheEntryStream
|
||||
@ stub UpdateUrlCacheContentPath
|
@ -164,13 +164,14 @@ char dbch_win16drv[] = "\003win16drv";
|
||||
char dbch_win32[] = "\003win32";
|
||||
char dbch_winedbg[] = "\003winedbg";
|
||||
char dbch_wing[] = "\003wing";
|
||||
char dbch_wininet[] = "\003wininet";
|
||||
char dbch_winsock[] = "\003winsock";
|
||||
char dbch_winspool[] = "\003winspool";
|
||||
char dbch_wnet[] = "\003wnet";
|
||||
char dbch_x11[] = "\003x11";
|
||||
char dbch_x11drv[] = "\003x11drv";
|
||||
|
||||
#define DEBUG_CHANNEL_COUNT 163
|
||||
#define DEBUG_CHANNEL_COUNT 164
|
||||
|
||||
static char * const debug_channels[DEBUG_CHANNEL_COUNT] = {
|
||||
dbch_accel,
|
||||
@ -331,6 +332,7 @@ static char * const debug_channels[DEBUG_CHANNEL_COUNT] = {
|
||||
dbch_win32,
|
||||
dbch_winedbg,
|
||||
dbch_wing,
|
||||
dbch_wininet,
|
||||
dbch_winsock,
|
||||
dbch_winspool,
|
||||
dbch_wnet,
|
||||
|
11
include/urlmon.h
Normal file
11
include/urlmon.h
Normal file
@ -0,0 +1,11 @@
|
||||
/*
|
||||
* urlmon.h
|
||||
*/
|
||||
|
||||
#ifndef __WINE_URLMON_H
|
||||
#define __WINE_URLMON_H
|
||||
|
||||
HRESULT CreateURLMoniker(IMoniker *pmkContext, LPWSTR szURL, IMoniker **ppmk);
|
||||
|
||||
#endif /* __WINE_URLMON_H */
|
||||
|
1403
include/wininet.h
Normal file
1403
include/wininet.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user