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
1053b4d4
Commit
1053b4d4
authored
Jan 10, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole2: Implement ReadClassStm().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
995fe926
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
6 deletions
+59
-6
ole2.c
dlls/ole2.dll16/ole2.c
+58
-5
ole2.dll16.spec
dlls/ole2.dll16/ole2.dll16.spec
+1
-1
No files found.
dlls/ole2.dll16/ole2.c
View file @
1053b4d4
...
...
@@ -274,6 +274,9 @@ HRESULT WINAPI OleFlushClipboard16(void)
return
OleFlushClipboard
();
}
#define GET_SEGPTR_METHOD_ADDR(ifacename,segptr,methodname) \
((SEGPTR)((const ifacename##Vtbl*)MapSL((SEGPTR)((ifacename*)MapSL(segptr))->lpVtbl))->methodname)
/***********************************************************************
* ReadClassStg (OLE2.18)
*
...
...
@@ -308,17 +311,15 @@ HRESULT WINAPI ReadClassStg16(SEGPTR pstg, CLSID *pclsid)
/*
* read a STATSTG structure (contains the clsid) from the storage
*/
args
[
0
]
=
(
DWORD
)
pstg
;
/* iface */
args
[
0
]
=
pstg
;
/* iface */
args
[
1
]
=
WOWGlobalAllocLock16
(
0
,
sizeof
(
STATSTG16
),
&
hstatstg
);
args
[
2
]
=
STATFLAG_DEFAULT
;
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
IStorage16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPSTORAGE16
)
MapSL
(
pstg
))
->
lpVtbl
)
)
->
Stat
,
GET_SEGPTR_METHOD_ADDR
(
IStorage16
,
pstg
,
Stat
),
WCB16_PASCAL
,
3
*
sizeof
(
DWORD
),
(
LPVOID
)
args
,
args
,
(
LPDWORD
)
&
hres
))
{
WOWGlobalUnlockFree16
(
args
[
1
]);
...
...
@@ -336,6 +337,58 @@ HRESULT WINAPI ReadClassStg16(SEGPTR pstg, CLSID *pclsid)
}
/***********************************************************************
* ReadClassStm (OLE2.20)
*/
HRESULT
WINAPI
ReadClassStm16
(
SEGPTR
stream
,
CLSID
*
clsid
)
{
HANDLE16
hclsid
,
hread
;
HRESULT
hres
;
DWORD
args
[
4
];
TRACE
(
"(0x%x, %p)
\n
"
,
stream
,
clsid
);
if
(
!
clsid
)
return
E_INVALIDARG16
;
memset
(
clsid
,
0
,
sizeof
(
*
clsid
));
if
(
!
stream
)
return
E_INVALIDARG16
;
args
[
0
]
=
stream
;
/* iface */
args
[
1
]
=
WOWGlobalAllocLock16
(
0
,
sizeof
(
CLSID
),
&
hclsid
);
args
[
2
]
=
sizeof
(
CLSID
);
args
[
3
]
=
WOWGlobalAllocLock16
(
0
,
sizeof
(
ULONG
),
&
hread
);
if
(
WOWCallback16Ex
(
GET_SEGPTR_METHOD_ADDR
(
IStream16
,
stream
,
Read
),
WCB16_PASCAL
,
4
*
sizeof
(
DWORD
),
args
,
(
DWORD
*
)
&
hres
))
{
ULONG
readlen
;
memcpy
(
&
readlen
,
MapSL
(
args
[
3
]),
sizeof
(
readlen
));
if
(
readlen
==
sizeof
(
CLSID
))
memcpy
(
clsid
,
MapSL
(
args
[
1
]),
sizeof
(
CLSID
));
else
hres
=
STG_E_READFAULT
;
TRACE
(
"clsid is %s
\n
"
,
debugstr_guid
(
clsid
));
}
else
{
ERR
(
"CallTo16 IStream16::Read() failed, hres %x
\n
"
,
hres
);
hres
=
E_FAIL
;
}
WOWGlobalUnlockFree16
(
args
[
1
]);
WOWGlobalUnlockFree16
(
args
[
3
]);
return
hres
;
}
/***********************************************************************
* GetConvertStg (OLE2.82)
*/
HRESULT
WINAPI
GetConvertStg16
(
LPSTORAGE
stg
)
...
...
dlls/ole2.dll16/ole2.dll16.spec
View file @
1053b4d4
...
...
@@ -17,7 +17,7 @@
17 stub OLELOCKRUNNING
18 pascal ReadClassStg(segptr ptr) ReadClassStg16
19 pascal WriteClassStg(segptr ptr) WriteClassStg16
20
stub READCLASSSTM
20
pascal ReadClassStm(segptr ptr) ReadClassStm16
21 stub WRITECLASSSTM
22 stub BINDMONIKER
23 stub MKPARSEDISPLAYNAME
...
...
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