aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/WindowsEnv/Registry.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-06-17 06:19:46 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-06-17 06:19:46 +0300
commit7620e6adb81607c939802c81bf8c068faf0211f8 (patch)
treea7bc89495f1984939e22de3626584b3b25666dd9 /src/WindowsEnv/Registry.hs
parentadd --version flag to executables (diff)
downloadwindows-env-7620e6adb81607c939802c81bf8c068faf0211f8.tar.gz
windows-env-7620e6adb81607c939802c81bf8c068faf0211f8.zip
use windows_cconv.h from Win32
Diffstat (limited to '')
-rw-r--r--src/WindowsEnv/Registry.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/WindowsEnv/Registry.hs b/src/WindowsEnv/Registry.hs
index 3121d9d..ba7cfc6 100644
--- a/src/WindowsEnv/Registry.hs
+++ b/src/WindowsEnv/Registry.hs
@@ -145,17 +145,17 @@ decodeString (valueType, valueData) = (valueType, T.unpack dropLastZero)
| otherwise = T.takeWhile (/= '\0') text
text = decodeUtf16LE valueData
-#include "ccall.h"
+#include "windows_cconv.h"
-- These aren't provided by Win32 (as of version 2.4.0.0).
-foreign import WINDOWS_ENV_CCALL unsafe "Windows.h RegQueryValueExW"
+foreign import WINDOWS_CCONV unsafe "Windows.h RegQueryValueExW"
c_RegQueryValueEx :: WinAPI.PKEY -> WinAPI.LPCTSTR -> WinAPI.LPDWORD -> WinAPI.LPDWORD -> WinAPI.LPBYTE -> WinAPI.LPDWORD -> IO WinAPI.ErrCode
-foreign import WINDOWS_ENV_CCALL unsafe "Windows.h RegSetValueExW"
+foreign import WINDOWS_CCONV unsafe "Windows.h RegSetValueExW"
c_RegSetValueEx :: WinAPI.PKEY -> WinAPI.LPCTSTR -> WinAPI.DWORD -> WinAPI.DWORD -> WinAPI.LPBYTE -> WinAPI.DWORD -> IO WinAPI.ErrCode
-foreign import WINDOWS_ENV_CCALL unsafe "Windows.h RegGetValueW"
+foreign import WINDOWS_CCONV unsafe "Windows.h RegGetValueW"
c_RegGetValue :: WinAPI.PKEY -> WinAPI.LPCTSTR -> WinAPI.LPCTSTR -> WinAPI.DWORD -> WinAPI.LPDWORD -> WinAPI.LPBYTE -> WinAPI.LPDWORD -> IO WinAPI.ErrCode
queryValue :: IsKeyPath a => a -> ValueName -> ExceptT IOError IO Value