PssWalkSnapshot function

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

Syntax

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

Parameters

SnapshotHandle

A handle to the snapshot.

InformationClass

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

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.

Buffer

The snapshot information that this function returns.

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

   
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