ReactOS 0.4.16-dev-1311-g81a4d83
alias.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: dll/win32/kernel32/client/console/alias.c
5 * PURPOSE: Win32 Console Client Alias support functions
6 * PROGRAMMERS: David Welch (welch@cwcom.net) (welch@mcmail.com)
7 * Christoph von Wittich (christoph_vw@reactos.org)
8 * Johannes Anderwald (johannes.anderwald@reactos.org)
9 */
10
11/* INCLUDES *******************************************************************/
12
13#include <k32.h>
14
15#define NDEBUG
16#include <debug.h>
17
18
19/* FUNCTIONS ******************************************************************/
20
21static BOOL
23 USHORT SourceBufferLength,
25 USHORT TargetBufferLength,
26 LPCVOID ExeName,
27 BOOLEAN bUnicode)
28{
29 CONSOLE_API_MESSAGE ApiMessage;
30 PCONSOLE_ADDGETALIAS ConsoleAliasRequest = &ApiMessage.Data.ConsoleAliasRequest;
31 PCSR_CAPTURE_BUFFER CaptureBuffer;
32 ULONG CapturedStrings;
33
34 USHORT NumChars = (USHORT)(ExeName ? (bUnicode ? wcslen(ExeName) : strlen(ExeName)) : 0);
35
36 if (ExeName == NULL || NumChars == 0)
37 {
39 return FALSE;
40 }
41
42 ConsoleAliasRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
43
44 /* Determine the needed sizes */
45 ConsoleAliasRequest->SourceLength = SourceBufferLength;
46 ConsoleAliasRequest->ExeLength = NumChars * (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
47 ConsoleAliasRequest->Unicode =
48 ConsoleAliasRequest->Unicode2 = bUnicode;
49
50 CapturedStrings = 2;
51
52 if (Target) /* The target can be optional */
53 {
54 ConsoleAliasRequest->TargetLength = TargetBufferLength;
55 CapturedStrings++;
56 }
57 else
58 {
59 ConsoleAliasRequest->TargetLength = 0;
60 }
61
62 /* Allocate a Capture Buffer */
63 CaptureBuffer = CsrAllocateCaptureBuffer(CapturedStrings,
64 ConsoleAliasRequest->SourceLength +
65 ConsoleAliasRequest->ExeLength +
66 ConsoleAliasRequest->TargetLength);
67 if (CaptureBuffer == NULL)
68 {
69 DPRINT1("CsrAllocateCaptureBuffer failed!\n");
71 return FALSE;
72 }
73
74 /* Capture the strings */
75 CsrCaptureMessageBuffer(CaptureBuffer,
77 ConsoleAliasRequest->SourceLength,
78 (PVOID*)&ConsoleAliasRequest->Source);
79
80 CsrCaptureMessageBuffer(CaptureBuffer,
81 (PVOID)ExeName,
82 ConsoleAliasRequest->ExeLength,
83 (PVOID*)&ConsoleAliasRequest->ExeName);
84
85 if (Target) /* The target can be optional */
86 {
87 CsrCaptureMessageBuffer(CaptureBuffer,
89 ConsoleAliasRequest->TargetLength,
90 (PVOID*)&ConsoleAliasRequest->Target);
91 }
92 else
93 {
94 ConsoleAliasRequest->Target = NULL;
95 }
96
98 CaptureBuffer,
100 sizeof(*ConsoleAliasRequest));
101
102 CsrFreeCaptureBuffer(CaptureBuffer);
103
104 if (!NT_SUCCESS(ApiMessage.Status))
105 {
106 BaseSetLastNTError(ApiMessage.Status);
107 return FALSE;
108 }
109
110 return TRUE;
111}
112
113
114/*
115 * @implemented
116 */
117BOOL
118WINAPI
123 _In_ LPCWSTR ExeName)
124{
125 USHORT SourceBufferLength = (USHORT)wcslen(Source) * sizeof(WCHAR);
126 USHORT TargetBufferLength = (USHORT)(Target ? wcslen(Target) * sizeof(WCHAR) : 0);
127
128 DPRINT("AddConsoleAliasW entered with Source '%S' Target '%S' ExeName '%S'\n",
129 Source, Target, ExeName);
130
132 SourceBufferLength,
133 Target,
134 TargetBufferLength,
135 ExeName,
136 TRUE);
137}
138
139
140/*
141 * @implemented
142 */
143BOOL
144WINAPI
149 _In_ LPCSTR ExeName)
150{
151 USHORT SourceBufferLength = (USHORT)strlen(Source) * sizeof(CHAR);
152 USHORT TargetBufferLength = (USHORT)(Target ? strlen(Target) * sizeof(CHAR) : 0);
153
154 DPRINT("AddConsoleAliasA entered with Source '%s' Target '%s' ExeName '%s'\n",
155 Source, Target, ExeName);
156
158 SourceBufferLength,
159 Target,
160 TargetBufferLength,
161 ExeName,
162 FALSE);
163}
164
165
166static DWORD
168 USHORT SourceBufferLength,
170 USHORT TargetBufferLength,
171 LPCVOID ExeName,
172 BOOLEAN bUnicode)
173{
174 CONSOLE_API_MESSAGE ApiMessage;
175 PCONSOLE_ADDGETALIAS ConsoleAliasRequest = &ApiMessage.Data.ConsoleAliasRequest;
176 PCSR_CAPTURE_BUFFER CaptureBuffer;
177
178 USHORT NumChars = (USHORT)(ExeName ? (bUnicode ? wcslen(ExeName) : strlen(ExeName)) : 0);
179
180 if (Source == NULL || Target == NULL)
181 {
183 return 0;
184 }
185
186 if (ExeName == NULL || NumChars == 0)
187 {
189 return 0;
190 }
191
192 ConsoleAliasRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
193
194 /* Determine the needed sizes */
195 ConsoleAliasRequest->SourceLength = SourceBufferLength;
196 ConsoleAliasRequest->ExeLength = NumChars * (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
197 ConsoleAliasRequest->Unicode =
198 ConsoleAliasRequest->Unicode2 = bUnicode;
199
200 ConsoleAliasRequest->TargetLength = TargetBufferLength;
201
202 /* Allocate a Capture Buffer */
203 CaptureBuffer = CsrAllocateCaptureBuffer(3, ConsoleAliasRequest->SourceLength +
204 ConsoleAliasRequest->ExeLength +
205 ConsoleAliasRequest->TargetLength);
206 if (!CaptureBuffer)
207 {
208 DPRINT1("CsrAllocateCaptureBuffer failed!\n");
210 return 0;
211 }
212
213 /* Capture the strings */
214 CsrCaptureMessageBuffer(CaptureBuffer,
215 (PVOID)Source,
216 ConsoleAliasRequest->SourceLength,
217 (PVOID*)&ConsoleAliasRequest->Source);
218
219 CsrCaptureMessageBuffer(CaptureBuffer,
220 (PVOID)ExeName,
221 ConsoleAliasRequest->ExeLength,
222 (PVOID*)&ConsoleAliasRequest->ExeName);
223
224 /* Allocate space for the target buffer */
225 CsrAllocateMessagePointer(CaptureBuffer,
226 ConsoleAliasRequest->TargetLength,
227 (PVOID*)&ConsoleAliasRequest->Target);
228
230 CaptureBuffer,
232 sizeof(*ConsoleAliasRequest));
233 if (!NT_SUCCESS(ApiMessage.Status))
234 {
235 CsrFreeCaptureBuffer(CaptureBuffer);
236 BaseSetLastNTError(ApiMessage.Status);
237
238 if (ApiMessage.Status == STATUS_BUFFER_TOO_SMALL)
239 return ConsoleAliasRequest->TargetLength;
240 else
241 return 0;
242 }
243
244 /* Copy the returned target string into the user buffer */
246 ConsoleAliasRequest->Target,
247 ConsoleAliasRequest->TargetLength);
248
249 /* Release the capture buffer and exit */
250 CsrFreeCaptureBuffer(CaptureBuffer);
251
252 return ConsoleAliasRequest->TargetLength;
253}
254
255
256/*
257 * @implemented
258 */
259DWORD
260WINAPI
264 _Out_writes_(TargetBufferLength) LPWSTR TargetBuffer,
265 _In_ DWORD TargetBufferLength,
266 _In_ LPCWSTR ExeName)
267{
268 DPRINT("GetConsoleAliasW entered with Source '%S' ExeName '%S'\n",
269 Source, ExeName);
270
272 (USHORT)wcslen(Source) * sizeof(WCHAR),
273 TargetBuffer,
274 TargetBufferLength,
275 ExeName,
276 TRUE);
277}
278
279
280/*
281 * @implemented
282 */
283DWORD
284WINAPI
288 _Out_writes_(TargetBufferLength) LPSTR TargetBuffer,
289 _In_ DWORD TargetBufferLength,
290 _In_ LPCSTR ExeName)
291{
292 DPRINT("GetConsoleAliasA entered with Source '%s' ExeName '%s'\n",
293 Source, ExeName);
294
296 (USHORT)strlen(Source) * sizeof(CHAR),
297 TargetBuffer,
298 TargetBufferLength,
299 ExeName,
300 FALSE);
301}
302
303
304static DWORD
306 DWORD AliasBufferLength,
307 LPCVOID ExeName,
308 BOOLEAN bUnicode)
309{
310 CONSOLE_API_MESSAGE ApiMessage;
311 PCONSOLE_GETALLALIASES GetAllAliasesRequest = &ApiMessage.Data.GetAllAliasesRequest;
312 PCSR_CAPTURE_BUFFER CaptureBuffer;
313
314 USHORT NumChars = (USHORT)(ExeName ? (bUnicode ? wcslen(ExeName) : strlen(ExeName)) : 0);
315
316 if (ExeName == NULL || NumChars == 0)
317 {
319 return 0;
320 }
321
322 GetAllAliasesRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
323
324 /* Determine the needed sizes */
325 GetAllAliasesRequest->ExeLength = NumChars * (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
326 GetAllAliasesRequest->Unicode =
327 GetAllAliasesRequest->Unicode2 = bUnicode;
328
329 GetAllAliasesRequest->AliasesBufferLength = AliasBufferLength;
330
331 /* Allocate a Capture Buffer */
332 CaptureBuffer = CsrAllocateCaptureBuffer(2, GetAllAliasesRequest->ExeLength +
333 GetAllAliasesRequest->AliasesBufferLength);
334 if (!CaptureBuffer)
335 {
336 DPRINT1("CsrAllocateCaptureBuffer failed!\n");
338 return 0;
339 }
340
341 /* Capture the exe name and allocate space for the aliases buffer */
342 CsrCaptureMessageBuffer(CaptureBuffer,
343 (PVOID)ExeName,
344 GetAllAliasesRequest->ExeLength,
345 (PVOID*)&GetAllAliasesRequest->ExeName);
346
347 CsrAllocateMessagePointer(CaptureBuffer,
348 GetAllAliasesRequest->AliasesBufferLength,
349 (PVOID*)&GetAllAliasesRequest->AliasesBuffer);
350
352 CaptureBuffer,
354 sizeof(*GetAllAliasesRequest));
355 if (!NT_SUCCESS(ApiMessage.Status))
356 {
357 CsrFreeCaptureBuffer(CaptureBuffer);
358 BaseSetLastNTError(ApiMessage.Status);
359 return 0;
360 }
361
362 /* Copy the returned aliases string into the user buffer */
363 RtlCopyMemory(AliasBuffer,
364 GetAllAliasesRequest->AliasesBuffer,
365 GetAllAliasesRequest->AliasesBufferLength);
366
367 /* Release the capture buffer and exit */
368 CsrFreeCaptureBuffer(CaptureBuffer);
369
370 return GetAllAliasesRequest->AliasesBufferLength;
371}
372
373
374/*
375 * @implemented
376 */
377DWORD
378WINAPI
381 _Out_writes_(AliasBufferLength) LPWSTR AliasBuffer,
382 _In_ DWORD AliasBufferLength,
383 _In_ LPCWSTR ExeName)
384{
385 DPRINT("GetConsoleAliasesW entered with ExeName '%S'\n",
386 ExeName);
387
388 return IntGetConsoleAliases(AliasBuffer,
389 AliasBufferLength,
390 ExeName,
391 TRUE);
392}
393
394
395/*
396 * @implemented
397 */
398DWORD
399WINAPI
402 _Out_writes_(AliasBufferLength) LPSTR AliasBuffer,
403 _In_ DWORD AliasBufferLength,
404 _In_ LPCSTR ExeName)
405{
406 DPRINT("GetConsoleAliasesA entered with ExeName '%s'\n",
407 ExeName);
408
409 return IntGetConsoleAliases(AliasBuffer,
410 AliasBufferLength,
411 ExeName,
412 FALSE);
413}
414
415
416static DWORD
418{
419 CONSOLE_API_MESSAGE ApiMessage;
420 PCONSOLE_GETALLALIASESLENGTH GetAllAliasesLengthRequest = &ApiMessage.Data.GetAllAliasesLengthRequest;
421 PCSR_CAPTURE_BUFFER CaptureBuffer;
422
423 USHORT NumChars = (USHORT)(ExeName ? (bUnicode ? wcslen(ExeName) : strlen(ExeName)) : 0);
424
425 if (ExeName == NULL || NumChars == 0)
426 {
428 return 0;
429 }
430
431 GetAllAliasesLengthRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
432 GetAllAliasesLengthRequest->ExeLength = NumChars * (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
433 GetAllAliasesLengthRequest->Unicode =
434 GetAllAliasesLengthRequest->Unicode2 = bUnicode;
435
436 CaptureBuffer = CsrAllocateCaptureBuffer(1, GetAllAliasesLengthRequest->ExeLength);
437 if (!CaptureBuffer)
438 {
439 DPRINT1("CsrAllocateCaptureBuffer failed!\n");
441 return 0;
442 }
443
444 CsrCaptureMessageBuffer(CaptureBuffer,
445 (PVOID)ExeName,
446 GetAllAliasesLengthRequest->ExeLength,
447 (PVOID)&GetAllAliasesLengthRequest->ExeName);
448
450 CaptureBuffer,
452 sizeof(*GetAllAliasesLengthRequest));
453
454 CsrFreeCaptureBuffer(CaptureBuffer);
455
456 if (!NT_SUCCESS(ApiMessage.Status))
457 {
458 BaseSetLastNTError(ApiMessage.Status);
459 return 0;
460 }
461
462 return GetAllAliasesLengthRequest->Length;
463}
464
465
466/*
467 * @implemented
468 */
469DWORD
470WINAPI
473 _In_ LPCWSTR ExeName)
474{
475 return IntGetConsoleAliasesLength(ExeName, TRUE);
476}
477
478
479/*
480 * @implemented
481 */
482DWORD
483WINAPI
486 _In_ LPCSTR ExeName)
487{
488 return IntGetConsoleAliasesLength(ExeName, FALSE);
489}
490
491
492static DWORD
494 DWORD ExeNameBufferLength,
495 BOOLEAN bUnicode)
496{
497 CONSOLE_API_MESSAGE ApiMessage;
498 PCONSOLE_GETALIASESEXES GetAliasesExesRequest = &ApiMessage.Data.GetAliasesExesRequest;
499 PCSR_CAPTURE_BUFFER CaptureBuffer;
500
501 GetAliasesExesRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
502 GetAliasesExesRequest->Length = ExeNameBufferLength;
503 GetAliasesExesRequest->Unicode = bUnicode;
504
505 CaptureBuffer = CsrAllocateCaptureBuffer(1, ExeNameBufferLength);
506 if (!CaptureBuffer)
507 {
508 DPRINT1("CsrAllocateCaptureBuffer failed!\n");
510 return 0;
511 }
512
513 CsrAllocateMessagePointer(CaptureBuffer,
514 ExeNameBufferLength,
515 (PVOID*)&GetAliasesExesRequest->ExeNames);
516
518 CaptureBuffer,
520 sizeof(*GetAliasesExesRequest));
521 if (!NT_SUCCESS(ApiMessage.Status))
522 {
523 CsrFreeCaptureBuffer(CaptureBuffer);
524 BaseSetLastNTError(ApiMessage.Status);
525 return 0;
526 }
527
528 RtlCopyMemory(lpExeNameBuffer,
529 GetAliasesExesRequest->ExeNames,
530 GetAliasesExesRequest->Length);
531
532 CsrFreeCaptureBuffer(CaptureBuffer);
533
534 return GetAliasesExesRequest->Length;
535}
536
537/*
538 * @implemented
539 */
540DWORD
541WINAPI
544 DWORD ExeNameBufferLength)
545{
546 DPRINT("GetConsoleAliasExesW called\n");
547 return IntGetConsoleAliasExes(lpExeNameBuffer, ExeNameBufferLength, TRUE);
548}
549
550
551/*
552 * @implemented
553 */
554DWORD
555WINAPI
558 DWORD ExeNameBufferLength)
559{
560 DPRINT("GetConsoleAliasExesA called\n");
561 return IntGetConsoleAliasExes(lpExeNameBuffer, ExeNameBufferLength, FALSE);
562}
563
564
565static DWORD
567{
568 CONSOLE_API_MESSAGE ApiMessage;
569 PCONSOLE_GETALIASESEXESLENGTH GetAliasesExesLengthRequest = &ApiMessage.Data.GetAliasesExesLengthRequest;
570
571 GetAliasesExesLengthRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
572 GetAliasesExesLengthRequest->Unicode = bUnicode;
573
575 NULL,
577 sizeof(*GetAliasesExesLengthRequest));
578 if (!NT_SUCCESS(ApiMessage.Status))
579 {
580 BaseSetLastNTError(ApiMessage.Status);
581 return 0;
582 }
583
584 return GetAliasesExesLengthRequest->Length;
585}
586
587
588/*
589 * @implemented
590 */
591DWORD
592WINAPI
595{
596 DPRINT("GetConsoleAliasExesLengthW called\n");
598}
599
600
601/*
602 * @implemented
603 */
604DWORD
605WINAPI
608{
609 DPRINT("GetConsoleAliasExesLengthA called\n");
611}
612
613/* EOF */
#define NtCurrentPeb()
Definition: FLS.c:22
unsigned char BOOLEAN
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define DPRINT1
Definition: precomp.h:8
#define CHAR(Char)
@ ConsolepGetAlias
Definition: conmsg.h:74
@ ConsolepGetAliasesLength
Definition: conmsg.h:75
@ ConsolepGetAliasExes
Definition: conmsg.h:78
@ ConsolepGetAliasExesLength
Definition: conmsg.h:76
@ ConsolepAddAlias
Definition: conmsg.h:73
@ ConsolepGetAliases
Definition: conmsg.h:77
#define CONSRV_SERVERDLL_INDEX
Definition: conmsg.h:15
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
Definition: csrmsg.h:37
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
static DWORD IntGetConsoleAlias(LPCVOID Source, USHORT SourceBufferLength, LPVOID Target, USHORT TargetBufferLength, LPCVOID ExeName, BOOLEAN bUnicode)
Definition: alias.c:167
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesA(LPSTR lpExeNameBuffer, DWORD ExeNameBufferLength)
Definition: alias.c:557
BOOL WINAPI DECLSPEC_HOTPATCH AddConsoleAliasW(_In_ LPCWSTR Source, _In_ LPCWSTR Target, _In_ LPCWSTR ExeName)
Definition: alias.c:120
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasW(_In_ LPCWSTR Source, _Out_writes_(TargetBufferLength) LPWSTR TargetBuffer, _In_ DWORD TargetBufferLength, _In_ LPCWSTR ExeName)
Definition: alias.c:262
static DWORD IntGetConsoleAliasExes(PVOID lpExeNameBuffer, DWORD ExeNameBufferLength, BOOLEAN bUnicode)
Definition: alias.c:493
static BOOL IntAddConsoleAlias(LPCVOID Source, USHORT SourceBufferLength, LPCVOID Target, USHORT TargetBufferLength, LPCVOID ExeName, BOOLEAN bUnicode)
Definition: alias.c:22
static DWORD IntGetConsoleAliases(LPVOID AliasBuffer, DWORD AliasBufferLength, LPCVOID ExeName, BOOLEAN bUnicode)
Definition: alias.c:305
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesA(_Out_writes_(AliasBufferLength) LPSTR AliasBuffer, _In_ DWORD AliasBufferLength, _In_ LPCSTR ExeName)
Definition: alias.c:401
static DWORD IntGetConsoleAliasExesLength(BOOLEAN bUnicode)
Definition: alias.c:566
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesW(LPWSTR lpExeNameBuffer, DWORD ExeNameBufferLength)
Definition: alias.c:543
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesW(_Out_writes_(AliasBufferLength) LPWSTR AliasBuffer, _In_ DWORD AliasBufferLength, _In_ LPCWSTR ExeName)
Definition: alias.c:380
BOOL WINAPI DECLSPEC_HOTPATCH AddConsoleAliasA(_In_ LPCSTR Source, _In_ LPCSTR Target, _In_ LPCSTR ExeName)
Definition: alias.c:146
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasA(_In_ LPCSTR Source, _Out_writes_(TargetBufferLength) LPSTR TargetBuffer, _In_ DWORD TargetBufferLength, _In_ LPCSTR ExeName)
Definition: alias.c:286
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesLengthW(_In_ LPCWSTR ExeName)
Definition: alias.c:472
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesLengthA(_In_ LPCSTR ExeName)
Definition: alias.c:485
static DWORD IntGetConsoleAliasesLength(LPCVOID ExeName, BOOLEAN bUnicode)
Definition: alias.c:417
DWORD WINAPI GetConsoleAliasExesLengthW(void)
Definition: console.c:744
DWORD WINAPI GetConsoleAliasExesLengthA(void)
Definition: console.c:733
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
#define _Out_writes_(s)
Definition: no_sal2.h:176
#define _In_
Definition: no_sal2.h:158
unsigned short USHORT
Definition: pedump.c:61
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:167
PCSR_CAPTURE_BUFFER NTAPI CsrAllocateCaptureBuffer(_In_ ULONG ArgumentCount, _In_ ULONG BufferSize)
Definition: capture.c:87
ULONG NTAPI CsrAllocateMessagePointer(_Inout_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ ULONG MessageLength, _Out_ PVOID *CapturedData)
Definition: capture.c:152
VOID NTAPI CsrFreeCaptureBuffer(_In_ _Frees_ptr_ PCSR_CAPTURE_BUFFER CaptureBuffer)
Definition: capture.c:210
VOID NTAPI CsrCaptureMessageBuffer(_Inout_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_opt_ PVOID MessageBuffer, _In_ ULONG MessageLength, _Out_ PVOID *CapturedData)
Definition: capture.c:189
NTSTATUS NTAPI CsrClientCallServer(_Inout_ PCSR_API_MESSAGE ApiMessage, _Inout_opt_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ CSR_API_NUMBER ApiNumber, _In_ ULONG DataLength)
Definition: connect.c:366
#define DECLSPEC_HOTPATCH
Definition: config.h:9
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define DPRINT
Definition: sndvol32.h:73
HANDLE ConsoleHandle
Definition: conmsg.h:730
USHORT TargetLength
Definition: conmsg.h:732
USHORT SourceLength
Definition: conmsg.h:731
BOOLEAN Unicode2
Definition: conmsg.h:738
CONSOLE_GETALIASESEXES GetAliasesExesRequest
Definition: conmsg.h:1002
CONSOLE_GETALLALIASESLENGTH GetAllAliasesLengthRequest
Definition: conmsg.h:1001
NTSTATUS Status
Definition: conmsg.h:919
CONSOLE_ADDGETALIAS ConsoleAliasRequest
Definition: conmsg.h:999
union _CONSOLE_API_MESSAGE::@3665 Data
CONSOLE_GETALIASESEXESLENGTH GetAliasesExesLengthRequest
Definition: conmsg.h:1003
CONSOLE_GETALLALIASES GetAllAliasesRequest
Definition: conmsg.h:1000
ULONG AliasesBufferLength
Definition: conmsg.h:748
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
CONST void * LPCVOID
Definition: windef.h:191
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175