OLE DB Programmer's Reference |
Calculates the size of the buffer needed by the destination data type to support a conversion.
HRESULT GetConversionSize ( DBTYPE wSrcType, DBTYPE wDstType, DBLENGTH * pcbSrcLength, DBLENGTH * pcbDstLength, void * pSrc);
Parameters
Return Code
pcbSrcLength was a null pointer, and the conversion size was requested for a conversion from a variable-length data type to DBTYPE_STR, DBTYPE_WSTR, DBTYPE_BSTR, or DBTYPE_VARIANT.
Comments
The size of a fixed-width destination type can be discovered by passing a null pointer in the pSrc parameter. For example, the width of wType can be determined by adding the following code:
pConvert->GetConversionSize(wType, wType, 0, &ulWidth, 0);
1998-2001 Microsoft Corporation. All rights reserved.