|
The DataBloc Object
The DataBloc object represents a memory block created by
Interop.Allocate. It is used
to create memory structure, convert data or send/receive parameters
to/from external functions. It is to be used by advanced developers
only. Every "read" function is paired with an equivalent "write".
Every pair can be used in roundtrips, meaning that writing a value
and reading it back always recreates the exact same original
value.
When a DataBloc object is not used anymore, it is considered
good practice to set its Size
property to 0. This will free the memory allocated by the object
immediately (to bypass the garbage collector of JScript that may
take some time before deleting the actual object).
Functions:
| Name |
Description |
| SetAt
|
Writes a single byte in the memory block. |
| GetAt
|
Reads a single byte from the memory block. |
| WriteString
|
Writes a string in the memory block. |
| WriteBSTR
|
Writes a BSTR string in the memory block. |
| WriteWORD
|
Writes a double-byte number in the memory block. |
| WriteDWORD
|
Writes a 32bits integer in the memory block. |
| WriteInterfacePtr
|
Writes an IDispatch pointer in the memory block. |
| ReadString
|
Reads a string from the memory block. |
| ReadBSTR
|
Reads a BSTR string from the memory block. |
| ReadWORD
|
Reads a double-byte number from the memory block. |
| ReadDWORD
|
Reads a 32 bits integer from the memory block. |
| ReadInterfacePtr
|
Reads an IDispatch pointer from the memory block. |
Properties:
| Name |
Description |
| Size
|
Size in bytes of the memory block attached to the object. |
| DataPtr
|
Pointer to the actual data managed by this object. |
|