Commits (12)
......@@ -56,7 +56,7 @@ foreign import WINDOWS_CCONV unsafe "windows.h DeleteObject"
type PenStyle = INT
#{enum PenStyle, // Pick one of these
#{enum PenStyle,
, pS_SOLID = PS_SOLID // default
, pS_DASH = PS_DASH // -------
, pS_DOT = PS_DOT // .......
......@@ -69,14 +69,14 @@ type PenStyle = INT
, pS_STYLE_MASK = PS_STYLE_MASK // all the above
}
#{enum PenStyle , // "or" with one of these
#{enum PenStyle,
, pS_ENDCAP_ROUND = PS_ENDCAP_ROUND // default
, pS_ENDCAP_SQUARE = PS_ENDCAP_SQUARE
, pS_ENDCAP_FLAT = PS_ENDCAP_FLAT
, pS_ENDCAP_MASK = PS_ENDCAP_MASK // all the above
}
#{enum PenStyle, // "or" with one of these
#{enum PenStyle,
, pS_JOIN_ROUND = PS_JOIN_ROUND // default
, pS_JOIN_BEVEL = PS_JOIN_BEVEL
, pS_JOIN_MITER = PS_JOIN_MITER
......@@ -87,7 +87,7 @@ If PS_JOIN_MASK is not defined with your GNU Windows32 header files,
you'll have to define it.
-}
#{enum PenStyle, // "or" with one of these
#{enum PenStyle,
, pS_COSMETIC = PS_COSMETIC // default
, pS_GEOMETRIC = PS_GEOMETRIC
, pS_TYPE_MASK = PS_TYPE_MASK // all the above
......
......@@ -52,8 +52,13 @@ foreign import WINDOWS_CCONV unsafe "windows.h GetLayeredWindowAttributes"
foreign import WINDOWS_CCONV unsafe "windows.h UpdateLayeredWindow"
c_UpdateLayeredWindow :: HANDLE -> HDC -> Ptr POINT -> Ptr SIZE -> HDC -> Ptr POINT -> COLORREF -> Ptr BLENDFUNCTION -> DWORD -> IO BOOL
#if defined(x86_64_HOST_ARCH)
foreign import WINDOWS_CCONV "windows.h GetWindowLongPtrW"
c_GetWindowLongPtr :: HANDLE -> INT -> IO LONG_PTR
#else
foreign import WINDOWS_CCONV "windows.h GetWindowLongW"
c_GetWindowLongPtr :: HANDLE -> INT -> IO LONG_PTR
#endif
#{enum DWORD,
, uLW_ALPHA = ULW_ALPHA
......
......@@ -446,23 +446,23 @@ foreign import WINDOWS_CCONV unsafe "windows.h TrackPopupMenuEx"
-- Note: these 3 assume the flags don't include MF_BITMAP or MF_OWNERDRAW
-- (which are hidden by this interface)
appendMenu :: HMENU -> MenuFlag -> MenuID -> String -> IO ()
appendMenu :: HMENU -> MenuFlag -> MenuID -> Maybe String -> IO ()
appendMenu menu flags id_item name =
withTString name $ \ c_name ->
maybeWith withTString name $ \ c_name ->
failIfFalse_ "AppendMenu" $ c_AppendMenu menu flags id_item c_name
foreign import WINDOWS_CCONV unsafe "windows.h AppendMenuW"
c_AppendMenu :: HMENU -> UINT -> MenuID -> LPCTSTR -> IO Bool
insertMenu :: HMENU -> MenuItem -> MenuFlag -> MenuID -> String -> IO ()
insertMenu :: HMENU -> MenuItem -> MenuFlag -> MenuID -> Maybe String -> IO ()
insertMenu menu item flags id_item name =
withTString name $ \ c_name ->
maybeWith withTString name $ \ c_name ->
failIfFalse_ "InsertMenu" $ c_InsertMenu menu item flags id_item c_name
foreign import WINDOWS_CCONV unsafe "windows.h InsertMenuW"
c_InsertMenu :: HMENU -> UINT -> UINT -> MenuID -> LPCTSTR -> IO Bool
modifyMenu :: HMENU -> MenuItem -> MenuFlag -> MenuID -> String -> IO ()
modifyMenu :: HMENU -> MenuItem -> MenuFlag -> MenuID -> Maybe String -> IO ()
modifyMenu menu item flags id_item name =
withTString name $ \ c_name ->
maybeWith withTString name $ \ c_name ->
failIfFalse_ "ModifyMenu" $ c_ModifyMenu menu item flags id_item c_name
foreign import WINDOWS_CCONV unsafe "windows.h ModifyMenuW"
c_ModifyMenu :: HMENU -> UINT -> UINT -> MenuID -> LPCTSTR -> IO Bool
......
......@@ -128,11 +128,11 @@ type MBStatus = UINT
-- Note: if the error is ever raised, we're in a very sad way!
messageBox :: HWND -> String -> String -> MBStyle -> IO MBStatus
messageBox :: Maybe HWND -> String -> String -> MBStyle -> IO MBStatus
messageBox wnd text caption style =
withTString text $ \ c_text ->
withTString caption $ \ c_caption ->
failIfZero "MessageBox" $ c_MessageBox wnd c_text c_caption style
failIfZero "MessageBox" $ c_MessageBox (maybePtr wnd) c_text c_caption style
foreign import WINDOWS_CCONV safe "windows.h MessageBoxW"
c_MessageBox :: HWND -> LPCTSTR -> LPCTSTR -> MBStyle -> IO MBStatus
......
......@@ -23,6 +23,7 @@ import Control.Monad (liftM)
import Data.Maybe (fromMaybe)
import Data.Int (Int32)
import Foreign.ForeignPtr (withForeignPtr)
import Foreign.Marshal.Utils (maybeWith)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Ptr (FunPtr, Ptr, castFunPtrToPtr, castPtr, nullPtr)
import Foreign.Storable (pokeByteOff)
......@@ -474,24 +475,24 @@ endDeferWindowPos pos =
foreign import WINDOWS_CCONV unsafe "windows.h EndDeferWindowPos"
c_EndDeferWindowPos :: HDWP -> IO Bool
findWindow :: String -> String -> IO (Maybe HWND)
findWindow :: Maybe String -> Maybe String -> IO (Maybe HWND)
findWindow cname wname =
withTString cname $ \ c_cname ->
withTString wname $ \ c_wname ->
maybeWith withTString cname $ \ c_cname ->
maybeWith withTString wname $ \ c_wname ->
liftM ptrToMaybe $ c_FindWindow c_cname c_wname
{-# DEPRECATED findWindowByName "Use 'findWindow Nothing' instead." #-}
findWindowByName :: String -> IO (Maybe HWND)
findWindowByName wname = withTString wname $ \ c_wname ->
liftM ptrToMaybe $ c_FindWindow nullPtr c_wname
findWindowByName wname = findWindow Nothing $ Just wname
foreign import WINDOWS_CCONV unsafe "windows.h FindWindowW"
c_FindWindow :: LPCTSTR -> LPCTSTR -> IO HWND
findWindowEx :: HWND -> HWND -> String -> String -> IO (Maybe HWND)
findWindowEx :: Maybe HWND -> Maybe HWND -> Maybe String -> Maybe String -> IO (Maybe HWND)
findWindowEx parent after cname wname =
withTString cname $ \ c_cname ->
withTString wname $ \ c_wname ->
liftM ptrToMaybe $ c_FindWindowEx parent after c_cname c_wname
maybeWith withTString cname $ \ c_cname ->
maybeWith withTString wname $ \ c_wname ->
liftM ptrToMaybe $ c_FindWindowEx (maybePtr parent) (maybePtr after) c_cname c_wname
foreign import WINDOWS_CCONV unsafe "windows.h FindWindowExW"
c_FindWindowEx :: HWND -> HWND -> LPCTSTR -> LPCTSTR -> IO HWND
......
The `Win32` Package
=====================
[![Hackage](https://img.shields.io/hackage/v/Win32.svg)](https://hackage.haskell.org/package/Win32) [![Code Climate](https://codeclimate.com/github/haskell/win32/badges/gpa.svg)](https://codeclimate.com/github/haskell/win32) [![Test Coverage](https://codeclimate.com/github/haskell/win32/badges/coverage.svg)](https://codeclimate.com/github/haskell/win32/coverage) [![Issue Count](https://codeclimate.com/github/haskell/win32/badges/issue_count.svg)](https://codeclimate.com/github/haskell/win32) [![License] (https://img.shields.io/packagist/l/doctrine/orm.svg)]()
[![Hackage](https://img.shields.io/hackage/v/Win32.svg)](https://hackage.haskell.org/package/Win32) [![Code Climate](https://codeclimate.com/github/haskell/win32/badges/gpa.svg)](https://codeclimate.com/github/haskell/win32) [![Test Coverage](https://codeclimate.com/github/haskell/win32/badges/coverage.svg)](https://codeclimate.com/github/haskell/win32/coverage) [![Issue Count](https://codeclimate.com/github/haskell/win32/badges/issue_count.svg)](https://codeclimate.com/github/haskell/win32) [![PyPI](https://img.shields.io/pypi/l/Django.svg)]()
See [`Win32` on Hackage](http://hackage.haskell.org/package/Win32) for
more information.
......
......@@ -23,6 +23,7 @@ import System.Win32.Types
import Foreign
import Foreign.C
import Data.Maybe (fromMaybe)
##include "windows_cconv.h"
......@@ -87,10 +88,10 @@ loadLibraryEx name h flags =
foreign import WINDOWS_CCONV unsafe "windows.h LoadLibraryExW"
c_LoadLibraryEx :: LPCTSTR -> HANDLE -> LoadLibraryFlags -> IO HINSTANCE
setDllDirectory :: String -> IO ()
setDllDirectory :: Maybe String -> IO ()
setDllDirectory name =
withTString name $ \ c_name ->
failIfFalse_ (unwords ["SetDllDirectory", name]) $ c_SetDllDirectory c_name
maybeWith withTString name $ \ c_name ->
failIfFalse_ (unwords ["SetDllDirectory", fromMaybe "NULL" name]) $ c_SetDllDirectory c_name
foreign import WINDOWS_CCONV unsafe "windows.h SetDllDirectoryW"
c_SetDllDirectory :: LPTSTR -> IO BOOL
......@@ -376,10 +376,10 @@ moveFile src dest =
foreign import WINDOWS_CCONV unsafe "windows.h MoveFileW"
c_MoveFile :: LPCTSTR -> LPCTSTR -> IO Bool
moveFileEx :: String -> String -> MoveFileFlag -> IO ()
moveFileEx :: String -> Maybe String -> MoveFileFlag -> IO ()
moveFileEx src dest flags =
withTString src $ \ c_src ->
withTString dest $ \ c_dest ->
maybeWith withTString dest $ \ c_dest ->
failIfFalseWithRetry_ (unwords ["MoveFileEx",show src,show dest]) $
c_MoveFileEx c_src c_dest flags
foreign import WINDOWS_CCONV unsafe "windows.h MoveFileExW"
......@@ -609,9 +609,9 @@ foreign import WINDOWS_CCONV unsafe "windows.h FindClose"
-- DOS Device flags
----------------------------------------------------------------
defineDosDevice :: DefineDosDeviceFlags -> String -> String -> IO ()
defineDosDevice :: DefineDosDeviceFlags -> String -> Maybe String -> IO ()
defineDosDevice flags name path =
withTString path $ \ c_path ->
maybeWith withTString path $ \ c_path ->
withTString name $ \ c_name ->
failIfFalse_ "DefineDosDevice" $ c_DefineDosDevice flags c_name c_path
foreign import WINDOWS_CCONV unsafe "windows.h DefineDosDeviceW"
......@@ -661,10 +661,10 @@ getDiskFreeSpace path =
foreign import WINDOWS_CCONV unsafe "windows.h GetDiskFreeSpaceW"
c_GetDiskFreeSpace :: LPCTSTR -> Ptr DWORD -> Ptr DWORD -> Ptr DWORD -> Ptr DWORD -> IO Bool
setVolumeLabel :: String -> String -> IO ()
setVolumeLabel :: Maybe String -> Maybe String -> IO ()
setVolumeLabel path name =
withTString path $ \ c_path ->
withTString name $ \ c_name ->
maybeWith withTString path $ \ c_path ->
maybeWith withTString name $ \ c_name ->
failIfFalse_ "SetVolumeLabel" $ c_SetVolumeLabel c_path c_name
foreign import WINDOWS_CCONV unsafe "windows.h SetVolumeLabelW"
c_SetVolumeLabel :: LPCTSTR -> LPCTSTR -> IO Bool
......
......@@ -60,10 +60,10 @@ data VolumeInformation = VolumeInformation
, fileSystemName :: String
} deriving Show
getVolumeInformation :: String -> IO VolumeInformation
getVolumeInformation :: Maybe String -> IO VolumeInformation
getVolumeInformation drive =
withTString drive $ \c_drive ->
withTStringBufferLen 256 $ \(vnBuf, vnLen) ->
maybeWith withTString drive $ \c_drive ->
withTStringBufferLen 256 $ \(vnBuf, vnLen) ->
alloca $ \serialNum ->
alloca $ \maxLen ->
alloca $ \fsFlags ->
......
......@@ -21,7 +21,7 @@ module System.Win32.Info where
import Control.Exception (catch)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Utils (with)
import Foreign.Marshal.Utils (with, maybeWith)
import Foreign.Marshal.Array (allocaArray)
import Foreign.Ptr (Ptr, nullPtr)
import Foreign.Storable (Storable(..))
......@@ -132,11 +132,11 @@ getShortPathName name = do
try "getShortPathName"
(c_GetShortPathName c_name) 512
searchPath :: Maybe String -> FilePath -> String -> IO (Maybe FilePath)
searchPath :: Maybe String -> FilePath -> Maybe String -> IO (Maybe FilePath)
searchPath path filename ext =
maybe ($ nullPtr) withTString path $ \p_path ->
withTString filename $ \p_filename ->
withTString ext $ \p_ext ->
maybeWith withTString ext $ \p_ext ->
alloca $ \ppFilePart -> (do
s <- try "searchPath" (\buf len -> c_SearchPath p_path p_filename p_ext
len buf ppFilePart) 512
......
......@@ -65,7 +65,7 @@ import System.Win32.Utils ( tryWithoutNull )
import System.Win32.Word ( DWORD, LPDWORD )
#include <windows.h>
#include <Lmcons.h>
#include <lmcons.h>
#include "alignment.h"
##include "windows_cconv.h"
......
......@@ -23,7 +23,7 @@ module System.Win32.Registry
regCloseKey -- :: HKEY -> IO ()
, regConnectRegistry -- :: Maybe String -> HKEY -> IO HKEY
, regCreateKey -- :: HKEY -> String -> IO HKEY
, regCreateKeyEx -- :: HKEY -> String -> String
, regCreateKeyEx -- :: HKEY -> String -> Maybe String
-- -> RegCreateOptions -> REGSAM
-- -> Maybe LPSECURITY_ATTRIBUTES
-- -> IO (HKEY, Bool)
......@@ -39,10 +39,10 @@ module System.Win32.Registry
, regOpenKey -- :: HKEY -> String -> IO HKEY
, regOpenKeyEx -- :: HKEY -> String -> REGSAM -> IO HKEY
, regQueryInfoKey -- :: HKEY -> IO RegInfoKey
, regQueryValue -- :: HKEY -> Maybe String -> IO String
, regQueryValueKey -- :: HKEY -> Maybe String -> IO String
, regQueryValue -- :: HKEY -> String -> IO String
, regQueryValueKey -- :: HKEY -> String -> IO String
, regQueryValueEx -- :: HKEY -> String -> Addr -> Int -> IO RegValueType
, regReplaceKey -- :: HKEY -> String -> String -> String -> IO ()
, regReplaceKey -- :: HKEY -> Maybe String -> String -> String -> IO ()
, regRestoreKey -- :: HKEY -> String -> RegRestoreFlags -> IO ()
, regSaveKey -- :: HKEY -> String -> Maybe LPSECURITY_ATTRIBUTES -> IO ()
, regSetValue -- :: HKEY -> String -> String -> IO ()
......@@ -144,11 +144,11 @@ type REGSAM = #{type REGSAM}
, kEY_WRITE = KEY_WRITE
}
regCreateKeyEx :: HKEY -> String -> String -> RegCreateOptions -> REGSAM -> Maybe LPSECURITY_ATTRIBUTES -> IO (HKEY, Bool)
regCreateKeyEx :: HKEY -> String -> Maybe String -> RegCreateOptions -> REGSAM -> Maybe LPSECURITY_ATTRIBUTES -> IO (HKEY, Bool)
regCreateKeyEx key subkey cls opts sam mb_attr =
withForeignPtr key $ \ p_key ->
withTString subkey $ \ c_subkey ->
withTString cls $ \ c_cls ->
maybeWith withTString cls $ \ c_cls ->
alloca $ \ p_res ->
alloca $ \ p_disp -> do
failUnlessSuccess "RegCreateKeyEx" $
......@@ -387,10 +387,10 @@ foreign import WINDOWS_CCONV unsafe "windows.h RegQueryInfoKeyW"
-- (and better!) version of it. If you want RegQueryValue()s
-- behaviour, use regQueryValueKey.
regQueryValueKey :: HKEY -> Maybe String -> IO String
regQueryValueKey :: HKEY -> String -> IO String
regQueryValueKey key mb_subkey =
withForeignPtr key $ \ p_key ->
maybeWith withTString mb_subkey $ \ c_subkey ->
withTString mb_subkey $ \ c_subkey ->
alloca $ \ p_value_len -> do
failUnlessSuccess "RegQueryValue" $
c_RegQueryValue p_key c_subkey nullPtr p_value_len
......@@ -402,10 +402,10 @@ regQueryValueKey key mb_subkey =
foreign import WINDOWS_CCONV unsafe "windows.h RegQueryValueW"
c_RegQueryValue :: PKEY -> LPCTSTR -> LPTSTR -> Ptr LONG -> IO ErrCode
regQueryValue :: HKEY -> Maybe String -> IO String
regQueryValue :: HKEY -> String -> IO String
regQueryValue key mb_subkey =
withForeignPtr key $ \ p_key ->
maybeWith withTString mb_subkey $ \ c_subkey ->
withTString mb_subkey $ \ c_subkey ->
alloca $ \ p_ty ->
alloca $ \ p_value_len -> do
failUnlessSuccess "RegQueryValue" $
......@@ -430,10 +430,10 @@ regQueryValueEx key name value value_len =
foreign import WINDOWS_CCONV unsafe "windows.h RegQueryValueExW"
c_RegQueryValueEx :: PKEY -> LPCTSTR -> Ptr DWORD -> Ptr DWORD -> LPBYTE -> Ptr DWORD -> IO ErrCode
regReplaceKey :: HKEY -> String -> String -> String -> IO ()
regReplaceKey :: HKEY -> Maybe String -> String -> String -> IO ()
regReplaceKey key subkey newfile oldfile =
withForeignPtr key $ \ p_key ->
withTString subkey $ \ c_subkey ->
maybeWith withTString subkey $ \ c_subkey ->
withTString newfile $ \ c_newfile ->
withTString oldfile $ \ c_oldfile ->
failUnlessSuccess "RegReplaceKey" $
......
......@@ -53,12 +53,6 @@ type MapiFlag = ULONG
, mAPI_LOGON_UI = MAPI_LOGON_UI
, mAPI_NEW_SESSION = MAPI_NEW_SESSION
, mAPI_FORCE_DOWNLOAD = MAPI_FORCE_DOWNLOAD
#ifdef MAPI_LOGOFF_SHARED
, mAPI_LOGOFF_SHARED = MAPI_LOGOFF_SHARED
#endif
#ifdef MAPI_LOGOFF_UI
, mAPI_LOGOFF_UI = MAPI_LOGOFF_UI
#endif
, mAPI_DIALOG = MAPI_DIALOG
, mAPI_UNREAD_ONLY = MAPI_UNREAD_ONLY
, mAPI_LONG_MSGID = MAPI_LONG_MSGID
......@@ -74,6 +68,19 @@ type MapiFlag = ULONG
, mAPI_RECEIPT_REQUESTED = MAPI_RECEIPT_REQUESTED
, mAPI_SENT = MAPI_SENT
}
-- Have to define enum values outside previous declaration due to
-- hsc2hs bug in --cross-compile mode:
-- https://ghc.haskell.org/trac/ghc/ticket/13620
#ifdef MAPI_LOGOFF_SHARED
#{enum MapiFlag,
, mAPI_LOGOFF_SHARED = MAPI_LOGOFF_SHARED
}
#endif
#ifdef MAPI_LOGOFF_UI
#{enum MapiFlag,
, mAPI_LOGOFF_UI = MAPI_LOGOFF_UI
}
#endif
mapiErrors :: [(ULONG,String)]
mapiErrors =
......
......@@ -30,6 +30,7 @@ import Foreign ( Storable(sizeOf, alignment, peekByteOff, peek,
, with, alloca, allocaBytes, copyArray )
import Foreign.C ( CInt(..), CWchar(..)
, peekCWString, withCWStringLen, withCWString )
import Foreign.Marshal.Utils (maybeWith)
##include "windows_cconv.h"
#include <windows.h>
......@@ -305,10 +306,10 @@ type GetTimeFormatFlags = DWORD
foreign import WINDOWS_CCONV "windows.h GetTimeFormatW"
c_GetTimeFormat :: LCID -> GetTimeFormatFlags -> Ptr SYSTEMTIME -> LPCTSTR -> LPTSTR -> CInt -> IO CInt
getTimeFormat :: LCID -> GetTimeFormatFlags -> SYSTEMTIME -> String -> IO String
getTimeFormat :: LCID -> GetTimeFormatFlags -> Maybe SYSTEMTIME -> Maybe String -> IO String
getTimeFormat locale flags st fmt =
with st $ \c_st ->
withCWString fmt $ \c_fmt -> do
maybeWith with st $ \c_st ->
maybeWith withCWString fmt $ \c_fmt -> do
size <- c_GetTimeFormat locale flags c_st c_fmt nullPtr 0
allocaBytes ((fromIntegral size) * (sizeOf (undefined::CWchar))) $ \out -> do
size' <- failIf (==0) "getTimeFormat: GetTimeFormat" $
......
......@@ -209,6 +209,9 @@ nullHANDLE = nullPtr
type MbHANDLE = Maybe HANDLE
nullHINSTANCE :: HINSTANCE
nullHINSTANCE = nullPtr
type HINSTANCE = Ptr ()
type MbHINSTANCE = Maybe HINSTANCE
......
name: Win32
version: 2.5.3.0
version: 2.6.0.0
license: BSD3
license-file: LICENSE
author: Alastair Reid, shelarcy
copyright: Alastair Reid, 1999-2003; shelarcy, 2012-2013
author: Alastair Reid, shelarcy, Tamar Christina
copyright: Alastair Reid, 1999-2003; shelarcy, 2012-2013; Tamar Christina, 2016-2017
maintainer: Haskell Libraries <libraries@haskell.org>
bug-reports: https://github.com/haskell/win32/issues
homepage: https://github.com/haskell/win32
......@@ -11,13 +11,23 @@ category: System, Graphics
synopsis: A binding to part of the Win32 library
description: A binding to part of the Win32 library.
build-type: Simple
cabal-version: >=1.6
cabal-version: >=1.10
extra-source-files:
include/diatemp.h include/dumpBMP.h include/ellipse.h include/errors.h
include/Win32Aux.h include/win32debug.h include/alignment.h
changelog.md
Library
default-language: Haskell2010
default-extensions: ForeignFunctionInterface, CPP
if impl(ghc >= 7.1)
default-extensions: NondecreasingIndentation
if !os(windows)
-- This package requires Windows to build
build-depends: unbuildable<0
buildable: False
build-depends: base >= 4.5 && < 5, bytestring, filepath
ghc-options: -Wall -fno-warn-name-shadowing
cc-options: -fno-strict-aliasing
......@@ -90,9 +100,6 @@ Library
System.Win32.Utils
System.Win32.Word
extensions: ForeignFunctionInterface, CPP
if impl(ghc >= 7.1)
extensions: NondecreasingIndentation
extra-libraries:
"user32", "gdi32", "winmm", "advapi32", "shell32", "shfolder", "shlwapi", "msimg32", "imm32"
ghc-options: -Wall
......
......@@ -16,3 +16,6 @@ test_script:
- stack init
- stack setup > nul
- echo "" | stack --no-terminal build
install:
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
# Changelog for [`Win32` package](http://hackage.haskell.org/package/Win32)
## 2.6.0.0 *September 2017*
* Make cabal error out on compilation on non-Windows OSes. (See #80)
* Update cabal format to 1.10 and set language
default to Haskell2010. (See #81)
* Use `Maybe` in wrappers for functions with nullable pointer parameters (See #83)
* Improve cross compilation support. (See #87)
## 2.5.4.1 *April 2017*
* Fixed GetWindowLong on 32-bit Windows
## 2.5.3.0 *March 2017*
* Fix buffer overflow in `regSetValue`. (See #39)
......
......@@ -12,5 +12,5 @@ main = do
k3 <- regCreateKey k2 "GHC"
flip finally (regDeleteValue k3 name) $ do
regSetStringValue k3 name x
r <- regQueryValue k3 (Just name)
r <- regQueryValue k3 name
print r