Click to Rate and Give Feedback
MSDN
MSDN Library
Development Guides
Developer Notes
System
Pointers
 EncodePointer Function

  Switch on low bandwidth view
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

Minimum supported clientWindows Vista, Windows XP with SP2
Minimum supported serverWindows Server 2008, Windows Server 2003 with SP1
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

DecodePointer
EncodeSystemPointer


Send comments about this topic to Microsoft

Build date: 1/22/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Not properly guarded      JChung2007   |   Edit   |   Show History
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
Application Compatibility      NZSchoolTech   |   Edit   |   Show History
If an application is incompatible with the use of these functions, set its compatibility settings to "Windows 2000".
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker