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
d8287b55
Commit
d8287b55
authored
Jan 10, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole2disp: Implement SafeArrayAllocDescriptor().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1053b4d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
1 deletion
+52
-1
ole2disp.c
dlls/ole2disp.dll16/ole2disp.c
+51
-0
ole2disp.dll16.spec
dlls/ole2disp.dll16/ole2disp.dll16.spec
+1
-1
No files found.
dlls/ole2disp.dll16/ole2disp.c
View file @
d8287b55
...
...
@@ -30,6 +30,7 @@
#include "ole2.h"
#include "oleauto.h"
#include "winerror.h"
#include "wownt32.h"
#include "wine/windef16.h"
#include "wine/winbase16.h"
...
...
@@ -39,6 +40,56 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
#define E_OUTOFMEMORY16 MAKE_SCODE(SEVERITY_ERROR, FACILITY_NULL, 2)
#define E_INVALIDARG16 MAKE_SCODE(SEVERITY_ERROR, FACILITY_NULL, 3)
/* 16-bit SAFEARRAY implementation */
typedef
struct
tagSAFEARRAYBOUND16
{
ULONG
cElements
;
LONG
lLbound
;
}
SAFEARRAYBOUND16
;
typedef
struct
tagSAFEARRAY16
{
USHORT
cDims
;
USHORT
fFeatures
;
USHORT
cbElements
;
USHORT
cLocks
;
ULONG
handle
;
SEGPTR
pvData
;
SAFEARRAYBOUND16
rgsabound
[
1
];
}
SAFEARRAY16
;
static
SEGPTR
safearray_alloc
(
ULONG
size
)
{
HANDLE16
h
;
return
WOWGlobalAllocLock16
(
GPTR
,
size
,
&
h
);
}
/******************************************************************************
* SafeArrayAllocDescriptor [OLE2DISP.38]
*/
HRESULT
WINAPI
SafeArrayAllocDescriptor16
(
UINT16
dims
,
SEGPTR
*
ret
)
{
SAFEARRAY16
*
sa
;
ULONG
size
;
TRACE
(
"%u, %p
\n
"
,
dims
,
ret
);
if
(
!
dims
)
return
E_INVALIDARG16
;
size
=
sizeof
(
SAFEARRAY16
)
+
sizeof
(
SAFEARRAYBOUND16
)
*
(
dims
-
1
);
*
ret
=
safearray_alloc
(
size
);
if
(
!*
ret
)
return
E_OUTOFMEMORY16
;
sa
=
MapSL
(
*
ret
);
sa
->
cDims
=
dims
;
return
S_OK
;
}
/* This implementation of the BSTR API is 16-bit only. It
represents BSTR as a 16:16 far pointer, and the strings
as ISO-8859 */
...
...
dlls/ole2disp.dll16/ole2disp.dll16.spec
View file @
d8287b55
...
...
@@ -35,7 +35,7 @@
35 pascal RegisterActiveObject(ptr ptr long ptr) RegisterActiveObject16
36 stub REVOKEACTIVEOBJECT
37 stub GETACTIVEOBJECT
38
stub SAFEARRAYALLOCDESCRIPTOR
38
pascal SafeArrayAllocDescriptor(word ptr) SafeArrayAllocDescriptor16
39 stub SAFEARRAYALLOCDATA
40 stub SAFEARRAYDESTROYDESCRIPTOR
41 stub SAFEARRAYDESTROYDATA
...
...
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