Share via


CheckPointer (Compact 2013)

3/26/2014

This macro determines if a given pointer is NULL. If the pointer is NULL, CheckPointer returns a user-defined value.

Syntax

CheckPointer(
    p,
    ret
);

Parameters

  • p
    Pointer to check.
  • ret
    Value your function will return if p is NULL.

Remarks

The following examples shows how to call this macro.

HRESULT OneFunction(VOID *pSomeParameter)
{
    CheckPointer(pSomeParameter, E_INVALIDARG)
}
BOOL AnotherFunction(VOID *pSomeParameter)
{
    CheckPointer(pSomeParameter, FALSE)
}

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

Pointer Validation Macros