DXIsBadInterfacePtr function

Verifies that the calling process has read access to the specified interface pointer.

Syntax

BOOL DXIsBadInterfacePtr(
  _In_ const IUnknown *pUnknown
);

Parameters

  • pUnknown [in]
    A pointer to an IUnknown interface.

Return value

Returns TRUE if the calling process has read access and the application is compiled as a debugging version, or FALSE otherwise.

Remarks

If the application is compiled as a debugging version and the calling process does not have read access to the specified interface pointer, then the function causes an assertion and breaks into the debugger.

Combinations of two compiler directives, defining _DEBUG and defining DXTRANS_NOROBUST, determine whether this function has an effect at run time. This function verifies access to the memory range according to the following table.

#define _DEBUG #define DXTRANS_NOROBUST Pointer verified
Yes Yes Yes
Yes No Yes
No Yes No
No No Yes

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Dxhelper.h

See also

Reference

DXIsBadReadPtr

DXIsBadWritePtr