IDebugControl2::GetLastEventInformation method (dbgeng.h)

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

[out] Type

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

[out] 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.

[out] 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.

[out, optional] 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.

[in] ExtraInformationSize

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

[out, optional] ExtraInformationUsed

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

[out, optional] Description

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

[in] DescriptionSize

Specifies the size, in characters, of the buffer that Description specifies. This size includes the space for the '\0' terminating character.

[out, optional] DescriptionUsed

Receives the size in characters of the description of the event. This size includes the space for the '\0' terminating character. 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

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

GetStoredEventInformation

IDebugControl

IDebugControl2

IDebugControl3