Microsoft DirectX 8.1 (C++)

Assertion Checking

Use assertion checking liberally. Assertions can verify assumptions that you make in your code about preconditions and postconditions. DirectShow provides several assertion macros. For more information, see Assert and Breakpoint Macros.

For example, a pin class might contain a private method that assumes the pin is connected. You can test this assumption with an assertion, as follows:

ASSERT(IsConnected());  // Pin must be connected.