Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d476a5ad
Commit
d476a5ad
authored
Nov 12, 2002
by
Alberto Massari
Committed by
Alexandre Julliard
Nov 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added HttpOpenRequestW, HttpQueryInfoW, HttpSendRequestW.
parent
03c7d468
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
3 deletions
+92
-3
Makefile.in
dlls/wininet/Makefile.in
+1
-0
http.c
dlls/wininet/http.c
+88
-0
wininet.spec
dlls/wininet/wininet.spec
+3
-3
No files found.
dlls/wininet/Makefile.in
View file @
d476a5ad
...
...
@@ -5,6 +5,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
wininet.dll
IMPORTS
=
shlwapi user32 kernel32
EXTRALIBS
=
$(LIBUNICODE)
LDDLLFLAGS
=
@LDDLLFLAGS@
SYMBOLFILE
=
$(MODULE)
.tmp.o
...
...
dlls/wininet/http.c
View file @
d476a5ad
...
...
@@ -47,6 +47,7 @@
#include "internet.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wininet
);
...
...
@@ -248,6 +249,35 @@ HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
}
}
/***********************************************************************
* HttpOpenRequestW (WININET.@)
*
* Open a HTTP request handle
*
* RETURNS
* HINTERNET a HTTP request handle on success
* NULL on failure
*
*/
HINTERNET
WINAPI
HttpOpenRequestW
(
HINTERNET
hHttpSession
,
LPCWSTR
lpszVerb
,
LPCWSTR
lpszObjectName
,
LPCWSTR
lpszVersion
,
LPCWSTR
lpszReferrer
,
LPCWSTR
*
lpszAcceptTypes
,
DWORD
dwFlags
,
DWORD
dwContext
)
{
char
szVerb
[
20
],
szObjectName
[
INTERNET_MAX_PATH_LENGTH
];
if
(
lpszVerb
!=
NULL
)
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszVerb
,
-
1
,
szVerb
,
20
,
NULL
,
NULL
);
else
szVerb
[
0
]
=
0
;
if
(
lpszObjectName
!=
NULL
)
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszObjectName
,
-
1
,
szObjectName
,
INTERNET_MAX_PATH_LENGTH
,
NULL
,
NULL
);
else
szObjectName
[
0
]
=
0
;
TRACE
(
"object name=%s
\n
"
,
szObjectName
);
FIXME
(
"lpszVersion, lpszReferrer and lpszAcceptTypes ignored
\n
"
);
return
HttpOpenRequestA
(
hHttpSession
,
szVerb
,
szObjectName
,
NULL
,
NULL
,
NULL
,
dwFlags
,
dwContext
);
}
/***********************************************************************
* HTTP_HttpOpenRequestA (internal)
...
...
@@ -563,6 +593,36 @@ lend:
return
bSuccess
;
}
/***********************************************************************
* HttpQueryInfoW (WININET.@)
*
* Queries for information about an HTTP request
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL
WINAPI
HttpQueryInfoW
(
HINTERNET
hHttpRequest
,
DWORD
dwInfoLevel
,
LPVOID
lpBuffer
,
LPDWORD
lpdwBufferLength
,
LPDWORD
lpdwIndex
)
{
BOOL
result
;
DWORD
charLen
=*
lpdwBufferLength
;
char
*
tempBuffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
charLen
);
result
=
HttpQueryInfoA
(
hHttpRequest
,
dwInfoLevel
,
tempBuffer
,
&
charLen
,
lpdwIndex
);
if
((
dwInfoLevel
&
HTTP_QUERY_FLAG_NUMBER
)
||
(
dwInfoLevel
&
HTTP_QUERY_FLAG_SYSTEMTIME
))
{
memcpy
(
lpBuffer
,
tempBuffer
,
charLen
);
}
else
{
int
nChars
=
MultiByteToWideChar
(
CP_ACP
,
0
,
tempBuffer
,
charLen
,
lpBuffer
,
*
lpdwBufferLength
);
*
lpdwBufferLength
=
nChars
;
}
HeapFree
(
GetProcessHeap
(),
0
,
tempBuffer
);
return
result
;
}
/***********************************************************************
* HttpSendRequestExA (WININET.@)
...
...
@@ -647,6 +707,34 @@ BOOL WINAPI HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders,
}
}
/***********************************************************************
* HttpSendRequestW (WININET.@)
*
* Sends the specified request to the HTTP server
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL
WINAPI
HttpSendRequestW
(
HINTERNET
hHttpRequest
,
LPCWSTR
lpszHeaders
,
DWORD
dwHeaderLength
,
LPVOID
lpOptional
,
DWORD
dwOptionalLength
)
{
BOOL
result
;
char
*
szHeaders
=
NULL
;
DWORD
nLen
=
dwHeaderLength
;
if
(
lpszHeaders
!=
NULL
)
{
if
(
nLen
==-
1
)
nLen
=
strlenW
(
lpszHeaders
);
szHeaders
=
(
char
*
)
malloc
(
nLen
+
1
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszHeaders
,
nLen
,
szHeaders
,
nLen
,
NULL
,
NULL
);
}
result
=
HttpSendRequestA
(
hHttpRequest
,
szHeaders
,
dwHeaderLength
,
lpOptional
,
dwOptionalLength
);
if
(
szHeaders
!=
NULL
)
free
(
szHeaders
);
return
result
;
}
/***********************************************************************
* HTTP_HttpSendRequestA (internal)
...
...
dlls/wininet/wininet.spec
View file @
d476a5ad
...
...
@@ -70,13 +70,13 @@
@ stdcall HttpEndRequestA(ptr ptr long long) HttpEndRequestA
@ stdcall HttpEndRequestW(ptr ptr long long) HttpEndRequestW
@ stdcall HttpOpenRequestA(ptr str str str str ptr long long) HttpOpenRequestA
@ st
ub
HttpOpenRequestW
@ st
dcall HttpOpenRequestW(ptr wstr wstr wstr wstr ptr long long)
HttpOpenRequestW
@ stdcall HttpQueryInfoA(ptr long ptr ptr ptr) HttpQueryInfoA
@ st
ub
HttpQueryInfoW
@ st
dcall HttpQueryInfoW(ptr long ptr ptr ptr)
HttpQueryInfoW
@ stdcall HttpSendRequestA(ptr str long ptr long) HttpSendRequestA
@ stdcall HttpSendRequestExA(long ptr ptr long long) HttpSendRequestExA
@ stub HttpSendRequestExW
@ st
ub
HttpSendRequestW
@ st
dcall HttpSendRequestW(ptr wstr long ptr long)
HttpSendRequestW
@ stub IncrementUrlCacheHeaderData
@ stdcall InternetAttemptConnect(long) InternetAttemptConnect
@ stdcall InternetAutodial(long ptr) InternetAutoDial
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment