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
0d4c693a
Commit
0d4c693a
authored
Apr 07, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add OleDoAutoConvert implementation.
parent
2db5418e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
2 deletions
+53
-2
ole2.c
dlls/ole32/ole2.c
+53
-2
ole2.c
dlls/ole32/tests/ole2.c
+0
-0
No files found.
dlls/ole32/ole2.c
View file @
0d4c693a
...
...
@@ -2718,8 +2718,59 @@ done:
*/
HRESULT
WINAPI
OleDoAutoConvert
(
LPSTORAGE
pStg
,
LPCLSID
pClsidNew
)
{
FIXME
(
"(%p,%p) : stub
\n
"
,
pStg
,
pClsidNew
);
return
E_NOTIMPL
;
WCHAR
*
user_type_old
,
*
user_type_new
;
CLIPFORMAT
cf
;
STATSTG
stat
;
CLSID
clsid
;
HRESULT
hr
;
TRACE
(
"(%p, %p)
\n
"
,
pStg
,
pClsidNew
);
*
pClsidNew
=
CLSID_NULL
;
if
(
!
pStg
)
return
E_INVALIDARG
;
hr
=
IStorage_Stat
(
pStg
,
&
stat
,
STATFLAG_NONAME
);
if
(
FAILED
(
hr
))
return
hr
;
*
pClsidNew
=
stat
.
clsid
;
hr
=
OleGetAutoConvert
(
&
stat
.
clsid
,
&
clsid
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IStorage_SetClass
(
pStg
,
&
clsid
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
ReadFmtUserTypeStg
(
pStg
,
&
cf
,
&
user_type_old
);
if
(
FAILED
(
hr
))
{
cf
=
0
;
user_type_new
=
NULL
;
}
hr
=
OleRegGetUserType
(
&
clsid
,
USERCLASSTYPE_FULL
,
&
user_type_new
);
if
(
FAILED
(
hr
))
user_type_new
=
NULL
;
hr
=
WriteFmtUserTypeStg
(
pStg
,
cf
,
user_type_new
);
CoTaskMemFree
(
user_type_new
);
if
(
FAILED
(
hr
))
{
CoTaskMemFree
(
user_type_old
);
IStorage_SetClass
(
pStg
,
&
stat
.
clsid
);
return
hr
;
}
hr
=
SetConvertStg
(
pStg
,
TRUE
);
if
(
FAILED
(
hr
))
{
WriteFmtUserTypeStg
(
pStg
,
cf
,
user_type_old
);
IStorage_SetClass
(
pStg
,
&
stat
.
clsid
);
}
else
*
pClsidNew
=
clsid
;
CoTaskMemFree
(
user_type_old
);
return
hr
;
}
/******************************************************************************
...
...
dlls/ole32/tests/ole2.c
View file @
0d4c693a
This diff is collapsed.
Click to expand it.
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