Kernel32LocalFree Method
Frees the specified local memory object and invalidates its handle.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("Kernel32.dll", SetLastError := true>]
Public Shared Function LocalFree (
ByRef refMemObj As IntPtr
) As IntPtr
Dim refMemObj As IntPtr
Dim returnValue As IntPtr
returnValue = Kernel32.LocalFree(refMemObj)
public:
[DllImportAttribute(L"Kernel32.dll", SetLastError = true)]
static IntPtr LocalFree(
IntPtr% refMemObj
)
[<DllImportAttribute("Kernel32.dll", SetLastError = true)>]
static member LocalFree :
refMemObj : IntPtr byref -> IntPtr
No code example is currently available or this language may not be supported.
- 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.
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.