IsCurrentFileVersion

long IsCurrentFileVersion(long index, const char *path, IDispatch *inputStream, TSERROR *errorCode, char *errorMsg, long maxErrorMsgLengthInBytes)

Purpose

Returns whether the version of the file the path and inputStream parameters specify matches the current version of the translator, an older version of the translator, or a newer version of the translator. TestStand calls this callback to return a value for the Engine.IsCurrentSequenceFileVersion 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.
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.

Return Value

Returns one of the following values:

Name Type
-1 The file is compatible with an older version of the translator.
0 The file is compatible with the current version of the translator. When the translator does not support reading file version information from the file, return 0 .
1 The file is compatible with a newer version of the translator.