diff options
| author | 2024-10-25 23:24:45 -0400 | |
|---|---|---|
| committer | 2024-10-25 23:24:45 -0400 | |
| commit | 36b6d84ee4b520bdf43891ea86df03cf660cb464 (patch) | |
| tree | 3aa78d9b1a3f04c0aeaaf86c8a60106115bf5c85 /os.h | |
| download | rt-36b6d84ee4b520bdf43891ea86df03cf660cb464.tar.gz rt-36b6d84ee4b520bdf43891ea86df03cf660cb464.zip | |
create project
Diffstat (limited to 'os.h')
| -rw-r--r-- | os.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +// SPDX-License-Identifier: ISC
+// SPDX-FileCopyrightText: 2024 Matthew Wozniak <me@woz.blue>
+
+#ifndef OS_H
+#define OS_H
+
+#include <Windows.h>
+#include "intdef.h"
+
+#define os_dlopen LoadLibraryA
+#define os_dlsym GetProcAddress
+
+inline bool os_mprot(void *mem, int len, int mode) {
+ ulong old;
+ return !!VirtualProtect(mem, len, mode, &old);
+}
+
+#endif
+
+// vi: sw=4 ts=4 noet tw=80 cc=80
|
