Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
beceaa82
Commit
beceaa82
authored
Jan 12, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 12, 2016
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole2disp: Implement SafeArrayAllocData().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1529f082
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
ole2disp.c
dlls/ole2disp.dll16/ole2disp.c
+34
-0
ole2disp.dll16.spec
dlls/ole2disp.dll16/ole2disp.dll16.spec
+1
-1
No files found.
dlls/ole2disp.dll16/ole2disp.c
View file @
beceaa82
...
...
@@ -72,6 +72,23 @@ static void safearray_free(SEGPTR ptr)
WOWGlobalUnlockFree16
(
ptr
);
}
static
ULONG
safearray_getcellcount
(
const
SAFEARRAY16
*
sa
)
{
const
SAFEARRAYBOUND16
*
sab
=
sa
->
rgsabound
;
USHORT
count
=
sa
->
cDims
;
ULONG
cells
=
1
;
while
(
count
--
)
{
if
(
!
sab
->
cElements
)
return
0
;
cells
*=
sab
->
cElements
;
sab
++
;
}
return
cells
;
}
/******************************************************************************
* SafeArrayAllocDescriptor [OLE2DISP.38]
*/
...
...
@@ -96,6 +113,23 @@ HRESULT WINAPI SafeArrayAllocDescriptor16(UINT16 dims, SEGPTR *ret)
}
/******************************************************************************
* SafeArrayAllocData [OLE2DISP.39]
*/
HRESULT
WINAPI
SafeArrayAllocData16
(
SAFEARRAY16
*
sa
)
{
ULONG
size
;
TRACE
(
"%p
\n
"
,
sa
);
if
(
!
sa
)
return
E_INVALIDARG16
;
size
=
safearray_getcellcount
(
sa
);
sa
->
pvData
=
safearray_alloc
(
size
*
sa
->
cbElements
);
return
sa
->
pvData
?
S_OK
:
E_OUTOFMEMORY16
;
}
/******************************************************************************
* SafeArrayDestroyDescriptor [OLE2DISP.40]
*/
HRESULT
WINAPI
SafeArrayDestroyDescriptor16
(
SEGPTR
s
)
...
...
dlls/ole2disp.dll16/ole2disp.dll16.spec
View file @
beceaa82
...
...
@@ -36,7 +36,7 @@
36 stub REVOKEACTIVEOBJECT
37 stub GETACTIVEOBJECT
38 pascal SafeArrayAllocDescriptor(word ptr) SafeArrayAllocDescriptor16
39
stub SAFEARRAYALLOCDATA
39
pascal SafeArrayAllocData(ptr) SafeArrayAllocData16
40 pascal SafeArrayDestroyDescriptor(segptr) SafeArrayDestroyDescriptor16
41 stub SAFEARRAYDESTROYDATA
42 stub SAFEARRAYREDIM
...
...
Vitaly Lipatov
@lav
mentioned in commit
47d2d821
·
Sep 03, 2020
mentioned in commit
47d2d821
mentioned in commit 47d2d8213ef06f21e1a1edd5cdfe3ff9793bf0a7
Toggle commit list
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