Click to Rate and Give Feedback
MSDN
MSDN Library
Development Guides
Developer Notes
System
Pointers
 EncodePointer Function
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.

Requirements

ClientRequires Windows Vista or Windows XP SP2.
ServerRequires Windows Server 2008 or Windows Server 2003 SP1.
HeaderDeclared in Winbase.h; include Windows.h.
LibraryUse Kernel32.lib.
DLLRequires Kernel32.dll.

See Also

DecodePointer
EncodeSystemPointer


Send comments about this topic to Microsoft

Build date: 9/25/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Not properly guarded      JChung2007   |   Edit   |  
EncodePointer and its related set of functions are not properly guarded with a _WIN32_WINNT >= 0x0501 #ifdef.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker