GetMachineData Function

Action

Gets the named data associated with the specified machine.

Syntax

aMachineData = GetMachineData(hMachine, sName)
Variable Description
aMachineData Returned data. ANYTYPE.
hMachine

Handle to the machine of interest. HMACHINE.

Since a string specifying the Agent name for the machine is automatically cast to a legal handle for the machine, you can also supply such a string for this argument.

sName The name that you have assigned to the data with the SetMachineData function. STRING.

Notes

Pass NULL for hMachine to specify the current machine for the current thread. The following example passes the machine handle, which is equally valid.

Example

[-] for each hMachine in GetConnected()
	[ ] spawn
	[ ] // Make specified machine the current machine
	[ ] SetMachine(hMachine)
	[ ] 
	[ ] sState = GetMachineData(hMachine, "State")
	[ ] ...