Skip to content

Latest commit

 

History

History
92 lines (69 loc) · 2.97 KB

nf-winbase-localhandle.md

File metadata and controls

92 lines (69 loc) · 2.97 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winbase.LocalHandle
LocalHandle function (winbase.h)
Retrieves the handle associated with the specified pointer to a local memory object.
LocalHandle
LocalHandle function
_win32_localhandle
base.localhandle
winbase/LocalHandle
base\localhandle.htm
base
2b252f8b-d0a3-4d7f-9e2e-cb80c1512935
12/05/2018
LocalHandle, LocalHandle function, _win32_localhandle, base.localhandle, winbase/LocalHandle
winbase.h
Windows.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Kernel32.lib
Kernel32.dll
Windows
19H1
LocalHandle
winbase/LocalHandle
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
LocalHandle

LocalHandle function

-description

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.
 

-parameters

-param pMem [in]

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

-returns

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.

-see-also

Global and Local Functions

LocalAlloc

LocalLock

Memory Management Functions