Commit e81b63fc authored by Francois Jacques's avatar Francois Jacques Committed by Alexandre Julliard

Implemented SafeArrayGetVarType.

Added a VT_RECORD variant type definition.
parent 00e7c334
...@@ -73,6 +73,7 @@ import ole32.dll ...@@ -73,6 +73,7 @@ import ole32.dll
74 stdcall VarR4FromStr(wstr long long ptr) VarR4FromStr 74 stdcall VarR4FromStr(wstr long long ptr) VarR4FromStr
75 stub VarR4FromDisp 75 stub VarR4FromDisp
76 stdcall VarR4FromBool(long ptr) VarR4FromBool 76 stdcall VarR4FromBool(long ptr) VarR4FromBool
77 stdcall SafeArrayGetVarType(ptr ptr) SafeArrayGetVarType
78 stdcall VarR8FromUI1(long ptr) VarR8FromUI1 78 stdcall VarR8FromUI1(long ptr) VarR8FromUI1
79 stdcall VarR8FromI2(long ptr) VarR8FromI2 79 stdcall VarR8FromI2(long ptr) VarR8FromI2
80 stdcall VarR8FromI4(long ptr) VarR8FromI4 80 stdcall VarR8FromI4(long ptr) VarR8FromI4
......
...@@ -1036,3 +1036,45 @@ static HRESULT duplicateData( ...@@ -1036,3 +1036,45 @@ static HRESULT duplicateData(
return S_OK; return S_OK;
} }
/************************************************************************
* SafeArrayGetVarType
* Returns the VARTYPE stored in the given safearray
*/
HRESULT WINAPI SafeArrayGetVarType(
SAFEARRAY* psa,
VARTYPE* pvt)
{
HRESULT hr = E_INVALIDARG;
VARTYPE vt = VT_EMPTY;
/* const short VARTYPE_OFFSET = -4; */
if (psa->fFeatures & FADF_HAVEVARTYPE)
{
/* VT tag @ negative offset 4 in the array descriptor */
FIXME("Returning VT_BSTR instead of VT_...");
vt = VT_BSTR;
}
else if (psa->fFeatures & FADF_RECORD)
{
vt = VT_RECORD;
}
else if (psa->fFeatures & FADF_DISPATCH)
{
vt = VT_DISPATCH;
}
else if (psa->fFeatures & FADF_UNKNOWN)
{
vt = VT_UNKNOWN;
}
if (vt != VT_EMPTY)
{
*pvt = vt;
hr = S_OK;
}
TRACE("HRESULT = %08lx", hr);
return hr;
}
...@@ -467,6 +467,7 @@ enum VARENUM { ...@@ -467,6 +467,7 @@ enum VARENUM {
VT_USERDEFINED = 29, VT_USERDEFINED = 29,
VT_LPSTR = 30, VT_LPSTR = 30,
VT_LPWSTR = 31, VT_LPWSTR = 31,
VT_RECORD = 36,
VT_FILETIME = 64, VT_FILETIME = 64,
VT_BLOB = 65, VT_BLOB = 65,
VT_STREAM = 66, VT_STREAM = 66,
......
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