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
- iNFINITE :: DWORD
- sleep :: DWORD -> IO ()
- type ProcessId = DWORD
- type ProcessHandle = HANDLE
- type ProcessAccessRights = DWORD
- pROCESS_ALL_ACCESS :: ProcessAccessRights
- pROCESS_CREATE_PROCESS :: ProcessAccessRights
- pROCESS_CREATE_THREAD :: ProcessAccessRights
- pROCESS_DUP_HANDLE :: ProcessAccessRights
- pROCESS_QUERY_INFORMATION :: ProcessAccessRights
- pROCESS_SET_QUOTA :: ProcessAccessRights
- pROCESS_SET_INFORMATION :: ProcessAccessRights
- pROCESS_TERMINATE :: ProcessAccessRights
- pROCESS_VM_OPERATION :: ProcessAccessRights
- pROCESS_VM_READ :: ProcessAccessRights
- pROCESS_VM_WRITE :: ProcessAccessRights
- openProcess :: ProcessAccessRights -> BOOL -> ProcessId -> IO ProcessHandle
- getProcessId :: ProcessHandle -> IO ProcessId
- getCurrentProcessId :: IO ProcessId
- getCurrentProcess :: IO ProcessHandle
- terminateProcessById :: ProcessId -> IO ()
- type Th32SnapHandle = HANDLE
- type Th32SnapFlags = DWORD
- tH32CS_SNAPALL :: Th32SnapFlags
- tH32CS_SNAPHEAPLIST :: Th32SnapFlags
- tH32CS_SNAPMODULE :: Th32SnapFlags
- tH32CS_SNAPMODULE32 :: Th32SnapFlags
- tH32CS_SNAPMODULE64 :: Th32SnapFlags
- tH32CS_SNAPPROCESS :: Th32SnapFlags
- tH32CS_SNAPTHREAD :: Th32SnapFlags
- type ProcessEntry32 = (ProcessId, Int, ProcessId, LONG, String)
- type ModuleEntry32 = (ForeignAddress, Int, HMODULE, String, String)
- createToolhelp32Snapshot :: Th32SnapFlags -> Maybe ProcessId -> IO Th32SnapHandle
- withTh32Snap :: Th32SnapFlags -> Maybe ProcessId -> (Th32SnapHandle -> IO a) -> IO a
- th32SnapEnumProcesses :: Th32SnapHandle -> IO [ProcessEntry32]
- th32SnapEnumModules :: Th32SnapHandle -> IO [ModuleEntry32]
Sleeping
Processes pperations
type ProcessHandle = HANDLE Source #
type ProcessAccessRights = DWORD Source #
openProcess :: ProcessAccessRights -> BOOL -> ProcessId -> IO ProcessHandle Source #
getProcessId :: ProcessHandle -> IO ProcessId Source #
Terminating
terminateProcessById :: ProcessId -> IO () Source #
Toolhelp32
type Th32SnapHandle = HANDLE Source #
type Th32SnapFlags = DWORD Source #
type ProcessEntry32 = (ProcessId, Int, ProcessId, LONG, String) Source #
ProcessId, number of threads, parent ProcessId, process base priority, path of executable file
type ModuleEntry32 = (ForeignAddress, Int, HMODULE, String, String) Source #
createToolhelp32Snapshot :: Th32SnapFlags -> Maybe ProcessId -> IO Th32SnapHandle Source #
Create a snapshot of specified resources. Call closeHandle to close snapshot.
withTh32Snap :: Th32SnapFlags -> Maybe ProcessId -> (Th32SnapHandle -> IO a) -> IO a Source #
th32SnapEnumProcesses :: Th32SnapHandle -> IO [ProcessEntry32] Source #
Enumerate processes using Process32First and Process32Next
th32SnapEnumModules :: Th32SnapHandle -> IO [ModuleEntry32] Source #
Enumerate moduless using Module32First and Module32Next