1
2
3
4
5
6 public extern cdecl nothrow ulong OsAllocateMemoryPage(ulong pageSize);
7 public extern cdecl nothrow bool OsFreeMemoryPage(ulong pageAddress);
8 public extern cdecl nothrow void OsCopyMemoryPage(ulong fromAddress, ulong toAddress, ulong pageSize);
9 public extern cdecl nothrow void OsWriteMemoryByte(ulong address, byte b);
10 public extern cdecl nothrow byte OsReadMemoryByte(ulong address);
11 public extern cdecl nothrow void* OsGetStdHandle(int stdInOutOrErr);
12 public extern cdecl nothrow bool OsRegisterConsoleCallback(void* consoleInputHandle, ulong callBackValue);
13 public extern cdecl nothrow bool OsReadConsoleInput(void* consoleInputHandle, uchar* c);
14 public extern cdecl nothrow bool OsGetConsoleScreenBufferInfo(void* consoleOutputHandle, int* cursorPosX, int* cursorPosY, int* screenSizeX, int* screenSizeY, ushort* attrs);
15 public extern cdecl nothrow bool OsSetConsoleCursorPosition(void* consoleOutputHandle, int cursorPosX, int cursorPosY);
16 public extern cdecl nothrow bool OsSetConsoleTextAttribute(ushort attrs);
17 public extern cdecl nothrow void* OsCreateConsoleOutputHandle();
18 public extern cdecl nothrow bool OsWriteConsole(void* consoleOutputHandle, const uchar* chars);
19 public extern cdecl nothrow void* OsCreateHostFile(const char* filePath, bool randomAccess);
20 public extern cdecl nothrow void* OsOpenHostFile(const char* filePath, bool randomAccess);
21 public extern cdecl nothrow void OsCloseHostFile(void* fileHandle);
22 public extern cdecl nothrow void* OsCreateIoCompletionPort();
23 public extern cdecl nothrow void* OsAssociateFileWithCompletionPort(void* fileHandle, void* completionPort, ulong completionKey);
24 public extern cdecl nothrow void OsCloseIoCompletionPort(void* completionPortHandle);
25 public extern cdecl nothrow bool OsGetQueuedCompletionStatus(void* completionPortHandle, ulong* numberOfBytes, ulong* completionKey, void** overlapped);
26 public extern cdecl nothrow bool OsPostQueuedCompletionStatus(void* completionPortHandle, ulong numberOfBytes, ulong completionKey);
27 public extern cdecl nothrow void* OsCreateOverlapped(ulong offset);
28 public extern cdecl nothrow void OsDestroyOverlapped(void* overlapped);
29 public extern cdecl nothrow bool OsReadFile(void* fileHandle, void* buffer, uint numberOfBytesToRead, void* overlapped);
30 public extern cdecl nothrow bool OsWriteFile(void* fileHandle, void* buffer, uint numberOfBytesToWrite, void* overlapped);
31 public extern cdecl nothrow void* OsCreateEvent();
32 public extern cdecl nothrow void OsSetEvent(void* eventHandle);
33 public extern cdecl nothrow void OsResetEvent(void* eventHandle);
34 public extern cdecl nothrow void OsWaitEvent(void* eventHandle);
35 public extern cdecl nothrow void OsCloseEvent(void* eventHandle);
36 public extern cdecl nothrow int OsWaitForMultipleObjects(uint count, void** handles);
37 public extern cdecl nothrow void* OsConvertThreadToFiber(void* param);
38 public extern cdecl nothrow void* OsCreateFiber(ulong stackSize, void* startAddress, void* param);
39 public extern cdecl nothrow void OsSwitchToFiber(void* fiber);
40 public extern cdecl nothrow void* OsGetFiberData();
41 public extern cdecl nothrow void OsDeleteFiber(void* fiber);
42 public extern cdecl nothrow ulong OsGetLastError();
43 public extern cdecl nothrow void OsFormatMessage(ulong errorCode, char* buffer);
44 public extern cdecl nothrow bool OsGetLogicalDrives(char* buffer, int bufSize);
45 public extern cdecl nothrow uint OsGetDriveType(const char* rootPathName);
46 public extern cdecl nothrow long OsGetFileSize(void* fileHandle);
47 public extern cdecl nothrow uint OsGetFileAttributes(const char* filePath);
48 public extern cdecl nothrow void* OsFindFirstFile(const char* pathMask, char* fileName);
49 public extern cdecl nothrow bool OsFindNextFile(void* findHandle, char* fileName);
50 public extern cdecl nothrow void OsFindClose(void* findHandle);
51 public extern cdecl nothrow bool OsGetFileTimes(const char* filePath, byte* ctime, byte* mtime, byte* atime);
52 public extern cdecl nothrow bool OsGetComputerName(char* buffer, int size);
53 public extern cdecl nothrow int OsGetMaxComputerNameLength();