Kernel32LocalFree Method

Frees the specified local memory object and invalidates its handle.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static IntPtr LocalFree(
	ref IntPtr refMemObj
)

Parameters

refMemObj  IntPtr
A handle to the local memory object.

This handle is returned by either the LocalAlloc or LocalReAlloc function. Note that it is not safe to free memory allocated with GlobalAlloc.

Return Value

IntPtr
If the function succeeds, the return value is Zero.

If the function fails, the return value is equal to a handle to the local memory object.

To get extended error information, call GetLastWin32Error.

Remarks

See Also