WiseMo Guest Component API
Task manager

Back to Index

This page describes param to InvokeRmOperation call and returned value from OnRmOperationResult for snapinId = 15003.

Note

When operation fails, OnRmOperationResult comes with non-zero status and Error object in value:

{
"Error" : {
"code" : 4101,
"message" : "Failed to send RM command"
}
}


When status is zero, value is as provided in following documentation.

Paged output

RM requests may yield lots of data so responses are restricted in size.
That's where StartAt, UpTo and Total are used.


StartAt


UpTo says which StartAt use next to continue data retrieval


Total says how many data at all. When UpTo equals to Total, then all data has been retrieved.

Operation: Check if supported

snapinId=15003 opId=0

Check if host supports Task manager subsystem (Snap-In) for RM calls.

Parameters

{}

Returns

{
"Supported" : 1
}


Supported 1 if supports, 0 if not

Operation: Get applications

snapinId=15003 opId=401

Parameters

{"StartAt":-1}

Returns

{
"Applications" : [
{
"AppState" : 0,
"HWND" : 3735892,
"Name" : "WiseMo Host - Connected [e.user@COMP]",
"ProcessID" : 1740,
"ThreadID" : 1180
}
],
"StartAt" : 0,
"Total" : 1,
"UpTo" : 1
}

Operation: Get processes

snapinId=15003 opId=402

Parameters

{"StartAt":-1}

Returns

{
"CPUUsage" : 14.2857140,
"Processes" : [
{
"CPUUsage" : 85.7142860,
"KeTimeHi" : 3852,
"KeTimeLo" : 2147483647,
"Name" : "",
"ProcessID" : 0,
"SessionID" : 0,
"UsrTimeHi" : 0,
"UsrTimeLo" : 0,
"WksSetHi" : 0,
"WksSetLo" : 28672
},
{
"CPUUsage" : 0.0,
"KeTimeHi" : 2,
"KeTimeLo" : 2147483647,
"Name" : "svchost.exe",
"ProcessID" : 1032,
"SessionID" : 0,
"UsrTimeHi" : 0,
"UsrTimeLo" : 1932968750,
"WksSetHi" : 0,
"WksSetLo" : 9691136
},
...
],
"StartAt" : 0,
"Total" : 35,
"UpTo" : 35
}

Operation: Get threads

snapinId=15003 opId=403

Note
This operation requires TMS_COMMAND_GET_PROCESSES to be called first to cache data
Data should be requested sequentially, that is, first call with StartAt=-1, second call with StartAt equal to UpTo returned from first call and so on.

See paged output.

Parameters

{"StartAt":-1}

Returns

{
"StartAt" : 0,
"Threads" : [
{
"KeTimeHi" : 3857,
"KeTimeLo" : 919264328,
"Priority" : 0,
"ProcessID" : 0,
"ThreadID" : 0,
"UsrTimeHi" : 0,
"UsrTimeLo" : 0
},
...
],
"Total" : 364,
"UpTo" : 74
}

Operation: New task

snapinId=15003 opId=404

Starts an application.

Parameters

{"Command":"notepad"}

Returns

null

Operation: End task

snapinId=15003 opId=405

Ends an application gracefully by sending WM_CLOSE to the window and waiting for the application to exit.

Parameters

{"HWND":23423,"ProcessID":12}

Returns

null

Operation: End process

snapinId=15003 opId=406

Kills an application.

Parameters

{"ProcessID":12}

Returns

null