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
96dbdcb8
Commit
96dbdcb8
authored
May 19, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
May 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Implicitly initialize COM in OleLoadPicturePath.
parent
61f7f776
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
25 deletions
+21
-25
olepicture.c
dlls/oleaut32/olepicture.c
+21
-22
olepicture.c
dlls/oleaut32/tests/olepicture.c
+0
-3
No files found.
dlls/oleaut32/olepicture.c
View file @
96dbdcb8
...
...
@@ -2273,6 +2273,7 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller,
BOOL
bRead
;
IPersistStream
*
pStream
;
HRESULT
hRes
;
HRESULT
init_res
;
WCHAR
*
file_candidate
;
WCHAR
path_buf
[
MAX_PATH
];
...
...
@@ -2349,34 +2350,32 @@ HRESULT WINAPI OleLoadPicturePath( LPOLESTR szURLorPath, LPUNKNOWN punkCaller,
return
hRes
;
}
hRes
=
CoCreateInstance
(
&
CLSID_StdPicture
,
punkCaller
,
CLSCTX_INPROC_SERVER
,
&
IID_IPicture
,
(
LPVOID
*
)
&
ipicture
);
if
(
hRes
!=
S_OK
)
{
IStream_Release
(
stream
);
return
hRes
;
}
hRes
=
IPicture_QueryInterface
(
ipicture
,
&
IID_IPersistStream
,
(
LPVOID
*
)
&
pStream
);
if
(
hRes
)
{
IStream_Release
(
stream
);
init_res
=
CoInitialize
(
NULL
);
hRes
=
CoCreateInstance
(
&
CLSID_StdPicture
,
punkCaller
,
CLSCTX_INPROC_SERVER
,
&
IID_IPicture
,
(
LPVOID
*
)
&
ipicture
);
if
(
SUCCEEDED
(
hRes
))
{
hRes
=
IPicture_QueryInterface
(
ipicture
,
&
IID_IPersistStream
,
(
LPVOID
*
)
&
pStream
);
if
(
SUCCEEDED
(
hRes
))
{
hRes
=
IPersistStream_Load
(
pStream
,
stream
);
if
(
SUCCEEDED
(
hRes
))
{
hRes
=
IPicture_QueryInterface
(
ipicture
,
riid
,
ppvRet
);
if
(
FAILED
(
hRes
))
ERR
(
"Failed to get interface %s from IPicture.
\n
"
,
debugstr_guid
(
riid
));
}
IPersistStream_Release
(
pStream
);
}
IPicture_Release
(
ipicture
);
return
hRes
;
}
hRes
=
IPersistStream_Load
(
pStream
,
stream
);
IPersistStream_Release
(
pStream
);
IStream_Release
(
stream
);
if
(
hRes
)
{
IPicture_Release
(
ipicture
);
return
hRes
;
}
if
(
SUCCEEDED
(
init_res
))
CoUninitialize
();
hRes
=
IPicture_QueryInterface
(
ipicture
,
riid
,
ppvRet
);
if
(
hRes
)
ERR
(
"Failed to get interface %s from IPicture.
\n
"
,
debugstr_guid
(
riid
));
IPicture_Release
(
ipicture
);
return
hRes
;
}
...
...
dlls/oleaut32/tests/olepicture.c
View file @
96dbdcb8
...
...
@@ -813,7 +813,6 @@ static void test_OleLoadPicturePath(void)
/* Try a normal DOS path. */
hres
=
OleLoadPicturePath
(
temp_fileW
+
8
,
NULL
,
0
,
0
,
&
IID_IPicture
,
(
void
**
)
&
pic
);
todo_wine
ok
(
hres
==
S_OK
||
broken
(
hres
==
E_UNEXPECTED
),
/* NT4/Win95 */
"Expected OleLoadPicturePath to return S_OK, got 0x%08x
\n
"
,
hres
);
...
...
@@ -822,7 +821,6 @@ static void test_OleLoadPicturePath(void)
/* Try a DOS path with tacked on "file:". */
hres
=
OleLoadPicturePath
(
temp_fileW
,
NULL
,
0
,
0
,
&
IID_IPicture
,
(
void
**
)
&
pic
);
todo_wine
ok
(
hres
==
S_OK
||
broken
(
hres
==
E_UNEXPECTED
),
/* NT4/Win95 */
"Expected OleLoadPicturePath to return S_OK, got 0x%08x
\n
"
,
hres
);
...
...
@@ -859,7 +857,6 @@ static void test_OleLoadPicturePath(void)
}
hres
=
OleLoadPicturePath
(
temp_fileW
,
NULL
,
0
,
0
,
&
IID_IPicture
,
(
void
**
)
&
pic
);
todo_wine
ok
(
hres
==
S_OK
||
broken
(
hres
==
E_UNEXPECTED
),
/* NT4/Win95 */
"Expected OleLoadPicturePath to return S_OK, got 0x%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