guides:programming:programmers_reference_manual:pointers_and_structures_in_basic_plus

Pointers and Structures in BASIC+

DLL functions often pass parameters by reference and therefore require pointers to BASIC+ variable data.

Pointer/StructureDescription
Blank_Struct()Builds a blank structure to pass to a DLL which will then fill in the structure's elements.
Build_Struct()Assembles a binary structure out of BASIC+ variables.
Declare_FCNS routineCompiles a .DLL definition record into BASIC+ callable functions.
Define_Struct routineStarts the Structure Designer tool.
GetPointer()Returns a pointer to the actual data of a BASIC+ variable. Refer to LockVariable, below.
GetValue()De-references a pointer and copies the data to a BASIC+ variable of a specified type.
LockVariable statementLocks a variable so its data does not move in memory.
Parse_Struct subroutineExtracts elements from a structure into BASIC+ variables.
Struct_Flush subroutineFlushes any cached structure definitions.
Struct_Len()Returns the length in bytes of a structure based on the structure's definition.
Struct_To_Var()Converts a binary structure to a dynamic array, placing each element from the structure into the corresponding field.
UnlockVariable statementUnlocks a BASIC+ variable locked by LockVariable.
Var_To_Struct()Converts an @fm-delimited variable into a structure placing, obtaining each structure element from the corresponding field in the variable.

For more information on DLLs, refer to Chapter 7: Calling DLLs from BASIC+.

  • guides/programming/programmers_reference_manual/pointers_and_structures_in_basic_plus.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1