A couple of additions.

This commit is contained in:
Bill Medland 2002-01-29 02:44:44 +00:00 committed by Alexandre Julliard
parent 4c2be5dc42
commit a51ff76b86
3 changed files with 52 additions and 4 deletions

View File

@ -101,6 +101,7 @@ debug_channels (ole typelib)
94 stdcall VarDateFromStr(wstr long long ptr) VarDateFromStr 94 stdcall VarDateFromStr(wstr long long ptr) VarDateFromStr
95 stub VarDateFromDisp 95 stub VarDateFromDisp
96 stdcall VarDateFromBool(long ptr) VarDateFromBool 96 stdcall VarDateFromBool(long ptr) VarDateFromBool
#97 stub VarFormatDateTime # (ptr long long ptr)
98 stdcall VarCyFromUI1(long ptr) VarCyFromUI1 98 stdcall VarCyFromUI1(long ptr) VarCyFromUI1
99 stdcall VarCyFromI2(long ptr) VarCyFromI2 99 stdcall VarCyFromI2(long ptr) VarCyFromI2
100 stdcall VarCyFromI4(long ptr) VarCyFromI4 100 stdcall VarCyFromI4(long ptr) VarCyFromI4
@ -308,7 +309,7 @@ debug_channels (ole typelib)
426 stub GetRecordInfoFromGuids # stdcall (ptr long long long ptr ptr) 426 stub GetRecordInfoFromGuids # stdcall (ptr long long long ptr ptr)
427 stub GetRecordInfoFromTypeInfo # stdcall (ptr ptr) 427 stub GetRecordInfoFromTypeInfo # stdcall (ptr ptr)
428 stub OleLoadPictureFileEx 428 stub OleLoadPictureFileEx
429 stub SafeArrayAllocDescriptorEx 429 stdcall SafeArrayAllocDescriptorEx(long long ptr) SafeArrayAllocDescriptorEx
430 stub SafeArrayCreateEx 430 stub SafeArrayCreateEx
431 stub SafeArrayCreateVectorEx 431 stub SafeArrayCreateVectorEx
432 stub SafeArrayGetIID 432 stub SafeArrayGetIID
@ -320,7 +321,7 @@ debug_channels (ole typelib)
438 stub VarAnd # stdcall (ptr ptr ptr) 438 stub VarAnd # stdcall (ptr ptr ptr)
439 stdcall VarBstrCat(ptr ptr ptr) VarBstrCat 439 stdcall VarBstrCat(ptr ptr ptr) VarBstrCat
440 stdcall VarBstrCmp(ptr ptr long long) VarBstrCmp 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) 442 stub VarCmp # stdcall (ptr ptr long long)
443 stub VarCyAbs 443 stub VarCyAbs
444 stub VarCyAdd 444 stub VarCyAdd

View File

@ -20,7 +20,7 @@ DEFAULT_DEBUG_CHANNEL(ole);
#define SYSDUPSTRING(str) SysAllocStringLen((str), SysStringLen(str)) #define SYSDUPSTRING(str) SysAllocStringLen((str), SysStringLen(str))
/* Localy used methods */ /* Locally used methods */
static INT static INT
endOfDim(LONG *coor, SAFEARRAYBOUND *mat, LONG dim, LONG realDim); 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 */ 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]);
/************************************************************************* /*************************************************************************
@ -129,6 +129,26 @@ HRESULT WINAPI SafeArrayAllocDescriptor(
return(S_OK); return(S_OK);
} }
/*************************************************************************
* 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) * SafeArrayAllocData (OLEAUT32.37)
* Allocate the appropriate amount of data for the SafeArray data * Allocate the appropriate amount of data for the SafeArray data
@ -516,6 +536,10 @@ HRESULT WINAPI SafeArrayPtrOfIndex(
if(! validCoordinate(rgIndices, psa)) if(! validCoordinate(rgIndices, psa))
return DISP_E_BADINDEX; 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 */ /* Figure out the number of items to skip */
stepCountInSAData = calcDisplacement(rgIndices, psa->rgsabound, psa->cDims); stepCountInSAData = calcDisplacement(rgIndices, psa->rgsabound, psa->cDims);

View File

@ -4650,3 +4650,26 @@ HRESULT WINAPI VarBstrCat(BSTR left, BSTR right, BSTR *out)
return 1; 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;
}