aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-06-12 21:50:10 +0200
committerGitHub <noreply@github.com>2024-06-12 21:50:10 +0200
commit05972eb26bc1ba3ae2c067ca8fd4e39e623143b8 (patch)
treec71713c05c542e1ac992257c1deffa3a435c061b
parent4ccc473e97178cfebb429b8cdc493572d78ad18b (diff)
parenta804463a575b2b543d8494402a3cdb9621a3bcc6 (diff)
Merge pull request #3746 from jasonKercher/add-commtimeouts
add COMMTIMEOUTS, get/setCommTimeouts
-rwxr-xr-x[-rw-r--r--]core/sys/windows/kernel32.odin13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/sys/windows/kernel32.odin b/core/sys/windows/kernel32.odin
index 16b6fa244..3c60cfc43 100644..100755
--- a/core/sys/windows/kernel32.odin
+++ b/core/sys/windows/kernel32.odin
@@ -1153,6 +1153,19 @@ foreign kernel32 {
SetCommState :: proc(handle: HANDLE, dcb: ^DCB) -> BOOL ---
}
+COMMTIMEOUTS :: struct {
+ ReadIntervalTimeout: DWORD,
+ ReadTotalTimeoutMultiplier: DWORD,
+ ReadTotalTimeoutConstant: DWORD,
+ WriteTotalTimeoutMultiplier: DWORD,
+ WriteTotalTimeoutConstant: DWORD,
+}
+
+@(default_calling_convention="system")
+foreign kernel32 {
+ GetCommTimeouts :: proc(handle: HANDLE, timeouts: ^COMMTIMEOUTS) -> BOOL ---
+ SetCommTimeouts :: proc(handle: HANDLE, timeouts: ^COMMTIMEOUTS) -> BOOL ---
+}
LPFIBER_START_ROUTINE :: #type proc "system" (lpFiberParameter: LPVOID)