VariableInformationStruct4 (STRUCT)ΒΆ

TYPE VariableInformationStruct4 : STRUCT

WARNING! If you pass this struct to the IecVarAccess or CmpIecVarAccess, it MUST be initialized with IIecVarAccess9.VarAccInitVarInfo() or IecVarAccInitVarInfo() before usage, and it MUST be cleaned up with IIecVarAccess9.VarAccExitVarInfo() or IecVarAccExitVarInfo(). Weird side effects including crashes and memory leaks will result if you do not adhere to this rule.

The new member wMethodMemberIndex nicely fits into an existing gap within the VariableInformationStruct3 struct. Depending on the architecture and global pack mode settings, we either have 3 bytes or 7 bytes gap. wMethodMemberIndex uses 2 bytes, thus a further byte is available for further use. The resulting struct size, which is also stored in the member wStructSize, is unchanged compared to the VariableInformationStruct3 struct. This allows us to implement executables without dynamic allocation in the runtime. Access is additionally guarded by VIF_EXECUTABLE_MEMBER.

InOut:

Name

Type

Comment

wStructSize

WORD

wFlags

WORD

dwOffset

XWORD

byBitOffset

BYTE

wMethodMemberIndex

WORD

xwMonitoringOffset

XWORD

xwMonitoringSize

XWORD

dwArrayOfArrayNesting

DWORD

hBrowseInfo

RTS_IEC_HANDLE

aBrowseInfoPool

ARRAY [0..27] OF BYTE

OBSOLETE: Only for backward compatibility. Not used anymore because data is stored in hBrowseInfo pool.