API | ITcTypeInstance Parameter Return value Error codes E_POINTER : pPreview is NULL . ADS_E_INVALIDARRAYIDX : idx is outside the range of available formats. See also TypeFormatName 5.9.5.4 ITcTypeInstance6::TypicalFormatCharCount | ITcTypeInstance6::TypicalFormatCharCount Estimates the typical output length of a format by pre-filling a buffer of the type size with 0xFF and then formatting it. If this sample does not return any output, the method falls back to the byte size of the type. Signature HRESULT TypicalFormatCharCount(ULONG formatIdx, ULONG* pCnt); Parameter Return value Error codes E_POINTER : pCnt is NULL .
5.9.5.5 ITcTypeInstance6::GetValueToString | ITcTypeInstance6::GetValueToString Formats a value buffer as text. A one-dimensional VARIANT of type VT_ARRAY | VT_UI1 is expected. The bytes contained therein are interpreted as a binary representation of the type. Signature HRESULT GetValueToString(VARIANT data, ULONG formatIdx, BSTR* pToString); Parameter TE1000 85 Version: 1.7.0 Name Type Description idx ULONG [in] 0-based format index. Name Type Description pPreview BSTR* [out, retval] Preview text for the format. (HRESULT) HRESULT S OK if successful, otherwise an error code. _ Name Type Description formatIdx ULONG [in, defaultvalue(0)] 0-based format index.
Name Type Description pCnt ULONG* [out, retval] Estimated number of characters. (HRESULT) HRESULT S OK if successful, otherwise an error code. _ Name Type Description data VARIANT [in] One-dimensional byte SAFEARRAY containing the value to be formatted. formatIdx ULONG [in, defaultvalue(0)] 0-based format index.