Commit 8ff278d2 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Implemented SafeArray{SetIID,GetIID,SetRecordInfo,GetRecordInfo}.

Added support for FADF_HAVEIID, FADF_RECORD, FADF_HAVEVARTYPE. Implemented SafeArrayAllocDescriptorEx and SafeArrayGetVarType correctly. Fixed second argument of SafeArrayCopyData (it is just SAFEARRAY*). Changed allocation to include 16 bytes before the SAFEARRAY (to store IID/VARTYPE/IRecordInfo*). VARTYPE -> size array was not indexed correctly. Added lots of testcases for most functionality. Added IRecordInfo interface definition.
parent 48e583db
......@@ -41,8 +41,8 @@
41 stdcall SafeArrayAllocDescriptorEx(long long ptr) SafeArrayAllocDescriptorEx
42 stub SafeArrayCreateEx
43 stub SafeArrayCreateVectorEx
44 stub SafeArraySetRecordInfo
45 stub SafeArrayGetRecordInfo
44 stdcall SafeArraySetRecordInfo(ptr ptr) SafeArraySetRecordInfo
45 stdcall SafeArrayGetRecordInfo(ptr ptr) SafeArrayGetRecordInfo
46 stdcall VarParseNumFromStr(wstr long long ptr ptr) VarParseNumFromStr
47 stdcall VarNumFromParseNum(ptr ptr long ptr) VarNumFromParseNum
48 stdcall VarI2FromUI1(long ptr) VarI2FromUI1
......@@ -54,7 +54,7 @@
54 stdcall VarI2FromStr(wstr long long ptr) VarI2FromStr
55 stub VarI2FromDisp
56 stdcall VarI2FromBool(long ptr) VarI2FromBool
57 stub SafeArraySetIID
57 stdcall SafeArraySetIID(ptr ptr) SafeArraySetIID
58 stdcall VarI4FromUI1(long ptr) VarI4FromUI1
59 stdcall VarI4FromI2(long ptr) VarI4FromI2
60 stdcall VarI4FromR4(long ptr) VarI4FromR4
......@@ -64,7 +64,7 @@
64 stdcall VarI4FromStr(wstr long long ptr) VarI4FromStr
65 stub VarI4FromDisp
66 stdcall VarI4FromBool(long ptr) VarI4FromBool
67 stub SafeArrayGetIID
67 stdcall SafeArrayGetIID(ptr ptr) SafeArrayGetIID
68 stdcall VarR4FromUI1(long ptr) VarR4FromUI1
69 stdcall VarR4FromI2(long ptr) VarR4FromI2
70 stdcall VarR4FromI4(long ptr) VarR4FromI4
......
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = oleaut32.dll
IMPORTS = oleaut32
EXTRALIBS = $(LIBUUID)
CTESTS = \
safearray.c \
......
......@@ -62,6 +62,9 @@ HRESULT WINAPI
SafeArrayAllocDescriptor(UINT cDims, struct tagSAFEARRAY **ppsaOut);
HRESULT WINAPI
SafeArrayAllocDescriptorEx(VARTYPE vt,UINT cDims,struct tagSAFEARRAY **ppsaOut);
HRESULT WINAPI
SafeArrayAllocData(struct tagSAFEARRAY *psa);
struct tagSAFEARRAY * WINAPI
......@@ -104,7 +107,7 @@ HRESULT WINAPI
SafeArrayPtrOfIndex(struct tagSAFEARRAY *psa, LONG *rgIndices, void **ppvData);
HRESULT WINAPI
SafeArrayCopyData(struct tagSAFEARRAY *psaSource, struct tagSAFEARRAY **psaTarget);
SafeArrayCopyData(struct tagSAFEARRAY *psaSource, struct tagSAFEARRAY *psaTarget);
HRESULT WINAPI
SafeArrayDestroyData(struct tagSAFEARRAY *psa);
......@@ -121,6 +124,21 @@ SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
HRESULT WINAPI
SafeArrayRedim(struct tagSAFEARRAY *psa, struct tagSAFEARRAYBOUND *psaboundNew);
HRESULT WINAPI
SafeArraySetIID(struct tagSAFEARRAY *psa, REFGUID riid);
HRESULT WINAPI
SafeArrayGetIID(struct tagSAFEARRAY *psa, GUID *riid);
HRESULT WINAPI
SafeArrayGetVartype(struct tagSAFEARRAY *psa, VARTYPE *vt);
HRESULT WINAPI
SafeArrayGetRecordInfo(struct tagSAFEARRAY *psa, IRecordInfo **recordinfo);
HRESULT WINAPI
SafeArraySetRecordInfo(struct tagSAFEARRAY *psa, IRecordInfo *recordinfo);
/* These are macros that help accessing the VARIANT date type.
*/
......
......@@ -33,6 +33,9 @@ typedef struct IDispatch IDispatch,*LPDISPATCH;
DEFINE_OLEGUID(IID_ITypeInfo, 0x00020401,0,0);
typedef struct ITypeInfo ITypeInfo,*LPTYPEINFO;
DEFINE_OLEGUID(IID_IRecordInfo, 0x0000002f,0,0);
typedef struct IRecordInfo IRecordInfo,*LPRECORDINFO;
DEFINE_OLEGUID(IID_ITypeLib, 0x00020402,0,0);
typedef struct ITypeLib ITypeLib,*LPTYPELIB;
......@@ -802,4 +805,52 @@ ICOM_DEFINE(IEnumVARIANT,IUnknown)
#define IEnumVARIANT_Reset(p) ICOM_CALL (Reset,p)
#define IEnumVARIANT_Clone(p,a) ICOM_CALL1(Clone,p,a)
/*****************************************************************************
* IRecordInfo interface
*/
#define ICOM_INTERFACE IRecordInfo
#define IRecordInfo_METHODS \
ICOM_METHOD1(HRESULT, RecordInit, PVOID, pvNew) \
ICOM_METHOD1(HRESULT, RecordClear, PVOID, pvExisting) \
ICOM_METHOD2(HRESULT, RecordCopy, PVOID, pvExisting, PVOID, pvNew) \
ICOM_METHOD1(HRESULT, GetGUID, GUID*, pguid) \
ICOM_METHOD1(HRESULT, GetName, BSTR*, pbstrName) \
ICOM_METHOD1(HRESULT, GetSize, ULONG*, pcbSize) \
ICOM_METHOD1(HRESULT, GetTypeInfo, ITypeInfo**, ppTypeInfo) \
ICOM_METHOD3(HRESULT, GetField, PVOID, pvData, LPCOLESTR, szFieldName, VARIANT*, pvarField) \
ICOM_METHOD4(HRESULT, GetFieldNoCopy, PVOID, pvData, LPCOLESTR, szFieldName, VARIANT*, pvarField, PVOID *,ppvDataCArray) \
ICOM_METHOD4(HRESULT, PutField, ULONG, wFlags, PVOID, pvData, LPCOLESTR, szFieldName, VARIANT*, pvarField) \
ICOM_METHOD4(HRESULT, PutFieldNoCopy, ULONG, wFlags, PVOID, pvData, LPCOLESTR, szFieldName, VARIANT*, pvarField) \
ICOM_METHOD2(HRESULT, GetFieldNames, ULONG*, pcNames, BSTR*, rgBstrNames) \
ICOM_METHOD1(BOOL, IsMatchingType, IRecordInfo*, pRecordInfo) \
ICOM_METHOD (LPVOID, RecordCreate) \
ICOM_METHOD2(HRESULT, RecordCreateCopy, PVOID, pvSource, PVOID*, ppvDest) \
ICOM_METHOD1(HRESULT, RecordDestroy, PVOID, pvRecord)
#define IRecordInfo_IMETHODS \
IUnknown_IMETHODS \
IRecordInfo_METHODS
ICOM_DEFINE(IRecordInfo,IUnknown)
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
#define IRecordInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IRecordInfo_AddRef(p) ICOM_CALL (AddRef,p)
#define IRecordInfo_Release(p) ICOM_CALL (Release,p)
/*** IRecordInfo methods ***/
#define IRecordInfo_RecordInit(p,a) ICOM_CALL1(RecordInit,p,a)
#define IRecordInfo_RecordClear(p,a) ICOM_CALL1(RecordClear,p,a)
#define IRecordInfo_RecordCopy(p,a,b) ICOM_CALL2(RecordCopy,p,a,b)
#define IRecordInfo_GetGUID(p,a) ICOM_CALL1(GetGUID,p,a)
#define IRecordInfo_GetName(p,a) ICOM_CALL1(GetName,p,a)
#define IRecordInfo_GetTypeInfo(p,a) ICOM_CALL1(GetTypeInfo,p,a)
#define IRecordInfo_GetField(p,a,b,c) ICOM_CALL3(GetField,p,a,b,c)
#define IRecordInfo_GetFieldNoCopy(p,a,b,c,d) ICOM_CALL4(GetFieldNoCopy,p,a,b,c,d)
#define IRecordInfo_PutField(p,a,b,c,d) ICOM_CALL4(PutField,p,a,b,c,d)
#define IRecordInfo_PutFieldNoCopy(p,a,b,c,d) ICOM_CALL4(PutField,p,a,b,c,d)
#define IRecordInfo_GetFieldNames(p,a,b) ICOM_CALL2(GetFieldNames,p,a,b)
#define IRecordInfo_RecordCreate(p) ICOM_CALL (RecordCreate,p)
#define IRecordInfo_RecordCreateCopy(p,a,b) ICOM_CALL2(RecordCreateCopy,p,a,b)
#define IRecordInfo_RecordDestroy(p,a) ICOM_CALL1(RecordDestroy,p,a)
#endif /* __WINE_WINE_OBJ_OLEAUT_H */
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