ca691dda2c821917fdba2c0bbd0473855a9f2417
[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 GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo)
27 {
28 NTSTATUS Status;
29 CONSOLE_API_MESSAGE ApiMessage;
30 PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &ApiMessage.Data.HistoryInfoRequest;
31
32 if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO))
33 {
34 SetLastError(ERROR_INVALID_PARAMETER);
35 return FALSE;
36 }
37
38 Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
39 NULL,
40 CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepGetHistory),
41 sizeof(CONSOLE_GETSETHISTORYINFO));
42 if (!NT_SUCCESS(Status))
43 {
44 BaseSetLastNTError(Status);
45 return FALSE;
46 }
47
48 lpConsoleHistoryInfo->HistoryBufferSize = HistoryInfoRequest->HistoryBufferSize;
49 lpConsoleHistoryInfo->NumberOfHistoryBuffers = HistoryInfoRequest->NumberOfHistoryBuffers;
50 lpConsoleHistoryInfo->dwFlags = HistoryInfoRequest->dwFlags;
51
52 return TRUE;
53 }
54
55
56 /*
57 * @implemented
58 */
59 BOOL
60 WINAPI
61 SetConsoleHistoryInfo(IN PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo)
62 {
63 NTSTATUS Status;
64 CONSOLE_API_MESSAGE ApiMessage;
65 PCONSOLE_GETSETHISTORYINFO HistoryInfoRequest = &ApiMessage.Data.HistoryInfoRequest;
66
67 if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO))
68 {
69 SetLastError(ERROR_INVALID_PARAMETER);
70 return FALSE;
71 }
72
73 HistoryInfoRequest->HistoryBufferSize = lpConsoleHistoryInfo->HistoryBufferSize;
74 HistoryInfoRequest->NumberOfHistoryBuffers = lpConsoleHistoryInfo->NumberOfHistoryBuffers;
75 HistoryInfoRequest->dwFlags = lpConsoleHistoryInfo->dwFlags;
76
77 Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
78 NULL,
79 CSR_CREATE_API_NUMBER(CONSRV_SERVERDLL_INDEX, ConsolepSetHistory),
80 sizeof(CONSOLE_GETSETHISTORYINFO));
81 if (!NT_SUCCESS(Status))
82 {
83 BaseSetLastNTError(Status);
84 return FALSE;
85 }
86
87 return TRUE;
88 }
89
90
91 /*
92 * @unimplemented
93 */
94 DWORD
95 WINAPI
96 GetConsoleOriginalTitleW(OUT LPWSTR lpConsoleTitle,
97 IN DWORD nSize)
98 {
99 DPRINT1("GetConsoleOriginalTitleW(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize);
100 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
101 return 0;
102 }
103
104
105 /*
106 * @unimplemented
107 */
108 DWORD
109 WINAPI
110 GetConsoleOriginalTitleA(OUT LPSTR lpConsoleTitle,
111 IN DWORD nSize)
112 {
113 DPRINT1("GetConsoleOriginalTitleA(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize);
114 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
115 return 0;
116 }
117
118
119 /*
120 * @unimplemented
121 */
122 BOOL
123 WINAPI
124 GetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput,
125 OUT PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx)
126 {
127 DPRINT1("GetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx);
128 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
129 return FALSE;
130 }
131
132
133 /*
134 * @unimplemented
135 */
136 BOOL
137 WINAPI
138 SetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput,
139 IN PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx)
140 {
141 DPRINT1("SetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx);
142 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
143 return FALSE;
144 }
145
146
147 /*
148 * @unimplemented
149 */
150 BOOL
151 WINAPI
152 GetCurrentConsoleFontEx(IN HANDLE hConsoleOutput,
153 IN BOOL bMaximumWindow,
154 OUT PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx)
155 {
156 DPRINT1("GetCurrentConsoleFontEx(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, lpConsoleCurrentFontEx);
157 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
158 return FALSE;
159 }
160
161 #endif
162
163 /* EOF */