ulCommand (ULONG) - input

      Command

      DosPerfSysCall accepts the following command:

      CMD_KI_RDCNT (0x63)

        Read CPU utilization information in both uniprocessor and symmetric multi-processor (SMP) environments by taking a snapshot of the time stamp counters. To determine CPU utilization, the application must compute the difference between two time stamp snapshots using 64-bit arithmetic. See the example code for details.

      ulParm1 (ULONG) - in/out

        Command specific parameter 1

        Parameter usage depends on the command specified:

        CMD_KI_RDCNT

          Pointer to an array of CPUUTIL structures, with one entry for each processor. On a 4-way SMP machine, the array definition would be:
            CPUUTIL CPUUtil[4];   /* For processor IDs 0, 1, 2, and 3 */

          since processor numbers and arrays are both 0-based. ulParm1 would be set to the address of CPUUtil[0].

          ulParm2 and ulParm3 are not used and should be set to zero.

        ulParm2 (ULONG) - in/out

          Command specific parameter 2

          Parameter usage depends on the command specified:

          CMD_KI_RDCNT

            0 (reserved)

          ulParm3 (ULONG) - in/out

            Command specific parameter 3

            Parameter usage depends on the command specified:

            CMD_KI_RDCNT

              0 (reserved)

            ulrc (APIRET) - returns

              Return Code.

              DosPerfSysCall returns one of the following values:

            • NO_ERROR 1
                ERROR_INVALID_FUNCTION
              For a full list of error codes, see Errors.


            [Back] [Next]