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
8d0f45f7
Commit
8d0f45f7
authored
Sep 03, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added CreateAsyncBindCtxEx implementation.
parent
a5082b25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
28 deletions
+92
-28
Makefile.in
dlls/urlmon/tests/Makefile.in
+1
-1
url.c
dlls/urlmon/tests/url.c
+63
-3
umon.c
dlls/urlmon/umon.c
+28
-24
No files found.
dlls/urlmon/tests/Makefile.in
View file @
8d0f45f7
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
urlmon.dll
IMPORTS
=
urlmon user32 kernel32
IMPORTS
=
urlmon user32 kernel32
ole32
EXTRALIBS
=
-luuid
CTESTS
=
\
...
...
dlls/urlmon/tests/url.c
View file @
8d0f45f7
...
...
@@ -218,13 +218,14 @@ static void test_CreateAsyncBindCtx(void)
return
;
}
bindopts
.
cbStruct
=
16
;
bindopts
.
cbStruct
=
sizeof
(
bindopts
)
;
hres
=
IBindCtx_GetBindOptions
(
bctx
,
&
bindopts
);
ok
(
SUCCEEDED
(
hres
),
"IBindCtx_GetBindOptions failed: %08lx
\n
"
,
hres
);
ok
(
bindopts
.
grfFlags
==
BIND_MAYBOTHERUSER
,
"bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER
\n
"
,
bindopts
.
grfFlags
);
ok
(
bindopts
.
grfMode
=
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
"bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE
\n
"
,
bindopts
.
grfMode
);
ok
(
bindopts
.
grfMode
==
(
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
),
"bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE
\n
"
,
bindopts
.
grfMode
);
ok
(
bindopts
.
dwTickCountDeadline
==
0
,
"bindopts.dwTickCountDeadline = %08lx, expected: 0
\n
"
,
bindopts
.
dwTickCountDeadline
);
...
...
@@ -234,6 +235,64 @@ static void test_CreateAsyncBindCtx(void)
ok
(
ref
==
0
,
"bsc should be destroyed here
\n
"
);
}
static
void
test_CreateAsyncBindCtxEx
(
void
)
{
IBindCtx
*
bctx
=
NULL
,
*
bctx_arg
=
NULL
;
IBindStatusCallback
*
bsc
=
statusclb_create
();
BIND_OPTS
bindopts
;
HRESULT
hres
;
hres
=
CreateAsyncBindCtxEx
(
NULL
,
0
,
NULL
,
NULL
,
NULL
,
0
);
ok
(
hres
==
E_INVALIDARG
,
"CreateAsyncBindCtx failed: %08lx, expected E_INVALIDARG
\n
"
,
hres
);
hres
=
CreateAsyncBindCtxEx
(
NULL
,
0
,
NULL
,
NULL
,
&
bctx
,
0
);
ok
(
hres
==
S_OK
,
"CreateAsyncBindCtxEx failed: %08lx
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
bindopts
.
cbStruct
=
sizeof
(
bindopts
);
hres
=
IBindCtx_GetBindOptions
(
bctx
,
&
bindopts
);
ok
(
SUCCEEDED
(
hres
),
"IBindCtx_GetBindOptions failed: %08lx
\n
"
,
hres
);
ok
(
bindopts
.
grfFlags
==
BIND_MAYBOTHERUSER
,
"bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER
\n
"
,
bindopts
.
grfFlags
);
ok
(
bindopts
.
grfMode
==
(
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
),
"bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE
\n
"
,
bindopts
.
grfMode
);
ok
(
bindopts
.
dwTickCountDeadline
==
0
,
"bindopts.dwTickCountDeadline = %08lx, expected: 0
\n
"
,
bindopts
.
dwTickCountDeadline
);
IBindCtx_Release
(
bctx
);
}
CreateBindCtx
(
0
,
&
bctx_arg
);
hres
=
CreateAsyncBindCtxEx
(
NULL
,
0
,
NULL
,
NULL
,
&
bctx
,
0
);
ok
(
hres
==
S_OK
,
"CreateAsyncBindCtxEx failed: %08lx
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
bindopts
.
cbStruct
=
sizeof
(
bindopts
);
hres
=
IBindCtx_GetBindOptions
(
bctx
,
&
bindopts
);
ok
(
SUCCEEDED
(
hres
),
"IBindCtx_GetBindOptions failed: %08lx
\n
"
,
hres
);
ok
(
bindopts
.
grfFlags
==
BIND_MAYBOTHERUSER
,
"bindopts.grfFlags = %08lx, expected: BIND_MAYBOTHERUSER
\n
"
,
bindopts
.
grfFlags
);
ok
(
bindopts
.
grfMode
==
(
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
),
"bindopts.grfMode = %08lx, expected: STGM_READWRITE | STGM_SHARE_EXCLUSIVE
\n
"
,
bindopts
.
grfMode
);
ok
(
bindopts
.
dwTickCountDeadline
==
0
,
"bindopts.dwTickCountDeadline = %08lx, expected: 0
\n
"
,
bindopts
.
dwTickCountDeadline
);
IBindCtx_Release
(
bctx
);
}
IBindCtx_Release
(
bctx_arg
);
hres
=
CreateAsyncBindCtxEx
(
NULL
,
0
,
bsc
,
NULL
,
&
bctx
,
0
);
ok
(
hres
==
S_OK
,
"CreateAsyncBindCtxEx failed: %08lx
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
IBindCtx_Release
(
bctx
);
IBindStatusCallback_Release
(
bsc
);
}
static
void
test_BindToStorage
(
void
)
{
IMoniker
*
mon
;
...
...
@@ -302,5 +361,6 @@ START_TEST(url)
{
test_create
();
test_CreateAsyncBindCtx
();
test_CreateAsyncBindCtxEx
();
test_BindToStorage
();
}
dlls/urlmon/umon.c
View file @
8d0f45f7
...
...
@@ -1179,16 +1179,38 @@ static HRESULT URLMonikerImpl_Construct(URLMonikerImpl* This, LPCOLESTR lpszLeft
HRESULT
WINAPI
CreateAsyncBindCtx
(
DWORD
reserved
,
IBindStatusCallback
*
callback
,
IEnumFORMATETC
*
format
,
IBindCtx
**
pbind
)
{
TRACE
(
"(%08lx %p %p %p)
\n
"
,
reserved
,
callback
,
format
,
pbind
);
if
(
!
callback
)
return
E_INVALIDARG
;
return
CreateAsyncBindCtxEx
(
NULL
,
0
,
callback
,
format
,
pbind
,
0
);
}
/***********************************************************************
* CreateAsyncBindCtxEx (URLMON.@)
*
* Create an asynchronous bind context.
*/
HRESULT
WINAPI
CreateAsyncBindCtxEx
(
IBindCtx
*
ibind
,
DWORD
options
,
IBindStatusCallback
*
callback
,
IEnumFORMATETC
*
format
,
IBindCtx
**
pbind
,
DWORD
reserved
)
{
HRESULT
hres
;
BIND_OPTS
bindopts
;
IBindCtx
*
bctx
;
TRACE
(
"(%
08lx %p %p %p)
\n
"
,
reserved
,
callback
,
format
,
pbin
d
);
TRACE
(
"(%
p %08lx %p %p %p %ld)
\n
"
,
ibind
,
options
,
callback
,
format
,
pbind
,
reserve
d
);
if
(
!
callback
)
if
(
!
pbind
)
return
E_INVALIDARG
;
if
(
options
)
FIXME
(
"not supported options %08lx"
,
options
);
if
(
format
)
FIXME
(
"format is not supported yet
\n
"
);
FIXME
(
"format is not supported
\n
"
);
if
(
reserved
)
WARN
(
"reserved=%ld
\n
"
,
reserved
);
hres
=
CreateBindCtx
(
0
,
&
bctx
);
if
(
FAILED
(
hres
))
...
...
@@ -1200,31 +1222,13 @@ HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback,
bindopts
.
dwTickCountDeadline
=
0
;
IBindCtx_SetBindOptions
(
bctx
,
&
bindopts
);
hres
=
IBindCtx_RegisterObjectParam
(
bctx
,
(
LPOLESTR
)
BSCBHolder
,
(
IUnknown
*
)
callback
);
if
(
FAILED
(
hres
))
{
IBindCtx_Release
(
bctx
);
return
hres
;
}
if
(
callback
)
RegisterBindStatusCallback
(
bctx
,
callback
,
NULL
,
0
);
*
pbind
=
bctx
;
return
S_OK
;
}
/***********************************************************************
* CreateAsyncBindCtxEx (URLMON.@)
*
* Create an asynchronous bind context.
*
* FIXME
* Not implemented.
*/
HRESULT
WINAPI
CreateAsyncBindCtxEx
(
IBindCtx
*
ibind
,
DWORD
options
,
IBindStatusCallback
*
callback
,
IEnumFORMATETC
*
format
,
IBindCtx
**
pbind
,
DWORD
reserved
)
{
FIXME
(
"stub, returns failure
\n
"
);
return
E_INVALIDARG
;
}
/***********************************************************************
...
...
@@ -1445,7 +1449,7 @@ HRESULT WINAPI RegisterBindStatusCallback(
IBindStatusCallback_Release
(
prev
);
}
return
IBindCtx_RegisterObjectParam
(
pbc
,
(
LPOLESTR
)
BSCBHolder
,
(
IUnknown
*
)
pbsc
);
return
IBindCtx_RegisterObjectParam
(
pbc
,
(
LPOLESTR
)
BSCBHolder
,
(
IUnknown
*
)
pbsc
);
}
/***********************************************************************
...
...
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