GetLastEventInformation method

The GetLastEventInformation method returns information about the last event that occurred in a target.

Syntax

HRESULT GetLastEventInformation(
  [out]           PULONG Type,
  [out]           PULONG ProcessId,
  [out]           PULONG ThreadId,
  [out, optional] PVOID  ExtraInformation,
  [in]            ULONG  ExtraInformationSize,
  [out, optional] PULONG ExtraInformationUsed,
  [out, optional] PSTR   Description,
  [in]            ULONG  DescriptionSize,
  [out, optional] PULONG DescriptionUsed
);

Parameters

Type

Receives the type of the last event generated by the target. For a list of possible types, see DEBUG_EVENT_XXX.

ProcessId

Receives the process ID of the process in which the event occurred. If this information is not available, DEBUG_ANY_ID will be returned instead.

ThreadId

Receives the thread index (not the thread ID) of the thread in which the last event occurred. If this information is not available, DEBUG_ANY_ID will be returned instead.

ExtraInformation

Receives extra information about the event. The contents of this extra information depends on the type of the event. If ExtraInformation is NULL, this information is not returned.

ExtraInformationSize

Specifies the size, in bytes, of the buffer that ExtraInformation specifies.

ExtraInformationUsed

Receives the size, in bytes, of extra information. If ExtraInformationUsed is NULL, this information is not returned.

Description

Receives the description of the event. If Description is NULL, this information is not returned.

DescriptionSize

Specifies the size, in characters, of the buffer that Description specifies.

DescriptionUsed

Receives the size in characters of the description of the event. If DescriptionUsed is NULL, this information is not returned.

Return Value

This method may also return error values. See Return Values for more details.

Return code Description
S_OK
The method was successful.
S_FALSE
The method was successful. However, either ExtraInformationSize or DescriptionSize were smaller that the size of the respective data or string and the data or string was truncated to fit inside the buffer.

Remarks

For thread and process creation events, the thread index and process ID returned to ThreadId and ProcessId are for the newly created thread or process.

For more information about the last event, see the topic Event Information.

Requirements

   
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)
Library dbgeng.h

See Also

IDebugControl

IDebugControl3

GetStoredEventInformation

IDebugControl2

Send comments about this topic to Microsoft