If you pass a dst buffer that is a null reference (Nothing in Visual Basic), the GetChars method returns the length of the field in characters.

The characters at the srcOffset through srcOffset +count -1 positions of the value are copied into the dstOffset through dstOffset +count -1 positions, respectively, of the destination array. If the end of the value is encountered before count characters are copied, the remainder of the destination array is left unchanged.

If any of the following instances are true, a ULException object with code ULSQLCode.SQLE_INVALID_PARAMETER constant is thrown
and the destination is not modified:

The srcOffset value is negative.

The dstOffset value is negative.

The count value is negative.

The dstOffset +count value is greater than the dst length.

For other errors, a ULException object with the appropriate error code is thrown.