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
f7371871
Commit
f7371871
authored
Feb 22, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Correctly handle creating object failure.
parent
2d7b1f18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
23 deletions
+34
-23
binding.c
dlls/urlmon/binding.c
+34
-23
No files found.
dlls/urlmon/binding.c
View file @
f7371871
...
...
@@ -420,31 +420,17 @@ static void load_doc_mon(Binding *binding, IPersistMoniker *persist)
FIXME
(
"Load failed: %08x
\n
"
,
hres
);
}
static
void
create_object
(
Binding
*
binding
)
static
HRESULT
create_mime_object
(
Binding
*
binding
,
const
CLSID
*
clsid
,
LPCWSTR
clsid_str
)
{
IPersistMoniker
*
persist
;
LPWSTR
clsid_str
;
CLSID
clsid
;
HRESULT
hres
;
if
(
!
binding
->
mime
)
{
FIXME
(
"MIME unavailable
\n
"
);
return
;
}
if
(
!
(
clsid_str
=
get_mime_clsid
(
binding
->
mime
,
&
clsid
)))
{
FIXME
(
"Could not find object for MIME %s
\n
"
,
debugstr_w
(
binding
->
mime
));
return
;
}
IBindStatusCallback_OnProgress
(
binding
->
callback
,
0
,
0
,
BINDSTATUS_CLASSIDAVAILABLE
,
clsid_str
);
IBindStatusCallback_OnProgress
(
binding
->
callback
,
0
,
0
,
BINDSTATUS_BEGINSYNCOPERATION
,
NULL
);
hres
=
CoCreateInstance
(
&
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
hres
=
CoCreateInstance
(
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
binding
->
iid
,
(
void
**
)
&
binding
->
obj
);
if
(
FAILED
(
hres
))
FIXME
(
"CoCreateInstance failed: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
{
WARN
(
"CoCreateInstance failed: %08x
\n
"
,
hres
);
return
INET_E_CANNOT_INSTANTIATE_OBJECT
;
}
binding
->
state
|=
BINDING_OBJAVAIL
;
...
...
@@ -467,13 +453,38 @@ static void create_object(Binding *binding)
/* FIXME: Try query IPersistFile */
}
heap_free
(
clsid_str
);
IBindStatusCallback_OnObjectAvailable
(
binding
->
callback
,
&
binding
->
iid
,
binding
->
obj
);
return
S_OK
;
}
static
void
create_object
(
Binding
*
binding
)
{
LPWSTR
clsid_str
;
CLSID
clsid
;
HRESULT
hres
;
if
(
!
binding
->
mime
)
{
FIXME
(
"MIME not available
\n
"
);
return
;
}
if
(
!
(
clsid_str
=
get_mime_clsid
(
binding
->
mime
,
&
clsid
)))
{
FIXME
(
"Could not find object for MIME %s
\n
"
,
debugstr_w
(
binding
->
mime
));
return
;
}
IBindStatusCallback_OnProgress
(
binding
->
callback
,
0
,
0
,
BINDSTATUS_CLASSIDAVAILABLE
,
clsid_str
);
IBindStatusCallback_OnProgress
(
binding
->
callback
,
0
,
0
,
BINDSTATUS_BEGINSYNCOPERATION
,
NULL
);
hres
=
create_mime_object
(
binding
,
&
clsid
,
clsid_str
);
heap_free
(
clsid_str
);
IBindStatusCallback_OnProgress
(
binding
->
callback
,
0
,
0
,
BINDSTATUS_ENDSYNCOPERATION
,
NULL
);
stop_binding
(
binding
,
S_OK
,
NULL
);
stop_binding
(
binding
,
hres
,
NULL
);
if
(
FAILED
(
hres
))
IInternetProtocol_Terminate
(
binding
->
protocol
,
0
);
}
#define STGMEDUNK_THIS(iface) DEFINE_THIS(stgmed_buf_t, Unknown, iface)
...
...
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