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
0daac59a
Commit
0daac59a
authored
Jul 19, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Implement IDispatch for WinHttpRequest.
parent
3321c450
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
9 deletions
+88
-9
Makefile.in
dlls/winhttp/Makefile.in
+1
-1
request.c
dlls/winhttp/request.c
+87
-8
No files found.
dlls/winhttp/Makefile.in
View file @
0daac59a
MODULE
=
winhttp.dll
IMPORTLIB
=
winhttp
IMPORTS
=
uuid shlwapi
DELAYIMPORTS
=
crypt32 advapi32
DELAYIMPORTS
=
oleaut32
crypt32 advapi32
EXTRALIBS
=
@SOCKETLIBS@
C_SRCS
=
\
...
...
dlls/winhttp/request.c
View file @
0daac59a
...
...
@@ -2196,8 +2196,59 @@ static HRESULT WINAPI winhttp_request_GetTypeInfoCount(
IWinHttpRequest
*
iface
,
UINT
*
count
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
struct
winhttp_request
*
request
=
impl_from_IWinHttpRequest
(
iface
);
TRACE
(
"%p, %p
\n
"
,
request
,
count
);
*
count
=
1
;
return
S_OK
;
}
enum
type_id
{
IWinHttpRequest_tid
,
last_tid
};
static
ITypeLib
*
winhttp_typelib
;
static
ITypeInfo
*
winhttp_typeinfo
[
last_tid
];
static
REFIID
winhttp_tid_id
[]
=
{
&
IID_IWinHttpRequest
};
static
HRESULT
get_typeinfo
(
enum
type_id
tid
,
ITypeInfo
**
ret
)
{
HRESULT
hr
;
if
(
!
winhttp_typelib
)
{
ITypeLib
*
typelib
;
hr
=
LoadRegTypeLib
(
&
LIBID_WinHttp
,
5
,
1
,
LOCALE_SYSTEM_DEFAULT
,
&
typelib
);
if
(
FAILED
(
hr
))
{
ERR
(
"LoadRegTypeLib failed: %08x
\n
"
,
hr
);
return
hr
;
}
if
(
InterlockedCompareExchangePointer
(
(
void
**
)
&
winhttp_typelib
,
typelib
,
NULL
))
ITypeLib_Release
(
typelib
);
}
if
(
!
winhttp_typeinfo
[
tid
])
{
ITypeInfo
*
typeinfo
;
hr
=
ITypeLib_GetTypeInfoOfGuid
(
winhttp_typelib
,
winhttp_tid_id
[
tid
],
&
typeinfo
);
if
(
FAILED
(
hr
))
{
ERR
(
"GetTypeInfoOfGuid(%s) failed: %08x
\n
"
,
debugstr_guid
(
winhttp_tid_id
[
tid
]),
hr
);
return
hr
;
}
if
(
InterlockedCompareExchangePointer
(
(
void
**
)(
winhttp_typeinfo
+
tid
),
typeinfo
,
NULL
))
ITypeInfo_Release
(
typeinfo
);
}
*
ret
=
winhttp_typeinfo
[
tid
];
return
S_OK
;
}
static
HRESULT
WINAPI
winhttp_request_GetTypeInfo
(
...
...
@@ -2206,8 +2257,10 @@ static HRESULT WINAPI winhttp_request_GetTypeInfo(
LCID
lcid
,
ITypeInfo
**
info
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
struct
winhttp_request
*
request
=
impl_from_IWinHttpRequest
(
iface
);
TRACE
(
"%p, %u, %u, %p
\n
"
,
request
,
index
,
lcid
,
info
);
return
get_typeinfo
(
IWinHttpRequest_tid
,
info
);
}
static
HRESULT
WINAPI
winhttp_request_GetIDsOfNames
(
...
...
@@ -2218,8 +2271,21 @@ static HRESULT WINAPI winhttp_request_GetIDsOfNames(
LCID
lcid
,
DISPID
*
dispid
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
struct
winhttp_request
*
request
=
impl_from_IWinHttpRequest
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"%p, %s, %p, %u, %u, %p
\n
"
,
request
,
debugstr_guid
(
riid
),
names
,
count
,
lcid
,
dispid
);
if
(
!
names
||
!
count
||
!
dispid
)
return
E_INVALIDARG
;
hr
=
get_typeinfo
(
IWinHttpRequest_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_GetIDsOfNames
(
typeinfo
,
names
,
count
,
dispid
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
winhttp_request_Invoke
(
...
...
@@ -2233,8 +2299,21 @@ static HRESULT WINAPI winhttp_request_Invoke(
EXCEPINFO
*
excep_info
,
UINT
*
arg_err
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
struct
winhttp_request
*
request
=
impl_from_IWinHttpRequest
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"%p, %d, %s, %d, %d, %p, %p, %p, %p
\n
"
,
request
,
member
,
debugstr_guid
(
riid
),
lcid
,
flags
,
params
,
result
,
excep_info
,
arg_err
);
hr
=
get_typeinfo
(
IWinHttpRequest_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
&
request
->
IWinHttpRequest_iface
,
member
,
flags
,
params
,
result
,
excep_info
,
arg_err
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
winhttp_request_SetProxy
(
...
...
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