summary refs log tree commit diff stats
path: root/lib/windows/winlean.nim
diff options
context:
space:
mode:
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".}