Commit 4fcd6d0f authored by Sylvain St.Germain's avatar Sylvain St.Germain Committed by Alexandre Julliard

Implementation of the SafeArray family functions.

parent c66f5d59
......@@ -26,6 +26,125 @@ int WINAPI SysStringLen32(BSTR32);
typedef void ITypeLib;
typedef ITypeLib * LPTYPELIB;
/*****************************************************************
* SafeArray defines and structs
*/
#define FADF_AUTO ( 0x1 )
#define FADF_STATIC ( 0x2 )
#define FADF_EMBEDDED ( 0x4 )
#define FADF_FIXEDSIZE ( 0x10 )
#define FADF_BSTR ( 0x100 )
#define FADF_UNKNOWN ( 0x200 )
#define FADF_DISPATCH ( 0x400 )
#define FADF_VARIANT ( 0x800 )
#define FADF_RESERVED ( 0xf0e8 )
typedef struct tagSAFEARRAYBOUND
{
ULONG cElements; /* Number of elements in dimension */
LONG lLbound; /* Lower bound of dimension */
} SAFEARRAYBOUND;
typedef struct tagSAFEARRAY
{
USHORT cDims; /* Count of array dimension */
USHORT fFeatures; /* Flags describing the array */
ULONG cbElements; /* Size of each element */
ULONG cLocks; /* Number of lock on array */
PVOID pvData; /* Pointer to data valid when cLocks > 0 */
SAFEARRAYBOUND rgsabound[ 1 ]; /* One bound for each dimension */
} SAFEARRAY;
/*****************************************************************
* SafeArray API
*/
HRESULT WINAPI
SafeArrayAllocDescriptor32(UINT32 cDims, SAFEARRAY **ppsaOut);
#define SafeArrayAllocDescriptor WINELIB_NAME(SafeArrayAllocDescriptor)
HRESULT WINAPI
SafeArrayAllocData32(SAFEARRAY *psa);
#define SafeArrayAllocData WINELIB_NAME(SafeArrayAllocData)
SAFEARRAY* WINAPI
SafeArrayCreate32(VARTYPE vt, UINT32 cDims, SAFEARRAYBOUND *rgsabound);
#define SafeArrayCreate WINELIB_NAME(SafeArrayCreate)
HRESULT WINAPI
SafeArrayDestroyDescriptor32(SAFEARRAY *psa);
#define SafeArrayDestroyDescriptor WINELIB_NAME(SafeArrayDestroyDescriptor)
HRESULT WINAPI
SafeArrayPutElement32(SAFEARRAY *psa, LONG *rgIndices, void *pv);
#define SafeArrayPutElement WINELIB_NAME(SafeArrayPutElement)
HRESULT WINAPI
SafeArrayGetElement32(SAFEARRAY *psa, LONG *rgIndices, void *pv);
#define SafeArrayGetElement WINELIB_NAME(SafeArrayGetElement)
HRESULT WINAPI
SafeArrayLock32(SAFEARRAY *psa);
#define SafeArrayLock WINELIB_NAME(SafeArrayLock)
HRESULT WINAPI
SafeArrayUnlock32(SAFEARRAY *psa);
#define SafeArrayUnlock WINELIB_NAME(SafeArrayUnlock)
HRESULT WINAPI
SafeArrayGetUBound32(SAFEARRAY *psa, UINT32 nDim, LONG *plUbound);
#define SafeArrayGetUBound WINELIB_NAME(SafeArrayGetUBound)
HRESULT WINAPI
SafeArrayGetLBound32(SAFEARRAY *psa, UINT32 nDim, LONG *plLbound);
#define SafeArrayGetLBound WINELIB_NAME(SafeArrayGetLBound)
UINT32 WINAPI
SafeArrayGetDim32(SAFEARRAY *psa);
#define SafeArrayGetDim WINELIB_NAME(SafeArrayGetDim)
UINT32 WINAPI
SafeArrayGetElemsize32(SAFEARRAY *psa);
#define SafeArrayGetElemsize WINELIB_NAME(SafeArrayGetElemsize)
HRESULT WINAPI
SafeArrayAccessData32(SAFEARRAY *psa, void **ppvData);
#define SafeArrayAccessData WINELIB_NAME(SafeArrayAccessData)
HRESULT WINAPI
SafeArrayUnaccessData32(SAFEARRAY *psa);
#define SafeArrayUnaccessData WINELIB_NAME(SafeArrayUnaccessData)
HRESULT WINAPI
SafeArrayPtrOfIndex32(SAFEARRAY *psa, LONG *rgIndices, void **ppvData);
#define SafeArrayPtrOfIndex WINELIB_NAME(SafeArrayPtrOfIndex)
HRESULT WINAPI
SafeArrayCopyData32(SAFEARRAY *psaSource, SAFEARRAY **psaTarget);
#define SafeArrayCopyData WINELIB_NAME(SafeArrayCopyData)
HRESULT WINAPI
SafeArrayDestroyData32(SAFEARRAY *psa);
#define SafeArrayDestroyData WINELIB_NAME(SafeArrayDestroyData)
HRESULT WINAPI
SafeArrayDestroy32(SAFEARRAY *psa);
#define SafeArrayDestroy WINELIB_NAME(SafeArrayDestroy)
HRESULT WINAPI
SafeArrayCopy32(SAFEARRAY *psa, SAFEARRAY **ppsaOut);
#define SafeArrayCopy WINELIB_NAME(SafeArrayCopy)
SAFEARRAY* WINAPI
SafeArrayCreateVector32(VARTYPE vt, LONG lLbound, ULONG cElements);
#define SafeArrayCreateVector WINELIB_NAME(SafeArrayCreateVector)
HRESULT WINAPI
SafeArrayRedim32(SAFEARRAY *psa, SAFEARRAYBOUND *psaboundNew);
#define SafeArrayRedim WINELIB_NAME(SafeArrayRedim)
/*
* Data types for Variants.
......
......@@ -152,6 +152,9 @@ extern int WIN32_LastError;
#define DISP_E_BADVARTYPE 0x80020008L
#define DISP_E_OVERFLOW 0x8002000AL
#define DISP_E_TYPEMISMATCH 0x80020005L
#define DISP_E_ARRAYISLOCKED 0x8002000D
#define DISP_E_BADINDEX 0x8002000B
/* Drag and Drop */
......
......@@ -18,6 +18,7 @@ C_SRCS = \
oleobj.c \
olesvr.c \
parsedt.c \
safearray.c \
storage.c \
typelib.c \
variant.c
......
This diff is collapsed. Click to expand it.
......@@ -15,19 +15,19 @@ type win32
12 stdcall VariantChangeType(ptr ptr) VariantChangeType32
13 stub VariantTimeToDosDateTime
14 stub DosDateTimeToVariantTime
15 stub SafeArrayCreate
16 stub SafeArrayDestroy
17 stub SafeArrayGetDim
18 stub SafeArrayGetElemsize
19 stub SafeArrayGetUBound
20 stub SafeArrayGetLBound
21 stub SafeArrayLock
22 stub SafeArrayUnlock
23 stub SafeArrayAccessData
24 stub SafeArrayUnaccessData
25 stub SafeArrayGetElement
26 stub SafeArrayPutElement
27 stub SafeArrayCopy
15 stdcall SafeArrayCreate(long long ptr) SafeArrayCreate32
16 stdcall SafeArrayDestroy(ptr) SafeArrayDestroy32
17 stdcall SafeArrayGetDim(ptr) SafeArrayGetDim32
18 stdcall SafeArrayGetElemsize(ptr) SafeArrayGetElemsize32
19 stdcall SafeArrayGetUBound(ptr long long) SafeArrayGetUBound32
20 stdcall SafeArrayGetLBound(ptr long long) SafeArrayGetLBound32
21 stdcall SafeArrayLock(ptr) SafeArrayLock32
22 stdcall SafeArrayUnlock(ptr) SafeArrayUnlock32
23 stdcall SafeArrayAccessData(ptr ptr) SafeArrayAccessData32
24 stdcall SafeArrayUnaccessData(ptr) SafeArrayUnaccessData32
25 stdcall SafeArrayGetElement(ptr ptr ptr) SafeArrayGetElement32
26 stdcall SafeArrayPutElement(ptr ptr ptr) SafeArrayPutElement32
27 stdcall SafeArrayCopy(ptr ptr) SafeArrayCopy32
28 stub DispGetParam
29 stub DispGetIDsOfNames
30 stub DispInvoke
......@@ -36,11 +36,11 @@ type win32
33 stub RegisterActiveObject
34 stub RevokeActiveObject
35 stub GetActiveObject
36 stub SafeArrayAllocDescriptor
37 stub SafeArrayAllocData
38 stub SafeArrayDestroyDescriptor
39 stub SafeArrayDestroyData
40 stub SafeArrayRedim
36 stdcall SafeArrayAllocDescriptor(long ptr) SafeArrayAllocDescriptor32
37 stdcall SafeArrayAllocData(ptr) SafeArrayAllocData32
38 stdcall SafeArrayDestroyDescriptor(ptr) SafeArrayDestroyDescriptor32
39 stdcall SafeArrayDestroyData(ptr) SafeArrayDestroyData32
40 stdcall SafeArrayRedim(ptr ptr) SafeArrayRedim32
41 stub OACreateTypeLib2
46 stub VarParseNumFromStr
47 stub VarNumFromParseNum
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment