Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

LocalHandle function

Retrieves the handle associated with the specified pointer to a local memory object.

Note  The local functions have greater overhead and provide fewer features than other memory management functions. New applications should use the heap functions unless documentation states that a local function should be used. For more information, see Global and Local Functions.

Syntax


HLOCAL WINAPI LocalHandle(
  _In_  LPCVOID pMem
);

Parameters

pMem [in]

A pointer to the first byte of the local memory object. This pointer is returned by the LocalLock function.

Return value

If the function succeeds, the return value is a handle to the specified local memory object.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.

Remarks

When the LocalAlloc function allocates a local memory object with LMEM_MOVEABLE, it returns a handle to the object. The LocalLock function converts this handle into a pointer to the object's memory block, and LocalHandle converts the pointer back into a handle.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Global and Local Functions
LocalAlloc
LocalLock
Memory Management Functions

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.