ObjLoad()

Auto Hotkey

ObjLoad

Load a dumped object from memory or file.

OutputVar := ObjLoad(AddressOrPath , Size, Password)
Function Example: obj := ObjLoad(A_ScriptDir "\MyObj.bin")

Parameters

OutputVar

The name of the variable in which to store the loaded object.

AddressOrPath

The address of a variable or a pointer to dumped object in memory.
This can be also a file path to load an object from file.

Size (optional)

When AddressOrPath is an address and ObjDump used compression (mode 2 or 3) this must be the size of the dumped object in memory, otherwise it can be omitted.

Password (optional)

The password if for dumped object if it was used in ObjDump, otherwise it can be omitted.

General Remarks

Only standard objects and arrays are supported (such that can be enumerated by for loop).
ComObject, RegExMatchObject, FileObject, Func and DynaCall objects are not supported.
Struct object can be dumped but ObjLoad will restore a normal object instead of a Struct object.
If original object had a "base" reference, it was not saved by ObjDump and is not restored.

Examples

See ObjDump.