INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Visual Eiffel Library.", "Win32 API: Memory management functions"
project: "Visual Eiffel Win32 Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: winlib
class WAPI_MEMORY_MANAGEMENT_FUNCTIONS
inherit

WAPI_ERROR_SERVER
end
feature -- Access

GlobalAlloc (uflags: BIT 32; dwbytes: INTEGER): INTEGER
-- The GlobalAlloc function allocates the specified number of bytes
-- from the heap.

GlobalFlags (hmem: INTEGER): BIT 32
-- The GlobalFlags function returns information about
-- the specified global memory object.

GlobalFree (hmem: INTEGER)
-- The 'GlobalFree' function frees the specified global memory object
-- and invalidates its handle.

GlobalHandle (pmem: POINTER): INTEGER
-- The 'GlobalHandle' function retrieves the handle associated
-- with the specified pointer to a global memory block.

GlobalLock (hmem: INTEGER): POINTER
-- The 'GlobalLock' function locks a global memory object and returns
-- a pointer to the first byte of the object's memory block.
-- The memory block associated with a locked memory object
-- cannot be moved or discarded. For memory objects allocated
-- with the GMEM_MOVEABLE flag, the function increments
-- the lock count associated with the memory object.

GlobalReAlloc (hmem: INTEGER; dwbytes: INTEGER; uflags: BIT 32): INTEGER
-- The 'GlobalReAlloc' function changes the size or attributes
-- of a specified global memory object. The size can increase or decrease.

GlobalSize (hmem: INTEGER): INTEGER
-- The 'GlobalSize' function retrieves the current size, in bytes,
-- of the specified global memory object.

GlobalUnlock (hmem: INTEGER): BOOLEAN
-- The 'GlobalUnlock' function decrements the lock count associated
-- with a memory object that was allocated with the GMEM_MOVEABLE flag.
-- This function has no effect on memory objects allocated
-- with the GMEM_FIXED flag.
-- Result indicates whether the object is still locked.

LocalAlloc (fuflags: BIT 32; cbbytes: INTEGER): INTEGER
-- The 'LocalAlloc' procedure allocates the specified number of bytes
-- from the heap. In the linear Win32 API environment, there
-- is no difference between the local heap and the global heap.

LocalFree (hlocmem: INTEGER)
-- The 'LocalFree' procedure frees the specified local memory object and
-- invalidates its handle.

LocalLock (hlocmem: INTEGER): POINTER
-- The 'LocalLock' procedure locks a local memory object and returns
-- a pointer to the first byte of the object's memory block. The memory
-- block associated with a locked memory object cannot be moved or
-- discarded. For memory objects allocated with the LMEM_MOVEABLE flag,
-- the procedure increments the object's lock count.

LocalUnlock (hlocmem: INTEGER)
-- The 'LocalUnlock' procedure decrements the lock count associated with
-- a memory object that was allocated with the LMEM_MOVEABLE flag.
-- This procedure has no effect on memory objects allocated with the
-- LMEM_FIXED flag.

frozen VirtualAlloc (p: POINTER; size: INTEGER; alloc_type, protect: BIT 32): POINTER
-- The `VirtualAlloc' function reserves or commits a region of pages in the
-- virtual address space of the calling process. Memory allocated by this
-- function is automatically initialized to zero.

frozen VirtualFree (p: POINTER; size: INTEGER; free_type: BIT 32)
-- The `VirtualFree' function releases or decommits (or both) a region of
-- pages within the virtual address space of the calling process.
require
correct_p: p /= default_pointer

frozen VirtualQuery (lpaddress: POINTER; lpbuffer: POINTER; dwlength: INTEGER): INTEGER
-- The `VirtualQuery' function provides information about a range of
-- pages in the virtual address space of the calling process
require
correct_lpaddress: lpaddress /= default_pointer
correct_lpbuffer: lpbuffer /= default_pointer
feature -- Implementation

wGlobalAlloc (uflags: BIT 32; dwbytes: INTEGER): INTEGER

wGlobalFlags (hmem: INTEGER): BIT 32

wGlobalFree (hmem: INTEGER): INTEGER

wGlobalHandle (pmem: POINTER): INTEGER

wGlobalLock (hmem: INTEGER): POINTER

wGlobalReAlloc (hmem: INTEGER; dwbytes: INTEGER; uflags: BIT 32): INTEGER

wGlobalSize (hmem: INTEGER): INTEGER

wGlobalUnlock (hmem: INTEGER): INTEGER

wLocalAlloc (fuflags: BIT 32; cbbytes: INTEGER): INTEGER

wLocalFree (hlocmem: INTEGER): INTEGER

wLocalLock (hlocmem: INTEGER): POINTER

wLocalUnlock (hlocmem: INTEGER): INTEGER
end -- class WAPI_MEMORY_MANAGEMENT_FUNCTIONS

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES