Win32-2.13.3.0: A binding to Windows Win32 API.
Copyright2013 shelarcy
LicenseBSD-style
Maintainershelarcy@gmail.com
StabilityProvisional
PortabilityNon-portable (Win32 API)
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Win32.WindowsString.String

Description

Utilities for primitive marshalling of Windows' C strings.

Synopsis

Documentation

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.