GetFileFormatVersion

void GetFileFormatVersion(long index, const char *path, IDispatch *inputStream, char *fileFormatVersion, long maxVersionLengthInBytes, TSERROR *errorCode, char *errorMsg, long maxErrorMsgLengthInBytes)

Purpose

The file format version for the file the path and inputStream parameters specify. Implement the callback to assign the file format version to the fileFormatVersion parameter. When the translator does not support reading file format version information from the file, assign an empty string to the fileFormatVersion parameter. TestStand calls this callback to return a version string for the FileInformation.GetFileFormatVersion method in the TestStand API.

Note TestStand supports multibyte characters. When you compare TestStand strings, such as path and extension strings, National Instruments recommends using multibyte-safe functions. Using regular string functions might lead to unpredictable behavior.

Parameters

Name Type Description
index long The zero-based index of the translator in the DLL that must process the callback.
path long The path to the file.
inputStream InputStream A reference to an InputStream object that contains the contents of the file TestStand attempts to open.
fileFormatVersion string The file format version of the file. The callback must copy a string value to the existing buffer, including the NUL terminating character. Use the maxVersionLengthInBytes parameter to determine the size of the buffer. When the translator does not support reading file format version information from the file, assign an empty string to the buffer.
maxVersionLengthInBytes long The maximum number of bytes you can copy to the fileFormatVersion parameter.
errorCode TSERROR The error code when an error occurs in the callback.
errorMsg string The error message when an error occurs in the callback. The callback must copy a string value to the existing buffer, including the NUL terminating character. Use the maxErrorMsgLengthInBytes parameter to determine the size of the buffer.
maxErrorMsgLengthInBytes long The maximum number of bytes the DLL can copy to the errorMsg parameter.