Differences
This shows you the differences between two versions of the page.
| en:docs:win16:api:kernel:localhandle [2023/05/01 10:44] – created prokushev | en:docs:win16:api:kernel:localhandle [2026/03/04 06:17] (current) – prokushev | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{page> | {{page> | ||
| - | ====== | + | ====== |
| + | ==== Brief ==== | ||
| + | Retrieves the handle associated with a given pointer to a local memory object. | ||
| - | ===== Brief ===== | + | ==== Syntax |
| + | <code c>HLOCAL WINAPI LocalHandle( | ||
| + | LPCVOID pMem | ||
| + | );</ | ||
| - | ===== Syntax ===== | + | ==== Parameters |
| - | ===== Parameters ===== | + | pMem – Pointer to a memory block inside the local heap (returned by LocalLock). |
| - | ===== Return | + | ==== Return |
| - | ===== Notes ===== | + | Returns the handle of the object, or NULL if the pointer does not belong to the local heap. Call GetLastError. |
| - | ===== Example Code ===== | + | ==== Notes ==== |
| - | ==== C Binding ==== | + | This function is the inverse of LocalLock. |
| + | Useful when you only have a pointer and need the handle for other operations (e.g., LocalFlags, LocalSize). | ||
| + | |||
| + | ==== Example Code ==== | ||
| + | ==== C Binding ==== | ||
| + | <code c>HLOCAL h = LocalHandle(pData);</ | ||
| ==== MASM Binding ==== | ==== MASM Binding ==== | ||
| + | <code asm>push p | ||
| + | call LocalHandle</ | ||
| + | |||
| + | ==== See also ==== | ||
| + | |||
| + | * [[LocalLock]] | ||
| - | ===== See also ===== | ||
| {{page> | {{page> | ||




