Debugging Tools for Windows
GetLastEventInformation
The GetLastEventInformation and GetLastEventInformationWide methods return information about the last event that occurred in a target.
HRESULT
IDebugControl::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
);
HRESULT
IDebugControl4::GetLastEventInformationWide(
OUT PULONG Type,
OUT PULONG ProcessId,
OUT PULONG ThreadId,
OUT OPTIONAL PVOID ExtraInformation,
IN ULONG ExtraInformationSize,
OUT OPTIONAL PULONG ExtraInformationUsed,
OUT OPTIONAL PWSTR Description,
IN ULONG DescriptionSize,
OUT OPTIONAL PULONG DescriptionUsed
);
#ifdef UNICODE
#define GetLastEventInformationT GetLastEventInformationWide
#else
#define GetLastEventInformationT GetLastEventInformation
#endif
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 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
- 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.
This method may also return error values. See Return Values for more details.
Interface Version
GetLastEventInformationWide is available in all versions of IDebugControl. GetLastEventInformationWideWide is available in IDebugControl4 and later versions.
Comments
For thread and process creation events, the thread ID 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
Headers: Defined in Dbgeng.h. Include Dbgeng.h.
See Also
GetStoredEventInformation