DXIsBadWritePtr function

Verifies that the calling process has write access to the specified range of memory.

Syntax

BOOL DXIsBadWritePtr(
  _In_ void *pMem,
  _In_ UINT Size
);

Parameters

  • pMem [in]
    A pointer to a write buffer.

  • Size [in]
    A value of type UINT that specifies the size of the write buffer.

Return value

Returns TRUE if the calling process has write 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 write access to the specified range of memory, 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

DXIsBadInterfacePtr