IAPI::ProbeMemoryStatus

property ProbeMemoryStatus.

Retrieves miscellaneous information about memory, OS, component version, loading counter, threads…

 

HRESULT ProbeMemoryStatus(
  long InfoType,
  long *pVal
);

Parameters

InfoType

[in] . One of following values can be used:

      // InfoType = 0: % of memory is in use

      // InfoType = 1: total Kbytes of physical memory

      // InfoType = 2: free Kbytes of physical memory

      // InfoType = 3: total Kbytes of paging file

      // InfoType = 4: free Kbytes of paging file

      // InfoType = 5: total Kbytes of virtual memory

      // InfoType = 6: free Kbytes of virtual memory

      // InfoType = 7: Kbytes in use by current process

      // InfoType = 8: returns 1 if the Workstation (PC) is locked and 0 otherwise (since v2.36.6)

      // InfoType = 9: returns 1 if the Workstation is equiped with Sleep and Hibernate commands (since v2.37.5)

      // InfoType = 10: returns the battery charge status (since v2.37.5):

0 -> Normal — the battery capacity is between 33% and 66%,

1 -> High — the battery capacity is at more than 66%,

2 -> Low — the battery capacity is at less than 33%,

4 -> Critical — the battery capacity is at less than 5%,

8 -> Battery in charge (capacity is Normal),

9 -> Battery in charge (capacity is High),

10 -> Battery in charge (capacity is Low),

12 -> Battery in charge (capacity is Critical),

128 -> No system battery (direct Power plugged)

255 -> Unknown status—unable to read the battery status information

      // InfoType = 11: returns 1 if the current user belongs to Admin profile and 0 otherwise (since v2.36.0)

      // InfoType = 32: returns pointer to a C-String info about methods/properties in use coverage by current process.

                              This C-String info must be converted with ConvertStringToBSTR(…) but not be freed with

                                      FreeString (since v2.35.4)

      // InfoType = 64: returns 1 if Windows OS is 64-bit or 0 if Windows OS is 32-bit

      // InfoType = any valid PID: Kbytes in use by that process

      // InfoType = -1: Auto-reconnection counter (Fail recovery)

      // InfoType = -2: Component version number (e.g 2254 -> v2.2.5.4)

      // InfoType = -3: ScriptEZ.API library loading counter by client processes/applications

      // InfoType = -4: returns number of threads inside the current process

      // InfoType = -5: returns number of processors/cores onto a computer (since v2.32.4)

      // InfoType = -6: returns ProcessorType,

386 -> i386,

486 -> i486,

586 -> Pentium,

2200 -> Itanium,

8664 -> Core64 or AMD64

      // InfoType = -7: returns the number of open handles that belong to the current process (since v2.33.2)

      // InfoType = -8: returns 1 if Windows (2000 or above) needs to restart, 0 if no need to restart (since v2.38.2.7)

      // InfoType = -9: returns 1 if the current process is running as a service, 0 if as a regular application (since v2.38.4.1)

 

pVal

[out, retval] The returned value is a long value.

Return Values

S_OK

The operation was successfull.

E_POINTER

A NULL pointer was supplied as an argument.

E_UNEXPECTED

An unexpected error occoured.

See Also

IAPI