Copyright | (c) Alastair Reid 1997-2003 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | Esa Ilari Vuokko <ei@vuokko.info> |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
A collection of FFI declarations for interfacing with Win32.
Synopsis
- data MEMORY_BASIC_INFORMATION = MEMORY_BASIC_INFORMATION {}
- copyMemory :: Ptr a -> Ptr a -> DWORD -> IO ()
- moveMemory :: Ptr a -> Ptr a -> DWORD -> IO ()
- fillMemory :: Ptr a -> DWORD -> BYTE -> IO ()
- zeroMemory :: Ptr a -> DWORD -> IO ()
- memset :: Ptr a -> CInt -> CSize -> IO ()
- getProcessHeap :: IO HANDLE
- getProcessHeaps :: DWORD -> Addr -> IO DWORD
- type HGLOBAL = Addr
- type GlobalAllocFlags = UINT
- gMEM_INVALID_HANDLE :: GlobalAllocFlags
- gMEM_FIXED :: GlobalAllocFlags
- gMEM_MOVEABLE :: GlobalAllocFlags
- gPTR :: GlobalAllocFlags
- gHND :: GlobalAllocFlags
- gMEM_DDESHARE :: GlobalAllocFlags
- gMEM_SHARE :: GlobalAllocFlags
- gMEM_LOWER :: GlobalAllocFlags
- gMEM_NOCOMPACT :: GlobalAllocFlags
- gMEM_NODISCARD :: GlobalAllocFlags
- gMEM_NOT_BANKED :: GlobalAllocFlags
- gMEM_NOTIFY :: GlobalAllocFlags
- gMEM_ZEROINIT :: GlobalAllocFlags
- globalAlloc :: GlobalAllocFlags -> DWORD -> IO HGLOBAL
- globalFlags :: HGLOBAL -> IO GlobalAllocFlags
- globalFree :: HGLOBAL -> IO HGLOBAL
- globalHandle :: Addr -> IO HGLOBAL
- globalLock :: HGLOBAL -> IO Addr
- globalReAlloc :: HGLOBAL -> DWORD -> GlobalAllocFlags -> IO HGLOBAL
- globalSize :: HGLOBAL -> IO DWORD
- globalUnlock :: HGLOBAL -> IO ()
- type HeapAllocFlags = DWORD
- hEAP_GENERATE_EXCEPTIONS :: HeapAllocFlags
- hEAP_NO_SERIALIZE :: HeapAllocFlags
- hEAP_ZERO_MEMORY :: HeapAllocFlags
- heapAlloc :: HANDLE -> HeapAllocFlags -> DWORD -> IO Addr
- heapCompact :: HANDLE -> HeapAllocFlags -> IO UINT
- heapCreate :: HeapAllocFlags -> DWORD -> DWORD -> IO HANDLE
- heapDestroy :: HANDLE -> IO ()
- heapFree :: HANDLE -> HeapAllocFlags -> Addr -> IO ()
- heapLock :: HANDLE -> IO ()
- heapReAlloc :: HANDLE -> HeapAllocFlags -> Addr -> DWORD -> IO Addr
- heapSize :: HANDLE -> HeapAllocFlags -> Addr -> IO DWORD
- heapUnlock :: HANDLE -> IO ()
- heapValidate :: HANDLE -> HeapAllocFlags -> Addr -> IO Bool
- virtualAlloc :: Addr -> DWORD -> VirtualAllocFlags -> ProtectFlags -> IO Addr
- virtualAllocEx :: HANDLE -> Addr -> DWORD -> VirtualAllocFlags -> ProtectFlags -> IO Addr
- type VirtualAllocFlags = DWORD
- mEM_COMMIT :: VirtualAllocFlags
- mEM_RESERVE :: VirtualAllocFlags
- virtualLock :: Addr -> DWORD -> IO ()
- virtualUnlock :: Addr -> DWORD -> IO ()
- virtualProtect :: Addr -> DWORD -> ProtectFlags -> IO ProtectFlags
- virtualProtectEx :: HANDLE -> Addr -> DWORD -> ProtectFlags -> IO ProtectFlags
- virtualQueryEx :: HANDLE -> LPVOID -> Ptr MEMORY_BASIC_INFORMATION -> SIZE_T -> IO DWORD
- type ProtectFlags = DWORD
- pAGE_READONLY :: ProtectFlags
- pAGE_READWRITE :: ProtectFlags
- pAGE_EXECUTE :: ProtectFlags
- pAGE_EXECUTE_READ :: ProtectFlags
- pAGE_EXECUTE_READWRITE :: ProtectFlags
- pAGE_GUARD :: ProtectFlags
- pAGE_NOACCESS :: ProtectFlags
- pAGE_NOCACHE :: ProtectFlags
- virtualFree :: Addr -> DWORD -> FreeFlags -> IO ()
- virtualFreeEx :: HANDLE -> Addr -> DWORD -> FreeFlags -> IO ()
- type FreeFlags = DWORD
- mEM_DECOMMIT :: FreeFlags
- mEM_RELEASE :: FreeFlags
Documentation
data MEMORY_BASIC_INFORMATION Source #
MEMORY_BASIC_INFORMATION | |
|
Instances
Show MEMORY_BASIC_INFORMATION Source # | |
Defined in System.Win32.Mem showsPrec :: Int -> MEMORY_BASIC_INFORMATION -> ShowS show :: MEMORY_BASIC_INFORMATION -> String showList :: [MEMORY_BASIC_INFORMATION] -> ShowS | |
Storable MEMORY_BASIC_INFORMATION Source # | |
Defined in System.Win32.Mem sizeOf :: MEMORY_BASIC_INFORMATION -> Int alignment :: MEMORY_BASIC_INFORMATION -> Int peekElemOff :: Ptr MEMORY_BASIC_INFORMATION -> Int -> IO MEMORY_BASIC_INFORMATION pokeElemOff :: Ptr MEMORY_BASIC_INFORMATION -> Int -> MEMORY_BASIC_INFORMATION -> IO () peekByteOff :: Ptr b -> Int -> IO MEMORY_BASIC_INFORMATION pokeByteOff :: Ptr b -> Int -> MEMORY_BASIC_INFORMATION -> IO () peek :: Ptr MEMORY_BASIC_INFORMATION -> IO MEMORY_BASIC_INFORMATION poke :: Ptr MEMORY_BASIC_INFORMATION -> MEMORY_BASIC_INFORMATION -> IO () |
copyMemory :: Ptr a -> Ptr a -> DWORD -> IO () Source #
moveMemory :: Ptr a -> Ptr a -> DWORD -> IO () Source #
fillMemory :: Ptr a -> DWORD -> BYTE -> IO () Source #
zeroMemory :: Ptr a -> DWORD -> IO () Source #
getProcessHeap :: IO HANDLE Source #
Global allocation
type GlobalAllocFlags = UINT Source #
globalAlloc :: GlobalAllocFlags -> DWORD -> IO HGLOBAL Source #
globalFlags :: HGLOBAL -> IO GlobalAllocFlags Source #
globalFree :: HGLOBAL -> IO HGLOBAL Source #
globalHandle :: Addr -> IO HGLOBAL Source #
globalLock :: HGLOBAL -> IO Addr Source #
globalReAlloc :: HGLOBAL -> DWORD -> GlobalAllocFlags -> IO HGLOBAL Source #
globalSize :: HGLOBAL -> IO DWORD Source #
globalUnlock :: HGLOBAL -> IO () Source #
Heap allocation
type HeapAllocFlags = DWORD Source #
heapCompact :: HANDLE -> HeapAllocFlags -> IO UINT Source #
heapCreate :: HeapAllocFlags -> DWORD -> DWORD -> IO HANDLE Source #
heapDestroy :: HANDLE -> IO () Source #
heapReAlloc :: HANDLE -> HeapAllocFlags -> Addr -> DWORD -> IO Addr Source #
heapUnlock :: HANDLE -> IO () Source #
heapValidate :: HANDLE -> HeapAllocFlags -> Addr -> IO Bool Source #
Virtual allocation
Allocation
virtualAlloc :: Addr -> DWORD -> VirtualAllocFlags -> ProtectFlags -> IO Addr Source #
virtualAllocEx :: HANDLE -> Addr -> DWORD -> VirtualAllocFlags -> ProtectFlags -> IO Addr Source #
type VirtualAllocFlags = DWORD Source #
Locking
virtualLock :: Addr -> DWORD -> IO () Source #
virtualUnlock :: Addr -> DWORD -> IO () Source #
Protection
virtualProtect :: Addr -> DWORD -> ProtectFlags -> IO ProtectFlags Source #
virtualProtectEx :: HANDLE -> Addr -> DWORD -> ProtectFlags -> IO ProtectFlags Source #
virtualQueryEx :: HANDLE -> LPVOID -> Ptr MEMORY_BASIC_INFORMATION -> SIZE_T -> IO DWORD Source #
type ProtectFlags = DWORD Source #