2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS net command
4 * FILE: base/applications/network/net/cmdHelpMsg.c
7 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
14 INT
cmdHelpMsg(INT argc
, WCHAR
**argv
)
19 // DWORD dwLength = 0;
24 ConResPuts(StdOut
, IDS_HELPMSG_SYNTAX
);
28 for (i
= 2; i
< argc
; i
++)
30 if (_wcsicmp(argv
[i
], L
"/help") == 0)
32 ConResPuts(StdOut
, IDS_HELPMSG_HELP
);
37 errNum
= wcstol(argv
[2], &endptr
, 10);
40 ConResPuts(StdOut
, IDS_HELPMSG_SYNTAX
);
44 /* Retrieve the message string without appending extra newlines */
46 FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER
| FORMAT_MESSAGE_FROM_SYSTEM
|
47 FORMAT_MESSAGE_IGNORE_INSERTS
| FORMAT_MESSAGE_MAX_WIDTH_MASK
,
53 if (lpBuffer
/* && dwLength */)
55 ConPrintf(StdOut
, L
"\n%s\n", lpBuffer
);
60 ConPrintf(StdOut
, L
"Unrecognized error code: %ld\n", errNum
);