ReactOS 0.4.16-dev-1946-g52006dd
netsh.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS NetSh
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Network Shell main file
5 * COPYRIGHT: Copyright 2023 Eric Kohl <eric.kohl@reactos.org>
6 */
7
8/* INCLUDES *******************************************************************/
9
10#include "precomp.h"
11
12#define NDEBUG
13#include <debug.h>
14
15/* GLOBALS ********************************************************************/
16
18
19/* FUNCTIONS ******************************************************************/
20
24{
25 WCHAR tmp_string[MAX_STRING_SIZE];
26 FILE *script;
27 DWORD dwError = ERROR_SUCCESS;
28
29 /* Open the file for processing */
30 script = _wfopen(filename, L"r");
31 if (script == NULL)
32 {
35 }
36
37 /* Read and process the script */
38 while (fgetws(tmp_string, MAX_STRING_SIZE, script) != NULL)
39 {
40 dwError = InterpretLine(tmp_string);
41 if (dwError != ERROR_SUCCESS)
42 break;
43 }
44
45 /* Close the file */
47
48 return dwError;
49}
50
51
54 _In_ LPWSTR pszStringArray[],
55 _In_ INT nCount)
56{
57 LPWSTR pszOutString = NULL;
58 INT i, nLength;
59
60 if ((pszStringArray == NULL) || (nCount == 0))
61 return NULL;
62
63 nLength = 0;
64 for (i = 0; i < nCount; i++)
65 nLength += wcslen(pszStringArray[i]);
66
67 if (nLength > 0)
68 nLength += nCount; /* Space characters and terminating zero */
69
70 pszOutString = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nLength * sizeof(WCHAR));
71 if (pszOutString == NULL)
72 return NULL;
73
74 for (i = 0; i < nCount; i++)
75 {
76 if (i != 0)
77 wcscat(pszOutString, L" ");
78 wcscat(pszOutString, pszStringArray[i]);
79 }
80
81 return pszOutString;
82}
83
84
85/*
86 * wmain():
87 * Main entry point of the application.
88 */
89int
91 _In_ int argc,
92 _In_ const LPWSTR argv[])
93{
94 LPCWSTR pszScriptFileName = NULL;
95 LPCWSTR pszAliasFileName = NULL;
96 LPCWSTR pszContext = NULL;
97 LPWSTR pszCommand = NULL;
98 int index;
99 DWORD dwError = ERROR_SUCCESS;
100
101 DPRINT("wmain(%S)\n", GetCommandLineW());
102
104
105 /* Initialize the Console Standard Streams */
107
108 /* FIXME: Init code goes here */
109 InitAliases();
112 LoadHelpers();
113
114 /* Process the command arguments */
115 for (index = 1; index < argc; index++)
116 {
117 if ((_wcsicmp(argv[index], L"-?") == 0) ||
118 (_wcsicmp(argv[index], L"/?") == 0) ||
119 (_wcsicmp(argv[index], L"?") == 0))
120 {
121 /* Help option */
123 dwError = ERROR_SUCCESS;
124 goto done;
125 }
126 else if ((_wcsicmp(argv[index], L"-a") == 0) ||
127 (_wcsicmp(argv[index], L"/a") == 0))
128 {
129 /* Aliasfile option */
130 if ((index + 1) < argc)
131 {
132 index++;
133 ConPuts(StdOut, L"\nThe -a option is not implemented yet\n");
134 pszAliasFileName = argv[index];
135 }
136 else
137 {
139 dwError = ERROR_INVALID_SYNTAX;
140 goto done;
141 }
142 }
143 else if ((_wcsicmp(argv[index], L"-c") == 0) ||
144 (_wcsicmp(argv[index], L"/c") == 0))
145 {
146 /* Context option */
147 if ((index + 1) < argc)
148 {
149 index++;
150 pszContext = argv[index];
151 }
152 else
153 {
155 dwError = ERROR_INVALID_SYNTAX;
156 goto done;
157 }
158 }
159 else if ((_wcsicmp(argv[index], L"-f") == 0) ||
160 (_wcsicmp(argv[index], L"/f") == 0))
161 {
162 /* File option */
163 if ((index + 1) < argc)
164 {
165 index++;
166 pszScriptFileName = argv[index];
167 }
168 else
169 {
171 dwError = ERROR_INVALID_SYNTAX;
172 goto done;
173 }
174 }
175 else if ((_wcsicmp(argv[index], L"-r") == 0) ||
176 (_wcsicmp(argv[index], L"/r") == 0))
177 {
178 /* Remote option */
179 if ((index + 1) < argc)
180 {
181 index++;
182 pszMachine = HeapAlloc(GetProcessHeap(), 0, (wcslen(argv[index]) + 1) * sizeof(WCHAR));
183 if (pszMachine == NULL)
184 {
185 dwError = ERROR_NOT_ENOUGH_MEMORY;
186 PrintError(hModule, dwError);
187 goto done;
188 }
189
191 }
192 else
193 {
195 dwError = ERROR_INVALID_SYNTAX;
196 goto done;
197 }
198 }
199 else
200 {
201 if (pszScriptFileName != NULL)
202 {
204 dwError = ERROR_INVALID_SYNTAX;
205 goto done;
206 }
207 else if (pszCommand == NULL)
208 {
209 pszCommand = MergeStrings((LPWSTR*)&argv[index], argc - index);
210 if (pszCommand == NULL)
211 {
212 dwError = ERROR_NOT_ENOUGH_MEMORY;
213 PrintError(hModule, dwError);
214 goto done;
215 }
216
217 break;
218 }
219 }
220 }
221
222 /* Run the alias file */
223 if (pszAliasFileName != NULL)
224 {
225 dwError = RunScript(pszAliasFileName);
226 if (dwError != ERROR_SUCCESS)
227 goto done;
228 }
229
230 /* Set a context */
231 if (pszContext)
232 {
233 dwError = InterpretLine((LPWSTR)pszContext);
234 if (dwError != ERROR_SUCCESS)
235 goto done;
236 }
237
238 /* Run a script, the command line instruction or the interactive interpeter */
239 if (pszScriptFileName != NULL)
240 {
241 dwError = RunScript(pszScriptFileName);
242 }
243 else if (pszCommand != NULL)
244 {
245 dwError = InterpretLine(pszCommand);
246 }
247 else
248 {
250 }
251
252done:
253 /* FIXME: Cleanup code goes here */
254 if (pszMachine != NULL)
256
257 if (pszCommand != NULL)
258 HeapFree(GetProcessHeap(), 0, pszCommand);
259
263
264 return (dwError == ERROR_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE;
265}
266
267VOID
268WINAPI
270 _In_ LPWSTR pszQuotedString)
271{
272 DPRINT("FreeQuotedString(%S)\n", pszQuotedString);
273 HeapFree(GetProcessHeap(), 0, pszQuotedString);
274}
275
276VOID
277WINAPI
279 _In_ LPWSTR pszString)
280{
281 DPRINT("FreeString(%S)\n", pszString);
282 LocalFree(pszString);
283}
284
285LPWSTR
286WINAPI
288 _In_ LPWSTR pszString)
289{
290 LPWSTR pszQuotedString;
291
292 DPRINT("MakeQuotedString(%S)\n", pszString);
293
294 pszQuotedString = HeapAlloc(GetProcessHeap(), 0, (wcslen(pszString) + 3) * sizeof(WCHAR));
295 if (pszQuotedString == NULL)
296 return NULL;
297
298 swprintf(pszQuotedString, L"\"%s\"", pszString);
299
300 return pszQuotedString;
301}
302
303LPWSTR
304CDECL
307 _In_ DWORD dwMsgId,
308 ...)
309{
310 LPWSTR pszInBuffer, pszOutBuffer = NULL;
312 va_list ap;
313
314 DPRINT("MakeString(%p %lu ...)\n", hModule, dwMsgId);
315
316 va_start(ap, dwMsgId);
317
318 pszInBuffer = HeapAlloc(GetProcessHeap(), 0, HUGE_BUFFER_SIZE * sizeof(WCHAR));
319 if (pszInBuffer == NULL)
320 return NULL;
321
322 dwLength = LoadStringW(hModule, dwMsgId, pszInBuffer, HUGE_BUFFER_SIZE);
323 if (dwLength > 0)
324 goto done;
325
327 pszInBuffer,
328 0,
329 0,
330 (LPWSTR)&pszOutBuffer,
331 0,
332 &ap);
333
334done:
335 if (pszInBuffer)
336 HeapFree(GetProcessHeap(), 0, pszInBuffer);
337
338 return pszOutBuffer;
339}
340
341DWORD
342WINAPI
345 _In_ LPCWSTR pwcArg,
346 _In_ DWORD dwNumArg,
347 _In_ const TOKEN_VALUE *pEnumTable,
348 _Out_ PDWORD pdwValue)
349{
350 DWORD i;
351
352 DPRINT("MatchEnumTag(%p %p %lu %p %p)\n", hModule, pwcArg, dwNumArg, pEnumTable, pdwValue);
353
354 if ((pEnumTable == NULL) || (pdwValue == NULL))
356
357 for (i = 0; i < dwNumArg; i++)
358 {
359 if (MatchToken(pwcArg, pEnumTable[i].pwszToken))
360 {
361 *pdwValue = pEnumTable[i].dwValue;
362 return ERROR_SUCCESS;
363 }
364 }
365
366 return ERROR_NOT_FOUND;
367}
368
369BOOL
370WINAPI
372 _In_ LPCWSTR pwszUserToken,
373 _In_ LPCWSTR pwszCmdToken)
374{
375 DPRINT("MatchToken(%S %S)\n", pwszUserToken, pwszCmdToken);
376
377 if ((pwszUserToken == NULL) || (pwszCmdToken == NULL))
378 return FALSE;
379
380 return (_wcsnicmp(pwszUserToken, pwszCmdToken, wcslen(pwszUserToken)) == 0) ? TRUE : FALSE;
381}
382
383DWORD
384WINAPI
386 _In_ DWORD dwUnknown1,
387 _In_ PWSTR pszIfName,
388 _Inout_ PWSTR pszFriendlyName,
389 _Inout_ PDWORD pdwFriendlyName)
390{
391 UNICODE_STRING UnicodeIfName;
394 DWORD ret;
395
396 DPRINT("NsGetFriendlyNameFromIfName(%lx %S %p %p)\n",
397 dwUnknown1, pszIfName, pszFriendlyName, pdwFriendlyName);
398
399 RtlInitUnicodeString(&UnicodeIfName, pszIfName);
400 Status = RtlGUIDFromString(&UnicodeIfName,
402 if (!NT_SUCCESS(Status))
403 {
404 DPRINT1("RtlGUIDFromString failed 0x%08lx\n", Status);
406 }
407
409 pszFriendlyName,
410 pdwFriendlyName,
411 0, 0);
412 if (ret != ERROR_SUCCESS)
413 {
414 DPRINT1("NhGetInterfaceNameFromDeviceGuid() failed %lu\n", ret);
415 }
416
417 return ret;
418}
419
420DWORD
421WINAPI
427 _In_ TAG_TYPE *pttTags,
428 _In_ DWORD dwTagCount,
429 _In_ DWORD dwMinArgs,
430 _In_ DWORD dwMaxArgs,
431 _Out_ DWORD *pdwTagType)
432{
433 DPRINT1("PreprocessCommand()\n");
434 return 0;
435}
436
437DWORD
438CDECL
441 _In_ DWORD dwErrId,
442 ...)
443{
444 PWSTR pszInBuffer = NULL, pszOutBuffer = NULL;
445 DWORD dwLength = 0;
446 va_list ap;
447
448 DPRINT("PrintError(%p %lu ...)\n", hModule, dwErrId);
449
450 va_start(ap, dwErrId);
451
452 pszOutBuffer = HeapAlloc(GetProcessHeap(), 0, HUGE_BUFFER_SIZE * sizeof(WCHAR));
453 if (pszOutBuffer == NULL)
454 goto done;
455
456 if (hModule)
457 {
458 pszInBuffer = HeapAlloc(GetProcessHeap(), 0, HUGE_BUFFER_SIZE * sizeof(WCHAR));
459 if (pszInBuffer == NULL)
460 goto done;
461
462 dwLength = LoadStringW(hModule, dwErrId, pszInBuffer, HUGE_BUFFER_SIZE);
463 if (dwLength == 0)
464 goto done;
465
467 pszInBuffer,
468 0,
469 0,
470 pszOutBuffer,
472 &ap);
473 }
474 else
475 {
476 if ((dwErrId > NETSH_ERROR_BASE) && (dwErrId < NETSH_ERROR_END))
477 {
478 pszInBuffer = HeapAlloc(GetProcessHeap(), 0, HUGE_BUFFER_SIZE * sizeof(WCHAR));
479 if (pszInBuffer == NULL)
480 goto done;
481
482 dwLength = LoadStringW(GetModuleHandle(NULL), dwErrId, pszInBuffer, HUGE_BUFFER_SIZE);
483 if (dwLength == 0)
484 goto done;
485
487 pszInBuffer,
488 0,
489 0L,
490 pszOutBuffer,
492 &ap);
493 }
494 else
495 {
497 NULL,
498 dwErrId,
500 pszOutBuffer,
502 &ap);
503 }
504 }
505
506 va_end(ap);
507
508 if (dwLength > 0)
509 ConPuts(StdOut, pszOutBuffer);
510
511done:
512 if (pszOutBuffer)
513 HeapFree(GetProcessHeap(), 0, pszOutBuffer);
514
515 if (pszInBuffer)
516 HeapFree(GetProcessHeap(), 0, pszInBuffer);
517
518 return dwLength;
519}
520
521DWORD
522CDECL
525 _In_ DWORD dwMsgId,
526 ...)
527{
528 INT Length;
529 va_list ap;
530
531 va_start(ap, dwMsgId);
534 ap);
535 va_end(ap);
536
537 return Length;
538}
539
540DWORD
541CDECL
543 _In_ LPCWSTR pwszFormat,
544 ...)
545{
546 INT Length;
547 va_list ap;
548
549 va_start(ap, pwszFormat);
550 Length = ConPrintfV(StdOut, pwszFormat, ap);
551 va_end(ap);
552
553 return Length;
554}
static int argc
Definition: ServiceArgs.c:12
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
void ConPuts(FILE *fp, LPCWSTR psz)
Definition: fc.c:16
#define ConInitStdStreams()
Definition: fc.c:13
#define StdOut
Definition: fc.c:14
void ConResPrintf(FILE *fp, UINT nID,...)
Definition: fc.c:33
#define StdErr
Definition: fc.c:15
void ConResPuts(FILE *fp, UINT nID)
Definition: fc.c:27
LONG NTSTATUS
Definition: precomp.h:26
#define index(s, c)
Definition: various.h:29
VOID DestroyAliases(VOID)
Definition: alias.c:103
VOID InitAliases(VOID)
Definition: alias.c:95
BOOL CreateRootContext(VOID)
Definition: context.c:805
VOID CleanupContext(VOID)
Definition: context.c:999
PWSTR pszMachine
Definition: context.c:32
DWORD InterpretLine(_In_ LPWSTR pszInputLine)
Definition: interpreter.c:333
VOID InterpretInteractive(VOID)
Definition: interpreter.c:385
#define MAX_STRING_SIZE
Definition: precomp.h:40
#define HUGE_BUFFER_SIZE
Definition: precomp.h:38
#define IDS_OPEN_FAILED
Definition: resource.h:14
#define IDS_APP_USAGE
Definition: resource.h:12
#define DPRINT1
Definition: precomp.h:8
wcscat
wcscpy
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ERROR_SUCCESS
Definition: deptool.c:10
#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 CDECL
Definition: compat.h:29
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static DWORD DWORD * dwLength
Definition: fusion.c:86
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
LPWSTR WINAPI GetCommandLineW(void)
Definition: process.c:1338
INT WINAPI DECLSPEC_HOTPATCH LoadStringW(HINSTANCE instance, UINT resource_id, LPWSTR buffer, INT buflen)
Definition: string.c:1220
#define swprintf
Definition: precomp.h:40
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
Status
Definition: gdiplustypes.h:25
GLuint index
Definition: glext.h:6031
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
DWORD CreateRootHelper(VOID)
Definition: helper.c:245
VOID LoadHelpers(VOID)
Definition: helper.c:263
VOID UnloadHelpers(VOID)
Definition: helper.c:340
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
const char * filename
Definition: ioapi.h:137
DWORD WINAPI NhGetInterfaceNameFromDeviceGuid(_In_ const GUID *pInterfaceGUID, _Out_writes_bytes_to_(*pOutBufLen, *pOutBufLen) PWCHAR pInterfaceName, _Inout_ PULONG pOutBufLen, DWORD dwUnknown4, DWORD dwUnknown5)
#define EXIT_FAILURE
Definition: jerror.c:33
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define argv
Definition: mplay32.c:18
script
Definition: msipriv.h:383
VOID WINAPI FreeQuotedString(_In_ LPWSTR pszQuotedString)
Definition: netsh.c:269
DWORD WINAPI MatchEnumTag(_In_ HANDLE hModule, _In_ LPCWSTR pwcArg, _In_ DWORD dwNumArg, _In_ const TOKEN_VALUE *pEnumTable, _Out_ PDWORD pdwValue)
Definition: netsh.c:343
VOID WINAPI FreeString(_In_ LPWSTR pszString)
Definition: netsh.c:278
DWORD CDECL PrintError(_In_opt_ HANDLE hModule, _In_ DWORD dwErrId,...)
Definition: netsh.c:439
LPWSTR CDECL MakeString(_In_ HANDLE hModule, _In_ DWORD dwMsgId,...)
Definition: netsh.c:305
DWORD CDECL PrintMessage(_In_ LPCWSTR pwszFormat,...)
Definition: netsh.c:542
LPWSTR MergeStrings(_In_ LPWSTR pszStringArray[], _In_ INT nCount)
Definition: netsh.c:53
DWORD RunScript(_In_ LPCWSTR filename)
Definition: netsh.c:22
BOOL WINAPI MatchToken(_In_ LPCWSTR pwszUserToken, _In_ LPCWSTR pwszCmdToken)
Definition: netsh.c:371
DWORD WINAPI NsGetFriendlyNameFromIfName(_In_ DWORD dwUnknown1, _In_ PWSTR pszIfName, _Inout_ PWSTR pszFriendlyName, _Inout_ PDWORD pdwFriendlyName)
Definition: netsh.c:385
DWORD WINAPI PreprocessCommand(_In_ HANDLE hModule, _Inout_ LPWSTR *ppwcArguments, _In_ DWORD dwCurrentIndex, _In_ DWORD dwArgCount, _In_ TAG_TYPE *pttTags, _In_ DWORD dwTagCount, _In_ DWORD dwMinArgs, _In_ DWORD dwMaxArgs, _Out_ DWORD *pdwTagType)
Definition: netsh.c:422
DWORD CDECL PrintMessageFromModule(_In_ HANDLE hModule, _In_ DWORD dwMsgId,...)
Definition: netsh.c:523
LPWSTR WINAPI MakeQuotedString(_In_ LPWSTR pszString)
Definition: netsh.c:287
HMODULE hModule
Definition: netsh.c:17
#define NETSH_ERROR_BASE
Definition: netsh.h:8
#define ERROR_INVALID_SYNTAX
Definition: netsh.h:10
_In_ LPWSTR * ppwcArguments
Definition: netsh.h:114
_In_ LPWSTR _In_ DWORD dwArgCount
Definition: netsh.h:115
_In_ LPWSTR _In_ DWORD dwCurrentIndex
Definition: netsh.h:139
#define NETSH_ERROR_END
Definition: netsh.h:30
#define _Inout_
Definition: no_sal2.h:162
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
INT ConResPrintfExV(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId, IN va_list args)
Definition: outstream.c:653
INT ConPrintfV(IN PCON_STREAM Stream, IN PCWSTR szStr, IN va_list args)
Definition: outstream.c:466
DWORD * PDWORD
Definition: pedump.c:68
int wmain()
#define EXIT_SUCCESS
Definition: rdjpgcom.c:55
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define LANG_NEUTRAL
Definition: nls.h:22
#define MAKELANGID(p, s)
Definition: nls.h:15
#define SUBLANG_NEUTRAL
Definition: nls.h:167
#define SUBLANG_DEFAULT
Definition: nls.h:168
#define DPRINT
Definition: sndvol32.h:73
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
#define FORMAT_MESSAGE_FROM_STRING
Definition: winbase.h:398
#define GetModuleHandle
Definition: winbase.h:3576
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:400
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:396
WINBASEAPI _In_ DWORD nLength
Definition: wincon.h:682
#define WINAPI
Definition: msvc.h:6
#define ERROR_NOT_FOUND
Definition: winerror.h:1014
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36
static const GUID InterfaceGuid
Definition: wlanapi.c:25
wchar_t * fgetws(wchar_t *buf, int bufsize, FILE *file)
Definition: wmain.c:22
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184