The data manipulation functions are summarized in the following table.
Category | Function name | Purpose |
---|---|---|
Array manipulation | SafeArrayAccessData | Increments the lock count of an array and returns a pointer to array data. |
SafeArrayAllocData | Allocates memory for a safe array based on a descriptor created with SafeArrayAllocDescriptor. | |
SafeArrayAllocDescriptor | Allocates memory for a safe array descriptor. | |
SafeArrayCopy | Copies an existing array. | |
SafeArrayCopyData | Copies a source array to a target array after releasing source resources. | |
SafeArrayCreate | Creates a new array descriptor. | |
SafeArrayCreateVector | Creates a one-dimensional array whose lower bound is always zero. | |
SafeArrayDestroy | Destroys an array descriptor. | |
SafeArrayDestroyData | Frees memory used by the data elements in a safe array. | |
SafeArrayDestroyDescriptor | Frees memory used by a safe array descriptor. | |
SafeArrayGetDim | Returns the number of dimensions in an array. | |
SafeArrayGetElement | Retrieves an element of an array. | |
SafeArrayGetElemsize | Returns the size of an element. | |
SafeArrayGetLBound | Retrieves the lower bound for a given dimension. | |
SafeArrayGetUBound | Retrieves the upper bound for a given dimension. | |
SafeArrayLock | Increments the lock count of an array. | |
SafeArrayPtrOfIndex | Returns a pointer to an array element. | |
SafeArrayPutElement | Assigns an element into an array. | |
SafeArrayRedim | Resizes a safe array. | |
SafeArrayUnaccessData | Frees a pointer to array data and decrements the lock count of the array. | |
SafeArrayUnlock | Decrements the lock count of an array. | |
String manipulation | SysAllocString | Creates and initializes a string. |
SysAllocStringByteLen | Creates a zero-terminated string of a specified length (32-bit only). | |
SysAllocStringLen | Creates a string of a specified length. | |
SysFreeString | Frees a previously created string. | |
SysReAllocString | Changes the size and value of a string. | |
SysReAllocStringLen | Changes the size of an existing string. | |
SysStringByteLen | Returns the length of a string in bytes (32-bit only). | |
SysStringLen | Returns the length of a string. | |
Variant manipulation | VariantChangeType | Converts a variant to another type. |
VariantChangeTypeEx | Converts a variant to another type, using a locale identifier (LCID). | |
VariantClear | Releases resources and sets a variant to VT_EMPTY. | |
VariantCopy | Copies a variant. | |
VariantCopyInd | Copies variants that may contain a pointer. | |
VariantInit | Initializes a variant. | |
Data type conversion | VariantChangeType VariantChangeTypeEx | Converts specific types of variants to other variant types. |
BSTR and vector conversion | VectorFromBstr | Returns a vector, assigning each character in the BSTR to an element of the vector. |
BstrFromVector | Returns a BSTR, assigning each element of the vector to a character in the BSTR. | |
Numeric parsing | VarParseNumFromStr | Parses a string, and creates a type-independent desciption of the number it represents. |
VarNumFromParseNum | Converts the parse results to a number. | |
Time and date conversion | DosDateTimeToVariantTime | Converts MS-DOS date and time representations to a variant time. |
VariantTimeToDosDateTime | Converts a variant time to MS-DOS date and time representations. | |
VariantTimeToSystemTime | Converts a variant time to system date and time representations. | |
GetAltMonthNames | Retrieves the secondary month names. | |
SystemTimeToVariantTime | Converts system date and time representations to a variant time. | |
VarDateFromUdate | Packs a date. | |
VarUdateFromDate | Unpacks a date |