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
168e915c
Commit
168e915c
authored
Feb 26, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added IInternetBindInfo implementation to BindStatusCallback object.
parent
67d2b52c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
0 deletions
+73
-0
bindctx.c
dlls/urlmon/bindctx.c
+62
-0
url.c
dlls/urlmon/tests/url.c
+11
-0
No files found.
dlls/urlmon/bindctx.c
View file @
168e915c
...
...
@@ -29,6 +29,7 @@ extern IID IID_IBindStatusCallbackHolder;
typedef
struct
{
IBindStatusCallbackEx
IBindStatusCallbackEx_iface
;
IInternetBindInfo
IInternetBindInfo_iface
;
IServiceProvider
IServiceProvider_iface
;
IHttpNegotiate2
IHttpNegotiate2_iface
;
IAuthenticate
IAuthenticate_iface
;
...
...
@@ -126,6 +127,9 @@ static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallbackEx *i
}
else
if
(
IsEqualGUID
(
&
IID_IAuthenticate
,
riid
))
{
TRACE
(
"(%p)->(IID_IAuthenticate, %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IAuthenticate_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IInternetBindInfo
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetBindInfo, %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IInternetBindInfo_iface
;
}
if
(
*
ppv
)
{
...
...
@@ -497,6 +501,63 @@ static const IAuthenticateVtbl BSCAuthenticateVtbl = {
BSCAuthenticate_Authenticate
};
static
inline
BindStatusCallback
*
impl_from_IInternetBindInfo
(
IInternetBindInfo
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
BindStatusCallback
,
IInternetBindInfo_iface
);
}
static
HRESULT
WINAPI
BSCInternetBindInfo_QueryInterface
(
IInternetBindInfo
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
BindStatusCallback
*
This
=
impl_from_IInternetBindInfo
(
iface
);
return
IBindStatusCallbackEx_QueryInterface
(
&
This
->
IBindStatusCallbackEx_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
BSCInternetBindInfo_AddRef
(
IInternetBindInfo
*
iface
)
{
BindStatusCallback
*
This
=
impl_from_IInternetBindInfo
(
iface
);
return
IBindStatusCallbackEx_AddRef
(
&
This
->
IBindStatusCallbackEx_iface
);
}
static
ULONG
WINAPI
BSCInternetBindInfo_Release
(
IInternetBindInfo
*
iface
)
{
BindStatusCallback
*
This
=
impl_from_IInternetBindInfo
(
iface
);
return
IBindStatusCallbackEx_Release
(
&
This
->
IBindStatusCallbackEx_iface
);
}
static
HRESULT
WINAPI
BSCInternetBindInfo_GetBindInfo
(
IInternetBindInfo
*
iface
,
DWORD
*
bindf
,
BINDINFO
*
bindinfo
)
{
BindStatusCallback
*
This
=
impl_from_IInternetBindInfo
(
iface
);
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
bindf
,
bindinfo
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BSCInternetBindInfo_GetBindString
(
IInternetBindInfo
*
iface
,
ULONG
string_type
,
WCHAR
**
strs
,
ULONG
cnt
,
ULONG
*
fetched
)
{
BindStatusCallback
*
This
=
impl_from_IInternetBindInfo
(
iface
);
IInternetBindInfo
*
bind_info
;
HRESULT
hres
;
TRACE
(
"(%p)->(%d %p %d %p)
\n
"
,
This
,
string_type
,
strs
,
cnt
,
fetched
);
hres
=
IBindStatusCallback_QueryInterface
(
This
->
callback
,
&
IID_IInternetBindInfo
,
(
void
**
)
&
bind_info
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IInternetBindInfo_GetBindString
(
bind_info
,
string_type
,
strs
,
cnt
,
fetched
);
IInternetBindInfo_Release
(
bind_info
);
return
hres
;
}
static
IInternetBindInfoVtbl
BSCInternetBindInfoVtbl
=
{
BSCInternetBindInfo_QueryInterface
,
BSCInternetBindInfo_AddRef
,
BSCInternetBindInfo_Release
,
BSCInternetBindInfo_GetBindInfo
,
BSCInternetBindInfo_GetBindString
};
static
void
set_callback
(
BindStatusCallback
*
This
,
IBindStatusCallback
*
bsc
)
{
IServiceProvider
*
serv_prov
;
...
...
@@ -523,6 +584,7 @@ HRESULT wrap_callback(IBindStatusCallback *bsc, IBindStatusCallback **ret_iface)
return
E_OUTOFMEMORY
;
ret
->
IBindStatusCallbackEx_iface
.
lpVtbl
=
&
BindStatusCallbackExVtbl
;
ret
->
IInternetBindInfo_iface
.
lpVtbl
=
&
BSCInternetBindInfoVtbl
;
ret
->
IServiceProvider_iface
.
lpVtbl
=
&
BSCServiceProviderVtbl
;
ret
->
IHttpNegotiate2_iface
.
lpVtbl
=
&
BSCHttpNegotiateVtbl
;
ret
->
IAuthenticate_iface
.
lpVtbl
=
&
BSCAuthenticateVtbl
;
...
...
dlls/urlmon/tests/url.c
View file @
168e915c
...
...
@@ -2564,6 +2564,7 @@ static BOOL test_bscholder(IBindStatusCallback *holder)
IHttpNegotiate
*
http_negotiate
,
*
http_negotiate_serv
;
IHttpNegotiate2
*
http_negotiate2
,
*
http_negotiate2_serv
;
IAuthenticate
*
authenticate
,
*
authenticate_serv
;
IInternetBindInfo
*
bind_info
;
IInternetProtocol
*
protocol
;
BINDINFO
bindinfo
=
{
sizeof
(
bindinfo
)};
BOOL
ret
=
TRUE
;
...
...
@@ -2678,6 +2679,16 @@ static BOOL test_bscholder(IBindStatusCallback *holder)
IAuthenticate_Release
(
authenticate
);
IAuthenticate_Release
(
authenticate_serv
);
hres
=
IBindStatusCallback_QueryInterface
(
holder
,
&
IID_IInternetBindInfo
,
(
void
**
)
&
bind_info
);
ok
(
hres
==
S_OK
||
broken
(
hres
==
E_NOINTERFACE
/* win2k */
),
"Could not get IInternetBindInfo interface: %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IInternetBindInfo_GetBindString
(
bind_info
,
BINDSTRING_USER_AGENT
,
&
wstr
,
1
,
&
dw
);
ok
(
hres
==
E_NOINTERFACE
,
"GetBindString(BINDSTRING_USER_AGENT) failed: %08x
\n
"
,
hres
);
IInternetBindInfo_Release
(
bind_info
);
}
SET_EXPECT
(
OnStopBinding
);
hres
=
IBindStatusCallback_OnStopBinding
(
holder
,
S_OK
,
NULL
);
ok
(
hres
==
S_OK
,
"OnStopBinding failed: %08x
\n
"
,
hres
);
...
...
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