System.Win32.WindowsString.String

Win32-2.14.0.0: A binding to Windows Win32 API.

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

System.Win32.WindowsString.String

Description

Utilities for primitive marshalling of Windows' C strings.

Synopsis

- type LPSTR = Ptr CChar
- type LPCSTR = LPSTR
- type LPWSTR = Ptr CWchar
- type LPCWSTR = LPWSTR
- type TCHAR = CWchar
- type LPTSTR = Ptr TCHAR
- type LPCTSTR = LPTSTR
- type LPCTSTR_ = LPCTSTR
- withTString :: WindowsString -> (LPTSTR -> IO a) -> IO a
- withTStringLen :: WindowsString -> ((LPTSTR, Int) -> IO a) -> IO a
- peekTString :: LPCTSTR -> IO WindowsString
- peekTStringLen :: (LPCTSTR, Int) -> IO WindowsString
- newTString :: WindowsString -> IO LPCTSTR
- withTStringBuffer :: Int -> (LPTSTR -> IO a) -> IO a
- withTStringBufferLen :: Int -> ((LPTSTR, Int) -> IO a) -> IO a

# Documentation

type LPSTR = Ptr CChar Source #

type LPCSTR = LPSTR Source #

type LPWSTR = Ptr CWchar Source #

type LPCWSTR = LPWSTR Source #

type TCHAR = CWchar Source #

type LPTSTR = Ptr TCHAR Source #

type LPCTSTR = LPTSTR Source #

type LPCTSTR_ = LPCTSTR Source #

withTString :: WindowsString -> (LPTSTR -> IO a) -> IO a Source #

withTStringLen :: WindowsString -> ((LPTSTR, Int) -> IO a) -> IO a Source #

peekTString :: LPCTSTR -> IO WindowsString Source #

peekTStringLen :: (LPCTSTR, Int) -> IO WindowsString Source #

newTString :: WindowsString -> IO LPCTSTR Source #

withTStringBuffer :: Int -> (LPTSTR -> IO a) -> IO a Source #

Marshal a dummy Haskell string into a NUL terminated C wide string using temporary storage.

- the Haskell string is created by length parameter. And the Haskell string contains only NUL characters.
- the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.

withTStringBufferLen :: Int -> ((LPTSTR, Int) -> IO a) -> IO a Source #

Marshal a dummy Haskell string into a C wide string (i.e. wide character array) in temporary storage, with explicit length information.

- the Haskell string is created by length parameter. And the Haskell string contains only NUL characters.
- the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.