[commit: packages/Win32] Mistuke-fix-build, depend-os-windows, fix-appveyor-curl-ussue, master, win32-2.5.4.1-ghc-8.2, win32-prepare-release-2.4.0.0: Adds getShortPathName binding (1813e24)
git at git.haskell.org
git at git.haskell.org
Mon Apr 17 21:27:35 UTC 2017
- Previous message: [commit: packages/Win32] Mistuke-fix-build, depend-os-windows, fix-appveyor-curl-ussue, master, win32-2.5.4.1-ghc-8.2, win32-prepare-release-2.4.0.0: Adds getLongPathName binding (07d2c09)
- Next message: [commit: packages/Win32] Mistuke-fix-build, depend-os-windows, fix-appveyor-curl-ussue, master, win32-2.5.4.1-ghc-8.2, win32-prepare-release-2.4.0.0: updated changelog (de743fd)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Repository : ssh://git@git.haskell.org/Win32
On branches: Mistuke-fix-build,depend-os-windows,fix-appveyor-curl-ussue,master,win32-2.5.4.1-ghc-8.2,win32-prepare-release-2.4.0.0
Link : http://git.haskell.org/packages/Win32.git/commitdiff/1813e24a54c545363c63d95e414ba464c7a31bd4
>---------------------------------------------------------------
commit 1813e24a54c545363c63d95e414ba464c7a31bd4
Author: Nick Partridge <nkpart at gmail.com>
Date: Wed Jul 20 11:30:09 2016 +1000
Adds getShortPathName binding
>---------------------------------------------------------------
1813e24a54c545363c63d95e414ba464c7a31bd4
System/Win32/Info.hsc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/System/Win32/Info.hsc b/System/Win32/Info.hsc
index 536744f..f9df863 100644
--- a/System/Win32/Info.hsc
+++ b/System/Win32/Info.hsc
@@ -125,6 +125,12 @@ getLongPathName name = do
try "getLongPathName"
(c_GetLongPathName c_name) 512
+getShortPathName :: FilePath -> IO FilePath
+getShortPathName name = do
+ withTString name $ \ c_name ->
+ try "getShortPathName"
+ (c_GetShortPathName c_name) 512
+
searchPath :: Maybe String -> FilePath -> String -> IO (Maybe FilePath)
searchPath path filename ext =
maybe ($ nullPtr) withTString path $ \p_path ->
@@ -170,6 +176,9 @@ foreign import WINDOWS_CCONV unsafe "GetFullPathNameW"
foreign import WINDOWS_CCONV unsafe "GetLongPathNameW"
c_GetLongPathName :: LPCTSTR -> LPTSTR -> DWORD -> IO DWORD
+foreign import WINDOWS_CCONV unsafe "GetShortPathNameW"
+ c_GetShortPathName :: LPCTSTR -> LPTSTR -> DWORD -> IO DWORD
+
foreign import WINDOWS_CCONV unsafe "SearchPathW"
c_SearchPath :: LPCTSTR -> LPCTSTR -> LPCTSTR -> DWORD -> LPTSTR -> Ptr LPTSTR
-> IO DWORD
- Previous message: [commit: packages/Win32] Mistuke-fix-build, depend-os-windows, fix-appveyor-curl-ussue, master, win32-2.5.4.1-ghc-8.2, win32-prepare-release-2.4.0.0: Adds getLongPathName binding (07d2c09)
- Next message: [commit: packages/Win32] Mistuke-fix-build, depend-os-windows, fix-appveyor-curl-ussue, master, win32-2.5.4.1-ghc-8.2, win32-prepare-release-2.4.0.0: updated changelog (de743fd)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ghc-commits
mailing list