OPC Studio User's Guide and Reference
SetByteArrayValue Method (_OpaqueData)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.DataTypeModel.ComTypes Namespace > _OpaqueData Interface : SetByteArrayValue Method
The value expressed as array of bytes.

The value of this parameter cannot be null (Nothing in Visual Basic).

Size in bits of the resulting value.

Valid values of this parameter are in the range from 0 to 2147483647 (Int32.MaxValue).

Sets the current value from a given array of bytes and size in bits.
Syntax
'Declaration
 
Sub SetByteArrayValue( _
   ByVal byteArray As Object, _
   ByVal sizeInBits As Integer _
) 
'Usage
 
Dim instance As _OpaqueData
Dim byteArray As Object
Dim sizeInBits As Integer
 
instance.SetByteArrayValue(byteArray, sizeInBits)
void SetByteArrayValue( 
   object byteArray,
   int sizeInBits
)
void SetByteArrayValue( 
   Object^ byteArray,
   int sizeInBits
) 

Parameters

byteArray
The value expressed as array of bytes.

The value of this parameter cannot be null (Nothing in Visual Basic).

sizeInBits
Size in bits of the resulting value.

Valid values of this parameter are in the range from 0 to 2147483647 (Int32.MaxValue).

Remarks

The sizeInBits must be equal to or less than the number of bits in the byteArray (the length of the byte array times 8).

Note that the byte array value is only synchronized with the bit array after the bit array has been set to a different object.

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also