summary refs log tree commit diff stats
path: root/lib/windows/winlean.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2014-07-15 01:42:19 +0200
committerAndreas Rumpf <rumpf_a@web.de>2014-07-15 01:42:19 +0200
commit18ded6c23d72cd21fa0aa10ff61dc6f9af40832c (patch)
tree5d681c9835f01019e8ae83e14c0cd49d1a6c0d38 /lib/windows/winlean.nim
parent687a1b7de4c006750274fb046a10f08d38c22f5a (diff)
parent41bb0bf9dcccdfcebdb0f823fea8b2853b89ea4e (diff)
downloadNim-18ded6c23d72cd21fa0aa10ff61dc6f9af40832c.tar.gz
Merge pull request #1363 from Araq/devel
Merge devel into master
Diffstat (limited to 'lib/windows/winlean.nim')
-rw-r--r--lib/windows/winlean.nim16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/windows/winlean.nim b/lib/windows/winlean.nim
index 4ce2f11b4..dcae6ffaf 100644
--- a/lib/windows/winlean.nim
+++ b/lib/windows/winlean.nim
@@ -639,9 +639,9 @@ proc unmapViewOfFile*(lpBaseAddress: pointer): WINBOOL {.stdcall,
     dynlib: "kernel32", importc: "UnmapViewOfFile".}
 
 type
-  TOVERLAPPED* {.final, pure.} = object
-    Internal*: DWORD
-    InternalHigh*: DWORD
+  TOVERLAPPED* {.pure, inheritable.} = object
+    Internal*: PULONG
+    InternalHigh*: PULONG
     Offset*: DWORD
     OffsetHigh*: DWORD
     hEvent*: THANDLE
@@ -718,4 +718,12 @@ proc WSASend*(s: TSocketHandle, buf: ptr TWSABuf, bufCount: DWORD,
   stdcall, importc: "WSASend", dynlib: "Ws2_32.dll".}
 
 proc get_osfhandle*(fd:TFileHandle): THandle {.
-  importc:"_get_osfhandle", header:"<io.h>".}
+  importc: "_get_osfhandle", header:"<io.h>".}
+
+proc getSystemTimes*(lpIdleTime, lpKernelTime, 
+                     lpUserTime: var TFILETIME): WINBOOL {.stdcall,
+  dynlib: "kernel32", importc: "GetSystemTimes".}
+
+proc getProcessTimes*(hProcess: THandle; lpCreationTime, lpExitTime,
+  lpKernelTime, lpUserTime: var TFILETIME): WINBOOL {.stdcall,
+  dynlib: "kernel32", importc: "GetProcessTimes".}