PssWalkSnapshot function (processsnapshot.h)

Returns information from the current walk position and advanced the walk marker to the next position.

Syntax

DWORD PssWalkSnapshot(
  [in]  HPSS                       SnapshotHandle,
  [in]  PSS_WALK_INFORMATION_CLASS InformationClass,
  [in]  HPSSWALK                   WalkMarkerHandle,
  [out] void                       *Buffer,
  [in]  DWORD                      BufferLength
);

Parameters

[in] SnapshotHandle

A handle to the snapshot.

[in] InformationClass

The type of information to return. For more information, see PSS_WALK_INFORMATION_CLASS.

[in] WalkMarkerHandle

A handle to a walk marker. The walk marker indicates the walk position from which data is to be returned. PssWalkSnapshot advances the walk marker to the next walk position in time order before returning to the caller.

[out] Buffer

The snapshot information that this function returns.

[in] BufferLength

The size of Buffer, in bytes.

Return value

This function returns ERROR_SUCCESS on success or one of the following error codes.

Return code Description
ERROR_BAD_LENGTH
The specified buffer length is invalid.
ERROR_INVALID_HANDLE
The specified handle is invalid.
ERROR_INVALID_PARAMETER
The specified information class is invalid.
ERROR_MORE_DATA
Buffer is NULL, and there is data at the current position to return.
ERROR_NO_MORE_ITEMS
The walk has completed and there are no more items to return.
ERROR_NOT_FOUND
The requested information is not in the snapshot.
 

All error codes are defined in winerror.h. Use FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a message for an error code.

Remarks

For snapshot data types that have a variable number of instances within a snapshot, you use the PssWalkSnapshot function to obtain the instances one after another. You set the InformationClass parameter to specify the type of data.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header processsnapshot.h
DLL Kernel32.dll

See also

Process Snapshotting