ThreadTermination Event

Fires when a thread is being terminated.

Syntax

ANSI (Cross Platform)
virtual int FireThreadTermination(CBProcessThreadTerminationEventParams *e);
typedef struct {
int ProcessId;
int ThreadId;
int ResultCode; int reserved; } CBProcessThreadTerminationEventParams; Unicode (Windows) virtual INT FireThreadTermination(CBProcessThreadTerminationEventParams *e);
typedef struct {
INT ProcessId;
INT ThreadId;
INT ResultCode; INT reserved; } CBProcessThreadTerminationEventParams;
#define EID_CBPROCESS_THREADTERMINATION 7

virtual INT CBFSFILTER_CALL FireThreadTermination(INT &iProcessId, INT &iThreadId, INT &iResultCode);

Remarks

This event fires when a thread is being terminated.

Applications cannot prevent a thread from being terminated using this event; use the ThreadHandleOperation event instead.

The ProcessId parameter reflects the Id of process whose thread is being terminating.

The ThreadId parameter reflects the Id of the terminating thread.

The ResultCode parameter will always be 0 when the event is fired. If the event cannot be handled in a "successful" manner for some reason (e.g., a resource isn't available, security checks failed, etc.), set it to a non-zero value to report an appropriate error. Please refer to the Error Reporting and Handling topic for more information.

Note that the system APIs offer no way to report errors which occur during the processing of this request. Exceptional ResultCode values are therefore largely ignored.

This event is fired synchronously; please refer to the Event Types topic for more information.

Copyright (c) 2022 Callback Technologies, Inc. - All rights reserved.
CBFS Filter 2020 C++ Edition - Version 20.0 [Build 8317]