System.Win32.Info.Computer

Win32-2.6.1.0: A binding to part of the Win32 library

Copyright | 2012-2013 shelarcy
License | BSD-style
Maintainer | shelarcy@gmail.com
Stability | Provisional
Portability | Non-portable (Win32 API)
Safe Haskell | Safe
Language | Haskell2010

System.Win32.Info.Computer

Contents

- Environment Strings
- Computer Name
- System metrics
- User name
- Version Info
- Processor features

Description

Information about your computer.

Synopsis

- expandEnvironmentStrings :: String -> IO String
- c_ExpandEnvironmentStrings :: LPCTSTR -> LPTSTR -> DWORD -> IO DWORD
- getComputerName :: IO String
- setComputerName :: String -> IO ()
- c_GetComputerName :: LPTSTR -> LPDWORD -> IO Bool
- c_SetComputerName :: LPTSTR -> IO Bool
- getSystemMetrics :: SMSetting -> IO Int
- sM_CMONITORS :: SMSetting
- sM_IMMENABLED :: SMSetting
- sM_MOUSEWHEELPRESENT :: SMSetting
- sM_REMOTESESSION :: SMSetting
- sM_SAMEDISPLAYFORMAT :: SMSetting
- sM_XVIRTUALSCREEN :: SMSetting
- sM_YVIRTUALSCREEN :: SMSetting
- sM_SERVERR2 :: SMSetting
- sM_MEDIACENTER :: SMSetting
- sM_STARTER :: SMSetting
- sM_TABLETPC :: SMSetting
- getUserName :: IO String
- c_GetUserName :: LPTSTR -> LPDWORD -> IO Bool
- data OSVERSIONINFOEX = OSVERSIONINFOEX {
  - dwMajorVersion :: DWORD
  - dwMinorVersion :: DWORD
  - dwBuildNumber :: DWORD
  - dwPlatformId :: DWORD
  - szCSDVersion :: String
  - wServicePackMajor :: WORD
  - wServicePackMinor :: WORD
  - wSuiteMask :: WORD
  - wProductType :: ProductType
  }
- type POSVERSIONINFOEX = Ptr OSVERSIONINFOEX
- type LPOSVERSIONINFOEX = Ptr OSVERSIONINFOEX
- data ProductType
  - = VerUnknow BYTE
  - | VerNTWorkStation
  - | VerNTDomainControler
  - | VerNTServer
- getVersionEx :: IO OSVERSIONINFOEX
- c_GetVersionEx :: LPOSVERSIONINFOEX -> IO BOOL
- type ProcessorFeature = DWORD
- isProcessorFeaturePresent :: ProcessorFeature -> IO BOOL
- pF_3DNOW_INSTRUCTIONS_AVAILABLE :: ProcessorFeature
- pF_COMPARE_EXCHANGE_DOUBLE :: ProcessorFeature
- pF_FLOATING_POINT_EMULATED :: ProcessorFeature
- pF_FLOATING_POINT_PRECISION_ERRATA :: ProcessorFeature
- pF_MMX_INSTRUCTIONS_AVAILABLE :: ProcessorFeature
- pF_PAE_ENABLED :: ProcessorFeature
- pF_RDTSC_INSTRUCTION_AVAILABLE :: ProcessorFeature
- pF_XMMI_INSTRUCTIONS_AVAILABLE :: ProcessorFeature
- pF_XMMI64_INSTRUCTIONS_AVAILABLE :: ProcessorFeature

# Environment Strings

expandEnvironmentStrings :: String -> IO String Source #

c_ExpandEnvironmentStrings :: LPCTSTR -> LPTSTR -> DWORD -> IO DWORD Source #

# Computer Name

getComputerName :: IO String Source #

setComputerName :: String -> IO () Source #

c_GetComputerName :: LPTSTR -> LPDWORD -> IO Bool Source #

c_SetComputerName :: LPTSTR -> IO Bool Source #

# System metrics

getSystemMetrics :: SMSetting -> IO Int Source #

sM_CMONITORS :: SMSetting Source #

sM_IMMENABLED :: SMSetting Source #

sM_MOUSEWHEELPRESENT :: SMSetting Source #

sM_REMOTESESSION :: SMSetting Source #

sM_SAMEDISPLAYFORMAT :: SMSetting Source #

sM_XVIRTUALSCREEN :: SMSetting Source #

