Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use this function to parse a structure returned by a DLL function. Alternatively, the Struct_To_Var function can be used to convert a structure into a dynamic array as long as none of the elements are char or char array types containing character values greater than @VM (hex FD, decimal 253).

...

The structure definition must be predefined using the Define_Struct routine.

See also

Build_Struct()Struct_To_Var()Var_To_Struct()

Example

Code Block
/* assumes the structure called RECT has been defined as being composed of 
4 "signed short" elements and the API function GetWindowRect has been defined in 
DLL_USER as: VOID PASCAL GetWindowRect(USHORT, LPCHAR) */
declare function Get_Property, Blank_Struct, GetWindowsRect
declare subroutine Parse_Struct
hwnd = Get_Property(@window, "HANDLE")
rect = Blank_Struct("RECT")
GetWindowsRect(hwnd, rect)
Parse_Struct(rect, "RECT", left, top, right, bottom)