Encodes the specified pointer with a system-specific value. Encoded pointers can be used to provide another layer of protection for pointer values.
Syntax
|
PVOID EncodeSystemPointer(
PVOID Ptr
);
|
Parameters
- Ptr
-
The system pointer to be encoded.
Return Value
The function returns the encoded pointer.
Remarks
Encoding globally available pointers helps protect them from being exploited. The EncodeSystemPointer function obfuscates the pointer value with a secret so that it cannot be predicted by an external agent. The secret used by EncodeSystemPointer is the same for each process on a given computer, and is known to all the processes on that computer.
A pointer must be decoded before it can be used.
Using EncodeSystemPointer/DecodeSystemPointer is faster than using EncodePointer/DecodePointer, but the encoded system pointers are more vulnerable to attack because the value can be predicted on a per-machine basis.
Requirements
| Client | Requires Windows Vista or Windows XP SP2. |
| Server | Requires Windows Server 2008 or Windows Server 2003 SP1. |
|---|
| Header | Declared in Winbase.h; include Windows.h. |
| Library | Use Kernel32.lib. |
| DLL | Requires Kernel32.dll. |
See Also
DecodeSystemPointer
EncodePointer
Send comments about this topic to Microsoft
Build date: 8/28/2008