Usage Information - Structures
With ImportTypeLib, you can use structures in the most intuitive way as well. You can get and set members and more.Creating an instance
Creating and instance of a structure is the first thing to do.struct := new lib.Structure([ ptr = 0, noInit = false ])
Parameter
ptr |
If available, a pointer to the memory buffer for the new structure instance. It must be at least as large as the structure (see GetSize()).
If this is not given, a new buffer is allocated. By default, the memory pointed to by this parameter is freed. See the next parameter. |
noInit |
If the previous parameter is given, the memory is by default freed. To avoid this and to use the data already available in the buffer, set this parameter to true .
This is especially important if the given pointer is returned by a method or property and already contains all the data.
|
Returns
The returnedstruct
is a wrapper object which youz can use to perform the operations described on this page.
Throws
If the creation of a new buffer or the freeing of the previous data fails, or if any other error occurs, an exception is thrown.Getting and setting members
Enumerating members
Cloning an instance
You can clone a structure instance with all its data.copy := struct._Clone()
copy := struct.Clone()
Returns
The returnedcopy
is a wrapper object with the same data as the original.