ReactOS  0.4.10-dev-486-g11b7619
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 
21 static BOOL
23  USHORT SourceBufferLength,
25  USHORT TargetBufferLength,
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)(lpExeName ? (bUnicode ? wcslen(lpExeName) : strlen(lpExeName)) : 0);
35 
36  if (lpExeName == 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,
76  (PVOID)Source,
77  ConsoleAliasRequest->SourceLength,
78  (PVOID*)&ConsoleAliasRequest->Source);
79 
80  CsrCaptureMessageBuffer(CaptureBuffer,
81  (PVOID)lpExeName,
82  ConsoleAliasRequest->ExeLength,
83  (PVOID*)&ConsoleAliasRequest->ExeName);
84 
85  if (Target) /* The target can be optional */
86  {
87  CsrCaptureMessageBuffer(CaptureBuffer,
88  (PVOID)Target,
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  */
117 BOOL
118 WINAPI
121  LPCWSTR lpTarget,
123 {
124  USHORT SourceBufferLength = (USHORT)wcslen(lpSource) * sizeof(WCHAR);
125  USHORT TargetBufferLength = (USHORT)(lpTarget ? wcslen(lpTarget) * sizeof(WCHAR) : 0);
126 
127  DPRINT("AddConsoleAliasW entered with lpSource '%S' lpTarget '%S' lpExeName '%S'\n",
128  lpSource, lpTarget, lpExeName);
129 
130  return IntAddConsoleAlias(lpSource,
131  SourceBufferLength,
132  lpTarget,
133  TargetBufferLength,
134  lpExeName,
135  TRUE);
136 }
137 
138 
139 /*
140  * @implemented
141  */
142 BOOL
143 WINAPI
146  LPCSTR lpTarget,
148 {
149  USHORT SourceBufferLength = (USHORT)strlen(lpSource) * sizeof(CHAR);
150  USHORT TargetBufferLength = (USHORT)(lpTarget ? strlen(lpTarget) * sizeof(CHAR) : 0);
151 
152  DPRINT("AddConsoleAliasA entered with lpSource '%s' lpTarget '%s' lpExeName '%s'\n",
153  lpSource, lpTarget, lpExeName);
154 
155  return IntAddConsoleAlias(lpSource,
156  SourceBufferLength,
157  lpTarget,
158  TargetBufferLength,
159  lpExeName,
160  FALSE);
161 }
162 
163 
164 static DWORD
166  USHORT SourceBufferLength,
167  LPVOID Target,
168  USHORT TargetBufferLength,
170  BOOLEAN bUnicode)
171 {
172  CONSOLE_API_MESSAGE ApiMessage;
173  PCONSOLE_ADDGETALIAS ConsoleAliasRequest = &ApiMessage.Data.ConsoleAliasRequest;
174  PCSR_CAPTURE_BUFFER CaptureBuffer;
175 
176  USHORT NumChars = (USHORT)(lpExeName ? (bUnicode ? wcslen(lpExeName) : strlen(lpExeName)) : 0);
177 
178  if (Source == NULL || Target == NULL)
179  {
181  return 0;
182  }
183 
184  if (lpExeName == NULL || NumChars == 0)
185  {
187  return 0;
188  }
189 
190  ConsoleAliasRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
191 
192  /* Determine the needed sizes */
193  ConsoleAliasRequest->SourceLength = SourceBufferLength;
194  ConsoleAliasRequest->ExeLength = NumChars * (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
195  ConsoleAliasRequest->Unicode =
196  ConsoleAliasRequest->Unicode2 = bUnicode;
197 
198  ConsoleAliasRequest->TargetLength = TargetBufferLength;
199 
200  /* Allocate a Capture Buffer */
201  CaptureBuffer = CsrAllocateCaptureBuffer(3, ConsoleAliasRequest->SourceLength +
202  ConsoleAliasRequest->ExeLength +
203  ConsoleAliasRequest->TargetLength);
204  if (!CaptureBuffer)
205  {
206  DPRINT1("CsrAllocateCaptureBuffer failed!\n");
208  return 0;
209  }
210 
211  /* Capture the strings */
212  CsrCaptureMessageBuffer(CaptureBuffer,
213  (PVOID)Source,
214  ConsoleAliasRequest->SourceLength,
215  (PVOID*)&ConsoleAliasRequest->Source);
216 
217  CsrCaptureMessageBuffer(CaptureBuffer,
218  (PVOID)lpExeName,
219  ConsoleAliasRequest->ExeLength,
220  (PVOID*)&ConsoleAliasRequest->ExeName);
221 
222  /* Allocate space for the target buffer */
223  CsrAllocateMessagePointer(CaptureBuffer,
224  ConsoleAliasRequest->TargetLength,
225  (PVOID*)&ConsoleAliasRequest->Target);
226 
228  CaptureBuffer,
230  sizeof(*ConsoleAliasRequest));
231  if (!NT_SUCCESS(ApiMessage.Status))
232  {
233  CsrFreeCaptureBuffer(CaptureBuffer);
234  BaseSetLastNTError(ApiMessage.Status);
235 
236  if (ApiMessage.Status == STATUS_BUFFER_TOO_SMALL)
237  return ConsoleAliasRequest->TargetLength;
238  else
239  return 0;
240  }
241 
242  /* Copy the returned target string into the user buffer */
243  RtlCopyMemory(Target,
244  ConsoleAliasRequest->Target,
245  ConsoleAliasRequest->TargetLength);
246 
247  /* Release the capture buffer and exit */
248  CsrFreeCaptureBuffer(CaptureBuffer);
249 
250  return ConsoleAliasRequest->TargetLength;
251 }
252 
253 
254 /*
255  * @implemented
256  */
257 DWORD
258 WINAPI
261  LPWSTR lpTargetBuffer,
262  DWORD TargetBufferLength,
264 {
265  DPRINT("GetConsoleAliasW entered with lpSource '%S' lpExeName '%S'\n",
266  lpSource, lpExeName);
267 
268  return IntGetConsoleAlias(lpSource,
269  (USHORT)wcslen(lpSource) * sizeof(WCHAR),
270  lpTargetBuffer,
271  TargetBufferLength,
272  lpExeName,
273  TRUE);
274 }
275 
276 
277 /*
278  * @implemented
279  */
280 DWORD
281 WINAPI
284  LPSTR lpTargetBuffer,
285  DWORD TargetBufferLength,
287 {
288  DPRINT("GetConsoleAliasA entered with lpSource '%s' lpExeName '%s'\n",
289  lpSource, lpExeName);
290 
291  return IntGetConsoleAlias(lpSource,
292  (USHORT)strlen(lpSource) * sizeof(CHAR),
293  lpTargetBuffer,
294  TargetBufferLength,
295  lpExeName,
296  FALSE);
297 }
298 
299 
300 static DWORD
302  DWORD AliasBufferLength,
304  BOOLEAN bUnicode)
305 {
306  CONSOLE_API_MESSAGE ApiMessage;
307  PCONSOLE_GETALLALIASES GetAllAliasesRequest = &ApiMessage.Data.GetAllAliasesRequest;
308  PCSR_CAPTURE_BUFFER CaptureBuffer;
309 
310  USHORT NumChars = (USHORT)(lpExeName ? (bUnicode ? wcslen(lpExeName) : strlen(lpExeName)) : 0);
311 
312  if (lpExeName == NULL || NumChars == 0)
313  {
315  return 0;
316  }
317 
318  GetAllAliasesRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
319 
320  /* Determine the needed sizes */
321  GetAllAliasesRequest->ExeLength = NumChars * (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
322  GetAllAliasesRequest->Unicode =
323  GetAllAliasesRequest->Unicode2 = bUnicode;
324 
325  GetAllAliasesRequest->AliasesBufferLength = AliasBufferLength;
326 
327  /* Allocate a Capture Buffer */
328  CaptureBuffer = CsrAllocateCaptureBuffer(2, GetAllAliasesRequest->ExeLength +
329  GetAllAliasesRequest->AliasesBufferLength);
330  if (!CaptureBuffer)
331  {
332  DPRINT1("CsrAllocateCaptureBuffer failed!\n");
334  return 0;
335  }
336 
337  /* Capture the exe name and allocate space for the aliases buffer */
338  CsrCaptureMessageBuffer(CaptureBuffer,
339  (PVOID)lpExeName,
340  GetAllAliasesRequest->ExeLength,
341  (PVOID*)&GetAllAliasesRequest->ExeName);
342 
343  CsrAllocateMessagePointer(CaptureBuffer,
344  GetAllAliasesRequest->AliasesBufferLength,
345  (PVOID*)&GetAllAliasesRequest->AliasesBuffer);
346 
348  CaptureBuffer,
350  sizeof(*GetAllAliasesRequest));
351  if (!NT_SUCCESS(ApiMessage.Status))
352  {
353  CsrFreeCaptureBuffer(CaptureBuffer);
354  BaseSetLastNTError(ApiMessage.Status);
355  return 0;
356  }
357 
358  /* Copy the returned aliases string into the user buffer */
359  RtlCopyMemory(AliasBuffer,
360  GetAllAliasesRequest->AliasesBuffer,
361  GetAllAliasesRequest->AliasesBufferLength);
362 
363  /* Release the capture buffer and exit */
364  CsrFreeCaptureBuffer(CaptureBuffer);
365 
366  return GetAllAliasesRequest->AliasesBufferLength;
367 }
368 
369 
370 /*
371  * @implemented
372  */
373 DWORD
374 WINAPI
377  DWORD AliasBufferLength,
378  LPWSTR ExeName)
379 {
380  DPRINT("GetConsoleAliasesW entered with lpExeName '%S'\n",
381  ExeName);
382 
383  return IntGetConsoleAliases(AliasBuffer,
384  AliasBufferLength,
385  ExeName,
386  TRUE);
387 }
388 
389 
390 /*
391  * @implemented
392  */
393 DWORD
394 WINAPI
397  DWORD AliasBufferLength,
398  LPSTR ExeName)
399 {
400  DPRINT("GetConsoleAliasesA entered with lpExeName '%s'\n",
401  ExeName);
402 
403  return IntGetConsoleAliases(AliasBuffer,
404  AliasBufferLength,
405  ExeName,
406  FALSE);
407 }
408 
409 
410 static DWORD
412 {
413  CONSOLE_API_MESSAGE ApiMessage;
414  PCONSOLE_GETALLALIASESLENGTH GetAllAliasesLengthRequest = &ApiMessage.Data.GetAllAliasesLengthRequest;
415  PCSR_CAPTURE_BUFFER CaptureBuffer;
416 
417  USHORT NumChars = (USHORT)(lpExeName ? (bUnicode ? wcslen(lpExeName) : strlen(lpExeName)) : 0);
418 
419  if (lpExeName == NULL || NumChars == 0)
420  {
422  return 0;
423  }
424 
425  GetAllAliasesLengthRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
426  GetAllAliasesLengthRequest->ExeLength = NumChars * (bUnicode ? sizeof(WCHAR) : sizeof(CHAR));
427  GetAllAliasesLengthRequest->Unicode =
428  GetAllAliasesLengthRequest->Unicode2 = bUnicode;
429 
430  CaptureBuffer = CsrAllocateCaptureBuffer(1, GetAllAliasesLengthRequest->ExeLength);
431  if (!CaptureBuffer)
432  {
433  DPRINT1("CsrAllocateCaptureBuffer failed!\n");
435  return 0;
436  }
437 
438  CsrCaptureMessageBuffer(CaptureBuffer,
439  (PVOID)lpExeName,
440  GetAllAliasesLengthRequest->ExeLength,
441  (PVOID)&GetAllAliasesLengthRequest->ExeName);
442 
444  CaptureBuffer,
446  sizeof(*GetAllAliasesLengthRequest));
447 
448  CsrFreeCaptureBuffer(CaptureBuffer);
449 
450  if (!NT_SUCCESS(ApiMessage.Status))
451  {
452  BaseSetLastNTError(ApiMessage.Status);
453  return 0;
454  }
455 
456  return GetAllAliasesLengthRequest->Length;
457 }
458 
459 
460 /*
461  * @implemented
462  */
463 DWORD
464 WINAPI
467 {
468  return IntGetConsoleAliasesLength(lpExeName, TRUE);
469 }
470 
471 
472 /*
473  * @implemented
474  */
475 DWORD
476 WINAPI
479 {
480  return IntGetConsoleAliasesLength(lpExeName, FALSE);
481 }
482 
483 
484 static DWORD
486  DWORD ExeNameBufferLength,
487  BOOLEAN bUnicode)
488 {
489  CONSOLE_API_MESSAGE ApiMessage;
490  PCONSOLE_GETALIASESEXES GetAliasesExesRequest = &ApiMessage.Data.GetAliasesExesRequest;
491  PCSR_CAPTURE_BUFFER CaptureBuffer;
492 
493  GetAliasesExesRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
494  GetAliasesExesRequest->Length = ExeNameBufferLength;
495  GetAliasesExesRequest->Unicode = bUnicode;
496 
497  CaptureBuffer = CsrAllocateCaptureBuffer(1, ExeNameBufferLength);
498  if (!CaptureBuffer)
499  {
500  DPRINT1("CsrAllocateCaptureBuffer failed!\n");
502  return 0;
503  }
504 
505  CsrAllocateMessagePointer(CaptureBuffer,
506  ExeNameBufferLength,
507  (PVOID*)&GetAliasesExesRequest->ExeNames);
508 
510  CaptureBuffer,
512  sizeof(*GetAliasesExesRequest));
513  if (!NT_SUCCESS(ApiMessage.Status))
514  {
515  CsrFreeCaptureBuffer(CaptureBuffer);
516  BaseSetLastNTError(ApiMessage.Status);
517  return 0;
518  }
519 
520  RtlCopyMemory(lpExeNameBuffer,
521  GetAliasesExesRequest->ExeNames,
522  GetAliasesExesRequest->Length);
523 
524  CsrFreeCaptureBuffer(CaptureBuffer);
525 
526  return GetAliasesExesRequest->Length;
527 }
528 
529 /*
530  * @implemented
531  */
532 DWORD
533 WINAPI
535 GetConsoleAliasExesW(LPWSTR lpExeNameBuffer,
536  DWORD ExeNameBufferLength)
537 {
538  DPRINT("GetConsoleAliasExesW called\n");
539  return IntGetConsoleAliasExes(lpExeNameBuffer, ExeNameBufferLength, TRUE);
540 }
541 
542 
543 /*
544  * @implemented
545  */
546 DWORD
547 WINAPI
549 GetConsoleAliasExesA(LPSTR lpExeNameBuffer,
550  DWORD ExeNameBufferLength)
551 {
552  DPRINT("GetConsoleAliasExesA called\n");
553  return IntGetConsoleAliasExes(lpExeNameBuffer, ExeNameBufferLength, FALSE);
554 }
555 
556 
557 static DWORD
559 {
560  CONSOLE_API_MESSAGE ApiMessage;
561  PCONSOLE_GETALIASESEXESLENGTH GetAliasesExesLengthRequest = &ApiMessage.Data.GetAliasesExesLengthRequest;
562 
563  GetAliasesExesLengthRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
564  GetAliasesExesLengthRequest->Unicode = bUnicode;
565 
567  NULL,
569  sizeof(*GetAliasesExesLengthRequest));
570  if (!NT_SUCCESS(ApiMessage.Status))
571  {
572  BaseSetLastNTError(ApiMessage.Status);
573  return 0;
574  }
575 
576  return GetAliasesExesLengthRequest->Length;
577 }
578 
579 
580 /*
581  * @implemented
582  */
583 DWORD
584 WINAPI
587 {
588  DPRINT("GetConsoleAliasExesLengthW called\n");
590 }
591 
592 
593 /*
594  * @implemented
595  */
596 DWORD
597 WINAPI
600 {
601  DPRINT("GetConsoleAliasExesLengthA called\n");
603 }
604 
605 /* EOF */
DWORD *typedef PVOID
Definition: winlogon.h:60
union _CONSOLE_API_MESSAGE::@3324 Data
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
VOID NTAPI CsrFreeCaptureBuffer(IN PCSR_CAPTURE_BUFFER CaptureBuffer)
Definition: capture.c:189
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
BOOL WINAPI DECLSPEC_HOTPATCH AddConsoleAliasA(LPCSTR lpSource, LPCSTR lpTarget, LPCSTR lpExeName)
Definition: alias.c:145
ULONG NTAPI CsrAllocateMessagePointer(IN OUT PCSR_CAPTURE_BUFFER CaptureBuffer, IN ULONG MessageLength, OUT PVOID *CapturedData)
Definition: capture.c:133
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
PCSR_CAPTURE_BUFFER NTAPI CsrAllocateCaptureBuffer(IN ULONG ArgumentCount, IN ULONG BufferSize)
Definition: capture.c:90
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesA(LPSTR AliasBuffer, DWORD AliasBufferLength, LPSTR ExeName)
Definition: alias.c:396
NTSTATUS NTAPI CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage, IN OUT PCSR_CAPTURE_BUFFER CaptureBuffer OPTIONAL, IN CSR_API_NUMBER ApiNumber, IN ULONG DataLength)
Definition: connect.c:360
char CHAR
Definition: xmlstorage.h:175
static DWORD IntGetConsoleAliasesLength(LPVOID lpExeName, BOOLEAN bUnicode)
Definition: alias.c:411
BOOLEAN Unicode2
Definition: conmsg.h:738
CONSOLE_GETALLALIASES GetAllAliasesRequest
Definition: conmsg.h:978
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
char * LPSTR
Definition: xmlstorage.h:182
#define WCHAR
Definition: msvc.h:43
DWORD DWORD
Definition: winlogon.h:83
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:52
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesA(LPSTR lpExeNameBuffer, DWORD ExeNameBufferLength)
Definition: alias.c:549
static DWORD LPSTR lpExeName
Definition: process.c:72
NTSTATUS Status
Definition: csrmsg.h:112
VOID NTAPI CsrCaptureMessageBuffer(IN OUT PCSR_CAPTURE_BUFFER CaptureBuffer, IN PVOID MessageBuffer OPTIONAL, IN ULONG MessageLength, OUT PVOID *CapturedData)
Definition: capture.c:169
#define FALSE
Definition: types.h:117
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesLengthW(VOID)
Definition: alias.c:586
ULONG AliasesBufferLength
Definition: conmsg.h:748
smooth NULL
Definition: ftsmooth.c:416
static BOOL IntAddConsoleAlias(LPCVOID Source, USHORT SourceBufferLength, LPCVOID Target, USHORT TargetBufferLength, LPCVOID lpExeName, BOOLEAN bUnicode)
Definition: alias.c:22
void DPRINT(...)
Definition: polytest.cpp:61
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesW(LPWSTR AliasBuffer, DWORD AliasBufferLength, LPWSTR ExeName)
Definition: alias.c:376
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:166
const char * LPCSTR
Definition: xmlstorage.h:183
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesW(LPWSTR lpExeNameBuffer, DWORD ExeNameBufferLength)
Definition: alias.c:535
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
Definition: csrmsg.h:37
#define DECLSPEC_HOTPATCH
Definition: _mingw.h:224
unsigned char BOOLEAN
static DWORD IntGetConsoleAliases(LPVOID AliasBuffer, DWORD AliasBufferLength, LPVOID lpExeName, BOOLEAN bUnicode)
Definition: alias.c:301
unsigned int BOOL
Definition: ntddk_ex.h:94
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:24
USHORT SourceLength
Definition: conmsg.h:731
BOOL WINAPI DECLSPEC_HOTPATCH AddConsoleAliasW(LPCWSTR lpSource, LPCWSTR lpTarget, LPCWSTR lpExeName)
Definition: alias.c:120
#define SetLastError(x)
Definition: compat.h:409
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesLengthA(LPSTR lpExeName)
Definition: alias.c:478
_Must_inspect_result_ typedef _In_ ULONG _In_ BOOLEAN Target
Definition: iotypes.h:1067
static DWORD IntGetConsoleAlias(LPVOID Source, USHORT SourceBufferLength, LPVOID Target, USHORT TargetBufferLength, LPVOID lpExeName, BOOLEAN bUnicode)
Definition: alias.c:165
CONSOLE_GETALLALIASESLENGTH GetAllAliasesLengthRequest
Definition: conmsg.h:979
HANDLE ConsoleHandle
Definition: conmsg.h:730
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesLengthW(LPWSTR lpExeName)
Definition: alias.c:466
#define WINAPI
Definition: msvc.h:20
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasW(LPWSTR lpSource, LPWSTR lpTargetBuffer, DWORD TargetBufferLength, LPWSTR lpExeName)
Definition: alias.c:260
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesLengthA(VOID)
Definition: alias.c:599
CONSOLE_GETALIASESEXES GetAliasesExesRequest
Definition: conmsg.h:980
unsigned short USHORT
Definition: pedump.c:61
static DWORD IntGetConsoleAliasExesLength(BOOLEAN bUnicode)
Definition: alias.c:558
#define DPRINT1
Definition: precomp.h:8
CONST void * LPCVOID
Definition: windef.h:191
CONSOLE_ADDGETALIAS ConsoleAliasRequest
Definition: conmsg.h:977
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasA(LPSTR lpSource, LPSTR lpTargetBuffer, DWORD TargetBufferLength, LPSTR lpExeName)
Definition: alias.c:283
unsigned int ULONG
Definition: retypes.h:1
USHORT TargetLength
Definition: conmsg.h:732
static DWORD IntGetConsoleAliasExes(PVOID lpExeNameBuffer, DWORD ExeNameBufferLength, BOOLEAN bUnicode)
Definition: alias.c:485
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define CHAR(Char)
CONSOLE_GETALIASESEXESLENGTH GetAliasesExesLengthRequest
Definition: conmsg.h:981
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define NtCurrentPeb()
Definition: rtlfuncs.h:1073
#define CONSRV_SERVERDLL_INDEX
Definition: conmsg.h:15