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
cfbac8d2
Commit
cfbac8d2
authored
Jan 14, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole2disp: Implement SafeArrayAccessData()/SafeArrayUnaccessData().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
668e9754
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
7 deletions
+40
-7
ole2disp.c
dlls/ole2disp.dll16/ole2disp.c
+38
-5
ole2disp.dll16.spec
dlls/ole2disp.dll16/ole2disp.dll16.spec
+2
-2
No files found.
dlls/ole2disp.dll16/ole2disp.c
View file @
cfbac8d2
...
...
@@ -89,6 +89,15 @@ static ULONG safearray_getcellcount(const SAFEARRAY16 *sa)
return
cells
;
}
static
HRESULT
safearray_lock
(
SAFEARRAY16
*
sa
)
{
if
(
sa
->
cLocks
==
0xffff
)
return
E_UNEXPECTED
;
sa
->
cLocks
++
;
return
S_OK
;
}
/******************************************************************************
* SafeArrayGetDim [OLE2DISP.17]
*/
...
...
@@ -117,11 +126,7 @@ HRESULT WINAPI SafeArrayLock16(SAFEARRAY16 *sa)
if
(
!
sa
)
return
E_INVALIDARG16
;
if
(
sa
->
cLocks
==
0xffff
)
return
E_UNEXPECTED
;
sa
->
cLocks
++
;
return
S_OK
;
return
safearray_lock
(
sa
);
}
/******************************************************************************
...
...
@@ -142,6 +147,34 @@ HRESULT WINAPI SafeArrayUnlock16(SAFEARRAY16 *sa)
}
/******************************************************************************
* SafeArrayAccessData [OLE2DISP.23]
*/
HRESULT
WINAPI
SafeArrayAccessData16
(
SAFEARRAY16
*
sa
,
SEGPTR
*
data
)
{
HRESULT
hr
;
TRACE
(
"(%p, %p)
\n
"
,
sa
,
data
);
/* arguments are not tested, it crashes if any of them is NULL */
hr
=
safearray_lock
(
sa
);
if
(
FAILED
(
hr
))
return
hr
;
*
data
=
sa
->
pvData
;
return
S_OK
;
}
/******************************************************************************
* SafeArrayUnaccessData [OLE2DISP.24]
*/
HRESULT
WINAPI
SafeArrayUnaccessData16
(
SAFEARRAY16
*
sa
)
{
TRACE
(
"(%p)
\n
"
,
sa
);
return
SafeArrayUnlock16
(
sa
);
}
/******************************************************************************
* SafeArrayAllocDescriptor [OLE2DISP.38]
*/
HRESULT
WINAPI
SafeArrayAllocDescriptor16
(
UINT16
dims
,
SEGPTR
*
ret
)
...
...
dlls/ole2disp.dll16/ole2disp.dll16.spec
View file @
cfbac8d2
...
...
@@ -20,8 +20,8 @@
20 stub SAFEARRAYGETLBOUND
21 pascal SafeArrayLock(ptr) SafeArrayLock16
22 pascal SafeArrayUnlock(ptr) SafeArrayUnlock16
23
stub SAFEARRAYACCESSDATA
24
stub SAFEARRAYUNACCESSDATA
23
pascal SafeArrayAccessData(ptr ptr) SafeArrayAccessData16
24
pascal SafeArrayUnaccessData(ptr) SafeArrayUnaccessData16
25 stub SAFEARRAYGETELEMENT
26 stub SAFEARRAYPUTELEMENT
27 stub SAFEARRAYCOPY
...
...
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