PropertyObject.SetValBinary
- Updated2024-10-09
- 1 minute(s) read
PropertyObject.SetValBinary
Syntax
PropertyObject.SetValBinary( lookupString, options, newValue)
Purpose
Sets the string value of the property the lookupString parameter specifies to contain a string representation of the binary data you pass to the newValue parameter. This method compresses the binary data and then encodes the compressed data into the string using only printable ASCII characters.
Remarks
Ordinarily, you cannot store binary data in a string because strings cannot contain zero bytes and strings must not contain invalid multibyte character set (MBCS) sequences. However, by encoding binary data using only printable non-MBCS-lead-byte characters, this method enables you to store arbitrary binary data in TestStand string variables or properties.
Parameters
lookupString As String
[In] Pass an empty string to denote the PropertyObject to which the method applies, or pass the name of a subproperty within the PropertyObject. You can also pass lookup strings to this parameter.
options As Long
[In] Pass 0 to specify the default behavior, or pass one or more PropertyOptions constants. Use the bitwise-OR operator to specify multiple options.
newValue As Byte Array
[In] Specifies the array of bytes to store in the string property.
See Also
Thread Safety of the PropertyObject API and TestStand Variables