[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: Add getCurrentProcessId function (#56) (bcada7d)
git at git.haskell.org
git at git.haskell.org
Mon Apr 17 21:27:45 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: Put windows_cconv.h in install-includes (#55) (7f91a92)
- 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: Paths: Added new module and functions (#54) (b4c6102)
- 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/bcada7df8f846acc0fe0319f28d4745433a7cd84
>---------------------------------------------------------------
commit bcada7df8f846acc0fe0319f28d4745433a7cd84
Author: Alex Biehl <alexbiehl at gmail.com>
Date: Mon Oct 24 20:10:09 2016 +0200
Add getCurrentProcessId function (#56)
>---------------------------------------------------------------
bcada7df8f846acc0fe0319f28d4745433a7cd84
System/Win32/Process.hsc | 6 ++++++
changelog.md | 1 +
2 files changed, 7 insertions(+)
diff --git a/System/Win32/Process.hsc b/System/Win32/Process.hsc
index 7820f0f..e07403b 100644
--- a/System/Win32/Process.hsc
+++ b/System/Win32/Process.hsc
@@ -69,6 +69,12 @@ foreign import WINDOWS_CCONV unsafe "windows.h GetProcessId"
getProcessId :: ProcessHandle -> IO ProcessId
getProcessId h = failIfZero "GetProcessId" $ c_GetProcessId h
+foreign import WINDOWS_CCONV unsafe "windows.h GetCurrentProcessId"
+ c_GetCurrentProcessId :: IO ProcessId
+
+getCurrentProcessId :: IO ProcessId
+getCurrentProcessId = c_GetCurrentProcessId
+
type Th32SnapHandle = HANDLE
type Th32SnapFlags = DWORD
-- | ProcessId, number of threads, parent ProcessId, process base priority, path of executable file
diff --git a/changelog.md b/changelog.md
index 43e5bf4..a7eacd8 100644
--- a/changelog.md
+++ b/changelog.md
@@ -15,3 +15,4 @@
* Added function `getUserName`
* Added file attribute `fILE_ATTRIBUTE_REPARSE_POINT`
* Added more [`File Access Rights` constants](https://msdn.microsoft.com/en-us/library/windows/desktop/gg258116%28v=vs.85%29.aspx)
+* Added function `getCurrentProcessId`
- 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: Put windows_cconv.h in install-includes (#55) (7f91a92)
- 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: Paths: Added new module and functions (#54) (b4c6102)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ghc-commits
mailing list