Menu

The Handles tests ensure that an application does not attempt to use invalid handles. This includes the following checks:

  • Ensures that handles are valid when passed to APIs that take a handle. If a NULL value or an INVALID_HANDLE_VALUE value is passed, the handle is clearly invalid and further investigation is necessary.

  • Ensures that TLS indexes passed to TLS functions are valid.

  • Ensures that APIs are not called with handles that have been closed.

  • Following is a list of verifier stops that may occur when running the Handles verifier against a solution or project on different platforms:

Error message

Stop code

Invalid handle exception for current stack trace

0300

Invalid TLS index used in current stack

0301

Invalid parameters for WaitForMultipleObjects call

0302

NULL handle passed as parameter. A valid handle must be used

0303

Waiting on a thread handle in DllMain

0304

Incorrect object type for handle

0305

Properties

There is one property that you can change for the Handles check:

Traces - Enter in the amount of handle traces to be saved. For example 1024 will save 1k handle traces.