sM_YVIRTUALSCREEN :: SMSetting Source #

sM_SERVERR2 :: SMSetting Source #

sM_MEDIACENTER :: SMSetting Source #

sM_STARTER :: SMSetting Source #

sM_TABLETPC :: SMSetting Source #

# User name

getUserName :: IO String Source #

Get user name. See: https://github.com/haskell/win32/issues/8, http://lpaste.net/41521

c_GetUserName :: LPTSTR -> LPDWORD -> IO Bool Source #

# Version Info

data OSVERSIONINFOEX Source #

Constructors

OSVERSIONINFOEX |
Fields dwMajorVersion :: DWORD dwMinorVersion :: DWORD dwBuildNumber :: DWORD dwPlatformId :: DWORD szCSDVersion :: String wServicePackMajor :: WORD wServicePackMinor :: WORD wSuiteMask :: WORD wProductType :: ProductType

Instances

Show OSVERSIONINFOEX # |
Instance details Methods showsPrec :: Int -> OSVERSIONINFOEX -> ShowS Source # show :: OSVERSIONINFOEX -> String Source # showList :: [OSVERSIONINFOEX] -> ShowS Source #
Storable OSVERSIONINFOEX # |
Instance details Methods sizeOf :: OSVERSIONINFOEX -> Int Source # alignment :: OSVERSIONINFOEX -> Int Source # peekElemOff :: Ptr OSVERSIONINFOEX -> Int -> IO OSVERSIONINFOEX Source # pokeElemOff :: Ptr OSVERSIONINFOEX -> Int -> OSVERSIONINFOEX -> IO () Source # peekByteOff :: Ptr b -> Int -> IO OSVERSIONINFOEX Source # pokeByteOff :: Ptr b -> Int -> OSVERSIONINFOEX -> IO () Source # peek :: Ptr OSVERSIONINFOEX -> IO OSVERSIONINFOEX Source # poke :: Ptr OSVERSIONINFOEX -> OSVERSIONINFOEX -> IO () Source #

type POSVERSIONINFOEX = Ptr OSVERSIONINFOEX Source #

type LPOSVERSIONINFOEX = Ptr OSVERSIONINFOEX Source #

data ProductType Source #

Constructors

VerUnknow BYTE |
VerNTWorkStation |
VerNTDomainControler |
VerNTServer |

Instances

Eq ProductType # |
Instance details Methods (==) :: ProductType -> ProductType -> Bool # (/=) :: ProductType -> ProductType -> Bool #
Show ProductType # |
Instance details Methods showsPrec :: Int -> ProductType -> ShowS Source # show :: ProductType -> String Source # showList :: [ProductType] -> ShowS Source #
Storable ProductType # |
Instance details Methods sizeOf :: ProductType -> Int Source # alignment :: ProductType -> Int Source # peekElemOff :: Ptr ProductType -> Int -> IO ProductType Source # pokeElemOff :: Ptr ProductType -> Int -> ProductType -> IO () Source # peekByteOff :: Ptr b -> Int -> IO ProductType Source # pokeByteOff :: Ptr b -> Int -> ProductType -> IO () Source # peek :: Ptr ProductType -> IO ProductType Source # poke :: Ptr ProductType -> ProductType -> IO () Source #

getVersionEx :: IO OSVERSIONINFOEX Source #

c_GetVersionEx :: LPOSVERSIONINFOEX -> IO BOOL Source #

# Processor features

type ProcessorFeature = DWORD Source #

isProcessorFeaturePresent :: ProcessorFeature -> IO BOOL Source #

pF_3DNOW_INSTRUCTIONS_AVAILABLE :: ProcessorFeature Source #

pF_COMPARE_EXCHANGE_DOUBLE :: ProcessorFeature Source #

pF_FLOATING_POINT_EMULATED :: ProcessorFeature Source #

pF_FLOATING_POINT_PRECISION_ERRATA :: ProcessorFeature Source #

pF_MMX_INSTRUCTIONS_AVAILABLE :: ProcessorFeature Source #

pF_PAE_ENABLED :: ProcessorFeature Source #

pF_RDTSC_INSTRUCTION_AVAILABLE :: ProcessorFeature Source #

pF_XMMI_INSTRUCTIONS_AVAILABLE :: ProcessorFeature Source #

pF_XMMI64_INSTRUCTIONS_AVAILABLE :: ProcessorFeature Source #