Expand Minimize

EncodePointer function

Encodes the specified pointer. Encoded pointers can be used to provide another layer of protection for pointer values.

Syntax


PVOID EncodePointer(
  _In_  PVOID Ptr
);

Parameters

Ptr [in]

The pointer to be encoded.

Return value

The function returns the encoded pointer.

Remarks

Encoding globally available pointers helps protect them from being exploited. The EncodePointer function obfuscates the pointer value with a secret so that it cannot be predicted by an external agent. The secret used by EncodePointer is different for each process.

A pointer must be decoded before it can be used.

Windows Phone 8: This API is supported.

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008, Windows Server 2003 with SP1 [desktop apps | Windows Store apps]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

DecodePointer
EncodeSystemPointer

 

 

Community Additions

ADD
Show:
© 2014 Microsoft