[KERNEL32]
[reactos.git] / reactos / dll / win32 / kernel32 / client / console / vista.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * PURPOSE: Vista functions
5 * PROGRAMMERS: Thomas Weidenmueller (w3seek@reactos.com)
6 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7 */
8
9 /* INCLUDES *******************************************************************/
10
11 #include <k32.h>
12
13 #define NDEBUG
14 #include <debug.h>
15
16
17 /* PUBLIC FUNCTIONS ***********************************************************/
18
19 #if _WIN32_WINNT >= 0x600
20
21 /*
22 * @implemented
23 */
24 BOOL
25 WINAPI
26 DECLSPEC_HOTPATCH
27 GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo)
28 {
29 NTSTATUS Status;
30 CONSOLE_API_MESSAGE ApiMessage;
31 PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &ApiMessage.Data.HistoryInfoRequest;
32
33 if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO))
34 {
35 SetLastError(ERROR_INVALID_PARAMETER);
36 return FALSE;
37 }
38
39 Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
40 NULL,
41 CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetHistory),
42 sizeof(CONSOLE_GETSETHISTORYINFO));
43 if (!NT_SUCCESS(Status))
44 {
45 BaseSetLastNTError(Status);
46 return FALSE;
47 }
48
49 lpConsoleHistoryInfo->HistoryBufferSize = HistoryInfoRequest->HistoryBufferSize;
50 lpConsoleHistoryInfo->NumberOfHistoryBuffers = HistoryInfoRequest->NumberOfHistoryBuffers;
51 lpConsoleHistoryInfo->dwFlags = HistoryInfoRequest->dwFlags;
52
53 return TRUE;
54 }
55
56
57 /*
58 * @implemented
59 */
60 BOOL
61 WINAPI
62 DECLSPEC_HOTPATCH
63 SetConsoleHistoryInfo(IN PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo)
64 {
65 NTSTATUS Status;
66 CONSOLE_API_MESSAGE ApiMessage;
67 PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &ApiMessage.Data.HistoryInfoRequest;
68
69 if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO))
70 {
71 SetLastError(ERROR_INVALID_PARAMETER);
72 return FALSE;
73 }
74
75 HistoryInfoRequest->HistoryBufferSize = lpConsoleHistoryInfo->HistoryBufferSize;
76 HistoryInfoRequest->NumberOfHistoryBuffers = lpConsoleHistoryInfo->NumberOfHistoryBuffers;
77 HistoryInfoRequest->dwFlags = lpConsoleHistoryInfo->dwFlags;
78
79 Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
80 NULL,
81 CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetHistory),
82 sizeof(CONSOLE_GETSETHISTORYINFO));
83 if (!NT_SUCCESS(Status))
84 {
85 BaseSetLastNTError(Status);
86 return FALSE;
87 }
88
89 return TRUE;
90 }
91
92
93 /*
94 * @unimplemented
95 */
96 DWORD
97 WINAPI
98 DECLSPEC_HOTPATCH
99 GetConsoleOriginalTitleW(OUT LPWSTR lpConsoleTitle,
100 IN DWORD nSize)
101 {
102 DPRINT1("GetConsoleOriginalTitleW(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize);
103 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
104 return 0;
105 }
106
107
108 /*
109 * @unimplemented
110 */
111 DWORD
112 WINAPI
113 DECLSPEC_HOTPATCH
114 GetConsoleOriginalTitleA(OUT LPSTR lpConsoleTitle,
115 IN DWORD nSize)
116 {
117 DPRINT1("GetConsoleOriginalTitleA(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize);
118 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
119 return 0;
120 }
121
122
123 /*
124 * @unimplemented
125 */
126 BOOL
127 WINAPI
128 DECLSPEC_HOTPATCH
129 GetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput,
130 OUT PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx)
131 {
132 DPRINT1("GetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx);
133 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
134 return FALSE;
135 }
136
137
138 /*
139 * @unimplemented
140 */
141 BOOL
142 WINAPI
143 DECLSPEC_HOTPATCH
144 SetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput,
145 IN PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx)
146 {
147 DPRINT1("SetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx);
148 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
149 return FALSE;
150 }
151
152
153 /*
154 * @unimplemented
155 */
156 BOOL
157 WINAPI
158 DECLSPEC_HOTPATCH
159 GetCurrentConsoleFontEx(IN HANDLE hConsoleOutput,
160 IN BOOL bMaximumWindow,
161 OUT PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx)
162 {
163 DPRINT1("GetCurrentConsoleFontEx(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, lpConsoleCurrentFontEx);
164 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
165 return FALSE;
166 }
167
168 #endif
169
170 /* EOF */