Commit a51ff76b authored by Bill Medland's avatar Bill Medland Committed by Alexandre Julliard

A couple of additions.

parent 4c2be5dc
......@@ -101,6 +101,7 @@ debug_channels (ole typelib)
94 stdcall VarDateFromStr(wstr long long ptr) VarDateFromStr
95 stub VarDateFromDisp
96 stdcall VarDateFromBool(long ptr) VarDateFromBool
#97 stub VarFormatDateTime # (ptr long long ptr)
98 stdcall VarCyFromUI1(long ptr) VarCyFromUI1
99 stdcall VarCyFromI2(long ptr) VarCyFromI2
100 stdcall VarCyFromI4(long ptr) VarCyFromI4
......@@ -308,7 +309,7 @@ debug_channels (ole typelib)
426 stub GetRecordInfoFromGuids # stdcall (ptr long long long ptr ptr)
427 stub GetRecordInfoFromTypeInfo # stdcall (ptr ptr)
428 stub OleLoadPictureFileEx
429 stub SafeArrayAllocDescriptorEx
429 stdcall SafeArrayAllocDescriptorEx(long long ptr) SafeArrayAllocDescriptorEx
430 stub SafeArrayCreateEx
431 stub SafeArrayCreateVectorEx
432 stub SafeArrayGetIID
......@@ -320,7 +321,7 @@ debug_channels (ole typelib)
438 stub VarAnd # stdcall (ptr ptr ptr)
439 stdcall VarBstrCat(ptr ptr ptr) VarBstrCat
440 stdcall VarBstrCmp(ptr ptr long long) VarBstrCmp
441 stub VarCat # stdcall (ptr ptr ptr)
441 stdcall VarCat(ptr ptr ptr) VarCat
442 stub VarCmp # stdcall (ptr ptr long long)
443 stub VarCyAbs
444 stub VarCyAdd
......
......@@ -20,7 +20,7 @@ DEFAULT_DEBUG_CHANNEL(ole);
#define SYSDUPSTRING(str) SysAllocStringLen((str), SysStringLen(str))
/* Localy used methods */
/* Locally used methods */
static INT
endOfDim(LONG *coor, SAFEARRAYBOUND *mat, LONG dim, LONG realDim);
......@@ -101,7 +101,7 @@ VARTYPE_NOT_SUPPORTED, /* VT_ARRAY [V] SAFEARRAY* */
VARTYPE_NOT_SUPPORTED /* VT_BYREF [V] void* for local use */
};
static const int LAST_VARTYPE = sizeof(VARTYPE_SIZE)/sizeof(ULONG);
static const int LAST_VARTYPE = sizeof(VARTYPE_SIZE)/sizeof(VARTYPE_SIZE[0]);
/*************************************************************************
......@@ -130,6 +130,26 @@ HRESULT WINAPI SafeArrayAllocDescriptor(
}
/*************************************************************************
* SafeArrayAllocDescriptorEx (OLEAUT32.429)
* Allocate the appropriate amount of memory for the SafeArray descriptor
*
* This is a minimal implementation just to get things moving.
*
* The MSDN documentation on this doesn't tell us much.
*/
HRESULT WINAPI SafeArrayAllocDescriptorEx(
VARTYPE vt,
UINT cDims,
SAFEARRAY **ppsaOut)
{
if ( (vt >= LAST_VARTYPE) ||
( VARTYPE_SIZE[vt] == VARTYPE_NOT_SUPPORTED ) )
return E_UNEXPECTED;
return SafeArrayAllocDescriptor (cDims, ppsaOut);
}
/*************************************************************************
* SafeArrayAllocData (OLEAUT32.37)
* Allocate the appropriate amount of data for the SafeArray data
*/
......@@ -516,6 +536,10 @@ HRESULT WINAPI SafeArrayPtrOfIndex(
if(! validCoordinate(rgIndices, psa))
return DISP_E_BADINDEX;
/* Although it is dangerous to do this without having a lock, it is not
* illegal. Microsoft do warn of the danger.
*/
/* Figure out the number of items to skip */
stepCountInSAData = calcDisplacement(rgIndices, psa->rgsabound, psa->cDims);
......
......@@ -4650,3 +4650,26 @@ HRESULT WINAPI VarBstrCat(BSTR left, BSTR right, BSTR *out)
return 1;
}
/**********************************************************************
* VarCat [OLEAUT32.441]
*/
HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out)
{
/* Should we VariantClear out? */
/* Can we handle array, vector, by ref etc. */
if ((V_VT(left)&VT_TYPEMASK) == VT_NULL &&
(V_VT(right)&VT_TYPEMASK) == VT_NULL)
{
V_VT(out) = VT_NULL;
return S_OK;
}
else if (V_VT(left) == VT_BSTR && V_VT(right) == VT_BSTR)
{
V_VT(out) = VT_BSTR;
VarBstrCat (V_BSTR(left), V_BSTR(right), &V_BSTR(out));
return S_OK;
}
else
FIXME ("types not supported\n");
return S_OK;
}
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