System.Win32.Utils

Copyright 2009 Balazs Komuves 2013 shelarcy
License BSD-style
Maintainer [email protected]
Stability Provisional
Portability Non-portable (Win32 API)
Safe Haskell Safe-Inferred
Language Haskell2010

Contents

Description

Utilities for calling Win32 API

try :: String -> (LPTSTR -> UINT -> IO UINT) -> UINT -> IO String

Support for API calls that are passed a fixed-size buffer and tell you via the return value if the buffer was too small. In that case, we extend the buffer size and try again.

tryWithoutNull :: String -> (LPTSTR -> UINT -> IO UINT) -> UINT -> IO String

try' :: Storable a => String -> (Ptr a -> PDWORD -> IO BOOL) -> DWORD -> IO [a]

Maybe values

maybePtr :: Maybe (Ptr a) -> Ptr a

ptrToMaybe :: Ptr a -> Maybe (Ptr a)

maybeNum :: Num a => Maybe a -> a

numToMaybe :: (Eq a, Num a) => a -> Maybe a

peekMaybe :: Storable a => Ptr a -> IO (Maybe a)

See also: maybePeek function.

withMaybe :: Storable a => Maybe a -> (Ptr a -> IO b) -> IO b

See also: maybeWith function.

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.10.2/docs/html/libraries/Win32-2.6.1.0/System-Win32-Utils.html