-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwindows_wrappers.c
More file actions
37 lines (28 loc) · 1.2 KB
/
Copy pathwindows_wrappers.c
File metadata and controls
37 lines (28 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <windows.h>
int bobatea_SetConsoleOutputCP(unsigned int code_page_id) {
return SetConsoleOutputCP(code_page_id) != 0;
}
unsigned int bobatea_GetConsoleOutputCP(void) {
return (unsigned int)(GetConsoleOutputCP());
}
int bobatea_SetConsoleCP(unsigned int code_page_id) {
return SetConsoleCP(code_page_id) != 0;
}
unsigned int bobatea_GetConsoleCP(void) {
return (unsigned int)(GetConsoleCP());
}
int bobatea_ReadConsoleInput(HANDLE hConsoleInput, PINPUT_RECORD lpBuffer, unsigned int nLength, unsigned int *lpNumberOfEventsRead) {
return ReadConsoleInputW(hConsoleInput, lpBuffer, (DWORD)nLength, (LPDWORD)lpNumberOfEventsRead) != 0;
}
int bobatea_GetNumberOfConsoleInputEvents(HANDLE hConsoleInput, unsigned int *lpcNumberOfEvents) {
return GetNumberOfConsoleInputEvents(hConsoleInput, (LPDWORD)lpcNumberOfEvents) != 0;
}
int bobatea_GetConsoleScreenBufferInfo(HANDLE handle, CONSOLE_SCREEN_BUFFER_INFO *info) {
return GetConsoleScreenBufferInfo(handle, info) != 0;
}
int bobatea_GetConsoleMode(HANDLE handle, unsigned int *mode) {
return GetConsoleMode(handle, (LPDWORD)mode) != 0;
}
int bobatea_SetConsoleMode(HANDLE handle, unsigned int mode) {
return SetConsoleMode(handle, (DWORD)mode) != 0;
}