Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
8d0f45f7
Commit
8d0f45f7
authored
19 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added CreateAsyncBindCtxEx implementation.
parent
a5082b25
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/urlmon/tests/Makefile.in
+1
-1
1 addition, 1 deletion
dlls/urlmon/tests/Makefile.in
dlls/urlmon/tests/url.c
+63
-3
63 additions, 3 deletions
dlls/urlmon/tests/url.c
dlls/urlmon/umon.c
+28
-24
28 additions, 24 deletions
dlls/urlmon/umon.c
with
92 additions
and
28 deletions
dlls/urlmon/tests/Makefile.in
+
1
−
1
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
=
\
...
...
This diff is collapsed.
Click to expand it.
dlls/urlmon/tests/url.c
+
63
−
3
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
();
}
This diff is collapsed.
Click to expand it.
dlls/urlmon/umon.c
+
28
−
24
View file @
8d0f45f7
...
...
@@ -1178,17 +1178,39 @@ 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
,
pbind
);
TRACE
(
"(
%p
%08lx %p %p %p
%ld
)
\n
"
,
ibind
,
options
,
callback
,
format
,
pbind
,
reserved
);
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
);
}
/***********************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment