|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| kernel32.lib
| Header File
| winbase.h
| Unicode
| No
| Platform Notes
| None
|
|
|
LocalFlags
The LocalFlags function returns information about the specified local memory object.
UINT LocalFlags(
HLOCAL hMem
| // handle of local memory object
| );
|
|
Parameters
hMem
Identifies the local memory object. This handle is returned by either the LocalAlloc or LocalReAlloc function.
Return Values
If the function succeeds, the return value is a 32-bit value that specifies
the allocation flags and the lock count for the memory object.
If the function fails, the return value is the LMEM_INVALID_HANDLE flag,
indicating that the local handle is not valid. To get extended error information,
call GetLastError.
Remarks
The low-order byte of the low-order word of the return value contains the lock
count of the object. To retrieve the lock count from the return value, use the
LMEM_LOCKCOUNT mask with the bitwise AND (&) operator. The lock count of
memory objects allocated with the LMEM_FIXED flag is always zero.
The high-order byte of the low-order word of the return value indicates the
allocation flags of the memory object. It can be zero or any combination of the
following flags:
Value
| Description
| LMEM_DISCARDABLE
| The object's memory block can be discarded.
| LMEM_DISCARDED
| The object's memory block has been discarded.
|
See Also
GlobalFlags, LocalAlloc, LocalDiscard, LocalLock, LocalReAlloc, LocalUnlock
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|