W3cubDocs

/Haskell 9

System.Win32.WindowsString.Utils

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

Description

Utilities for calling Win32 API

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

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.

trySized :: String -> (LPTSTR -> CInt -> IO CInt) -> IO WindowsString Source

Support for API calls that return the required size, in characters including a null character, of the buffer when passed a buffer size of zero.

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

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

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

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

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

fromDateFormatPicture :: String -> Maybe String Source

Translate from a Windows API day, month, year, and era format picture to the closest corresponding format string used by formatTime.

fromTimeFormatPicture :: String -> Maybe String Source

Translate from a Windows API hours, minute, and second format picture to the closest corresponding format string used by formatTime.

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

See also: maybePeek function.

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

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

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/9.12.1/docs/libraries/Win32-2.14.1.0-d391/System-Win32-WindowsString-Utils.html