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
b285d562
Commit
b285d562
authored
Oct 01, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Wrap callback in RegisterBindStatusCallback.
parent
f185e049
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
87 deletions
+8
-87
bindctx.c
dlls/urlmon/bindctx.c
+0
-0
url.c
dlls/urlmon/tests/url.c
+7
-7
umon.c
dlls/urlmon/umon.c
+1
-80
No files found.
dlls/urlmon/bindctx.c
View file @
b285d562
This diff is collapsed.
Click to expand it.
dlls/urlmon/tests/url.c
View file @
b285d562
...
@@ -714,7 +714,7 @@ static void test_CreateAsyncBindCtx(void)
...
@@ -714,7 +714,7 @@ static void test_CreateAsyncBindCtx(void)
SET_EXPECT
(
QueryInterface_IServiceProvider
);
SET_EXPECT
(
QueryInterface_IServiceProvider
);
hres
=
CreateAsyncBindCtx
(
0
,
&
bsc
,
NULL
,
&
bctx
);
hres
=
CreateAsyncBindCtx
(
0
,
&
bsc
,
NULL
,
&
bctx
);
ok
(
SUCCEEDED
(
hres
),
"CreateAsyncBindCtx failed: %08x
\n
"
,
hres
);
ok
(
SUCCEEDED
(
hres
),
"CreateAsyncBindCtx failed: %08x
\n
"
,
hres
);
todo_wine
CHECK_CALLED
(
QueryInterface_IServiceProvider
);
CHECK_CALLED
(
QueryInterface_IServiceProvider
);
bindopts
.
cbStruct
=
sizeof
(
bindopts
);
bindopts
.
cbStruct
=
sizeof
(
bindopts
);
hres
=
IBindCtx_GetBindOptions
(
bctx
,
&
bindopts
);
hres
=
IBindCtx_GetBindOptions
(
bctx
,
&
bindopts
);
...
@@ -788,7 +788,7 @@ static void test_CreateAsyncBindCtxEx(void)
...
@@ -788,7 +788,7 @@ static void test_CreateAsyncBindCtxEx(void)
SET_EXPECT
(
QueryInterface_IServiceProvider
);
SET_EXPECT
(
QueryInterface_IServiceProvider
);
hres
=
CreateAsyncBindCtxEx
(
NULL
,
0
,
&
bsc
,
NULL
,
&
bctx
,
0
);
hres
=
CreateAsyncBindCtxEx
(
NULL
,
0
,
&
bsc
,
NULL
,
&
bctx
,
0
);
ok
(
hres
==
S_OK
,
"CreateAsyncBindCtxEx failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"CreateAsyncBindCtxEx failed: %08x
\n
"
,
hres
);
todo_wine
CHECK_CALLED
(
QueryInterface_IServiceProvider
);
CHECK_CALLED
(
QueryInterface_IServiceProvider
);
hres
=
IBindCtx_QueryInterface
(
bctx
,
&
IID_IAsyncBindCtx
,
(
void
**
)
&
unk
);
hres
=
IBindCtx_QueryInterface
(
bctx
,
&
IID_IAsyncBindCtx
,
(
void
**
)
&
unk
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IAsyncBindCtx) failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IAsyncBindCtx) failed: %08x
\n
"
,
hres
);
...
@@ -819,16 +819,16 @@ static void test_BindToStorage(int protocol, BOOL emul)
...
@@ -819,16 +819,16 @@ static void test_BindToStorage(int protocol, BOOL emul)
SET_EXPECT
(
QueryInterface_IServiceProvider
);
SET_EXPECT
(
QueryInterface_IServiceProvider
);
hres
=
CreateAsyncBindCtx
(
0
,
&
bsc
,
NULL
,
&
bctx
);
hres
=
CreateAsyncBindCtx
(
0
,
&
bsc
,
NULL
,
&
bctx
);
ok
(
SUCCEEDED
(
hres
),
"CreateAsyncBindCtx failed: %08x
\n\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"CreateAsyncBindCtx failed: %08x
\n\n
"
,
hres
);
CHECK_CALLED
(
QueryInterface_IServiceProvider
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
;
return
;
todo_wine
CHECK_CALLED
(
QueryInterface_IServiceProvider
);
SET_EXPECT
(
QueryInterface_IServiceProvider
);
SET_EXPECT
(
QueryInterface_IServiceProvider
);
hres
=
RegisterBindStatusCallback
(
bctx
,
&
bsc
,
&
previousclb
,
0
);
hres
=
RegisterBindStatusCallback
(
bctx
,
&
bsc
,
&
previousclb
,
0
);
ok
(
SUCCEEDED
(
hres
)
,
"RegisterBindStatusCallback failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"RegisterBindStatusCallback failed: %08x
\n
"
,
hres
);
ok
(
previousclb
==
&
bsc
,
"previousclb(%p) != sclb(%p)
\n
"
,
previousclb
,
&
bsc
);
ok
(
previousclb
==
&
bsc
,
"previousclb(%p) != sclb(%p)
\n
"
,
previousclb
,
&
bsc
);
todo_wine
CHECK_CALLED
(
QueryInterface_IServiceProvider
);
CHECK_CALLED
(
QueryInterface_IServiceProvider
);
if
(
previousclb
)
if
(
previousclb
)
IBindStatusCallback_Release
(
previousclb
);
IBindStatusCallback_Release
(
previousclb
);
...
@@ -903,7 +903,7 @@ static void test_BindToStorage(int protocol, BOOL emul)
...
@@ -903,7 +903,7 @@ static void test_BindToStorage(int protocol, BOOL emul)
DispatchMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
}
todo_wine
CHECK_NOT_CALLED
(
QueryInterface_IServiceProvider
);
CHECK_NOT_CALLED
(
QueryInterface_IServiceProvider
);
CHECK_CALLED
(
GetBindInfo
);
CHECK_CALLED
(
GetBindInfo
);
CHECK_CALLED
(
OnStartBinding
);
CHECK_CALLED
(
OnStartBinding
);
if
(
emulate_protocol
)
{
if
(
emulate_protocol
)
{
...
...
dlls/urlmon/umon.c
View file @
b285d562
...
@@ -738,7 +738,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface,
...
@@ -738,7 +738,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface,
sizeof
(
schema
)
/
sizeof
(
WCHAR
),
0
,
NULL
,
0
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
};
sizeof
(
schema
)
/
sizeof
(
WCHAR
),
0
,
NULL
,
0
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
};
if
(
pmkToLeft
)
if
(
pmkToLeft
)
FIXME
(
"Unsupported pmkToLeft
\n
"
);
FIXME
(
"Unsupported pmkToLeft
\n
"
);
bret
=
InternetCrackUrlW
(
This
->
URLName
,
0
,
ICU_ESCAPE
,
&
url
);
bret
=
InternetCrackUrlW
(
This
->
URLName
,
0
,
ICU_ESCAPE
,
&
url
);
if
(
!
bret
)
{
if
(
!
bret
)
{
...
@@ -1209,85 +1209,6 @@ HRESULT WINAPI BindAsyncMoniker(IMoniker *pmk, DWORD grfOpt, IBindStatusCallback
...
@@ -1209,85 +1209,6 @@ HRESULT WINAPI BindAsyncMoniker(IMoniker *pmk, DWORD grfOpt, IBindStatusCallback
}
}
/***********************************************************************
/***********************************************************************
* RegisterBindStatusCallback (URLMON.@)
*
* Register a bind status callback.
*
* PARAMS
* pbc [I] Binding context
* pbsc [I] Callback to register
* ppbscPrevious [O] Destination for previous callback
* dwReserved [I] Reserved, must be 0.
*
* RETURNS
* Success: S_OK.
* Failure: E_INVALIDARG, if any argument is invalid, or
* E_OUTOFMEMORY if memory allocation fails.
*/
HRESULT
WINAPI
RegisterBindStatusCallback
(
IBindCtx
*
pbc
,
IBindStatusCallback
*
pbsc
,
IBindStatusCallback
**
ppbscPrevious
,
DWORD
dwReserved
)
{
IBindStatusCallback
*
prev
;
TRACE
(
"(%p,%p,%p,%u)
\n
"
,
pbc
,
pbsc
,
ppbscPrevious
,
dwReserved
);
if
(
pbc
==
NULL
||
pbsc
==
NULL
)
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
IBindCtx_GetObjectParam
(
pbc
,
BSCBHolder
,
(
IUnknown
**
)
&
prev
)))
{
IBindCtx_RevokeObjectParam
(
pbc
,
BSCBHolder
);
if
(
ppbscPrevious
)
*
ppbscPrevious
=
prev
;
else
IBindStatusCallback_Release
(
prev
);
}
return
IBindCtx_RegisterObjectParam
(
pbc
,
BSCBHolder
,
(
IUnknown
*
)
pbsc
);
}
/***********************************************************************
* RevokeBindStatusCallback (URLMON.@)
*
* Unregister a bind status callback.
*
* pbc [I] Binding context
* pbsc [I] Callback to unregister
*
* RETURNS
* Success: S_OK.
* Failure: E_INVALIDARG, if any argument is invalid, or
* E_FAIL if pbsc wasn't registered with pbc.
*/
HRESULT
WINAPI
RevokeBindStatusCallback
(
IBindCtx
*
pbc
,
IBindStatusCallback
*
pbsc
)
{
IBindStatusCallback
*
callback
;
HRESULT
hr
=
E_FAIL
;
TRACE
(
"(%p,%p)
\n
"
,
pbc
,
pbsc
);
if
(
pbc
==
NULL
||
pbsc
==
NULL
)
return
E_INVALIDARG
;
if
(
SUCCEEDED
(
IBindCtx_GetObjectParam
(
pbc
,
BSCBHolder
,
(
IUnknown
**
)
&
callback
)))
{
if
(
callback
==
pbsc
)
{
IBindCtx_RevokeObjectParam
(
pbc
,
BSCBHolder
);
hr
=
S_OK
;
}
IBindStatusCallback_Release
(
pbsc
);
}
return
hr
;
}
/***********************************************************************
* URLDownloadToFileA (URLMON.@)
* URLDownloadToFileA (URLMON.@)
*
*
* Downloads URL szURL to rile szFileName and call lpfnCB callback to
* Downloads URL szURL to rile szFileName and call lpfnCB callback to
...
...
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