2006-08-25 17:50:26 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
2007-10-19 23:21:45 +00:00
|
|
|
* PROJECT: ReactOS net command
|
2018-12-24 13:39:26 +00:00
|
|
|
* FILE: base/applications/network/net/cmdHelp.c
|
2007-10-19 23:21:45 +00:00
|
|
|
* PURPOSE:
|
2006-08-25 17:50:26 +00:00
|
|
|
*
|
2007-10-19 23:21:45 +00:00
|
|
|
* PROGRAMMERS: Magnus Olsen (greatlord@reactos.org)
|
2006-08-25 17:50:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "net.h"
|
|
|
|
|
2012-09-24 12:37:12 +00:00
|
|
|
INT cmdHelp(INT argc, WCHAR **argv)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2019-04-09 19:44:03 +00:00
|
|
|
PrintMessageString(4381);
|
|
|
|
ConPuts(StdOut, L"\n");
|
2018-04-01 10:23:15 +00:00
|
|
|
|
2013-04-30 02:57:30 +00:00
|
|
|
if (argc != 3)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2019-03-09 23:30:27 +00:00
|
|
|
PrintNetMessage(MSG_HELP_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_HELP_HELP);
|
2014-06-09 12:56:05 +00:00
|
|
|
return 0;
|
2006-08-25 17:50:26 +00:00
|
|
|
}
|
2019-03-09 23:30:27 +00:00
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"ACCOUNTS") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-23 15:47:16 +00:00
|
|
|
PrintNetMessage(MSG_ACCOUNTS_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_ACCOUNTS_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"COMPUTER") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-23 19:22:48 +00:00
|
|
|
PrintNetMessage(MSG_COMPUTER_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_COMPUTER_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"CONFIG") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-04-01 10:23:15 +00:00
|
|
|
if ((argc > 3) && (_wcsicmp(argv[3], L"SERVER") == 0))
|
|
|
|
{
|
2018-12-23 19:22:48 +00:00
|
|
|
PrintNetMessage(MSG_CONFIG_SERVER_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_CONFIG_SERVER_HELP);
|
2018-04-01 10:23:15 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-12-23 19:22:48 +00:00
|
|
|
PrintNetMessage(MSG_CONFIG_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_CONFIG_HELP);
|
2018-04-01 10:23:15 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2006-08-25 17:50:26 +00:00
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"CONTINUE") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-23 19:22:48 +00:00
|
|
|
PrintNetMessage(MSG_CONTINUE_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_CONTINUE_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"FILE") == 0)
|
2014-06-09 12:56:05 +00:00
|
|
|
{
|
2018-12-23 20:41:27 +00:00
|
|
|
PrintNetMessage(MSG_FILE_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_FILE_HELP);
|
2014-06-09 12:56:05 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"GROUP") == 0)
|
2014-06-09 12:56:05 +00:00
|
|
|
{
|
2018-12-23 20:41:27 +00:00
|
|
|
PrintNetMessage(MSG_GROUP_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_GROUP_HELP);
|
2014-06-09 12:56:05 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"HELPMSG") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-23 23:13:16 +00:00
|
|
|
PrintNetMessage(MSG_HELPMSG_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_HELPMSG_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"LOCALGROUP") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-23 23:13:16 +00:00
|
|
|
PrintNetMessage(MSG_LOCALGROUP_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_LOCALGROUP_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"PAUSE") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 00:25:30 +00:00
|
|
|
PrintNetMessage(MSG_PAUSE_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_PAUSE_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"SESSION") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 00:25:30 +00:00
|
|
|
PrintNetMessage(MSG_SESSION_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_SESSION_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"SHARE") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 00:25:30 +00:00
|
|
|
PrintNetMessage(MSG_SHARE_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_SHARE_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"START") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 09:20:44 +00:00
|
|
|
PrintNetMessage(MSG_START_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_START_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"STATISTICS") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 09:20:44 +00:00
|
|
|
PrintNetMessage(MSG_STATISTICS_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_STATISTICS_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"STOP") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 09:20:44 +00:00
|
|
|
PrintNetMessage(MSG_STOP_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_STOP_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"TIME") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 10:48:23 +00:00
|
|
|
PrintNetMessage(MSG_TIME_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_TIME_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"USE") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 10:48:23 +00:00
|
|
|
PrintNetMessage(MSG_USE_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_USE_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"USER") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 10:48:23 +00:00
|
|
|
PrintNetMessage(MSG_USER_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_USER_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"VIEW") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2018-12-24 10:48:23 +00:00
|
|
|
PrintNetMessage(MSG_VIEW_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_VIEW_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-06-09 12:56:05 +00:00
|
|
|
#if 0
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"SERVICES") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2019-03-10 00:04:26 +00:00
|
|
|
#endif
|
2006-08-25 17:50:26 +00:00
|
|
|
|
2017-09-01 18:00:06 +00:00
|
|
|
if (_wcsicmp(argv[2], L"SYNTAX") == 0)
|
2006-08-25 17:50:26 +00:00
|
|
|
{
|
2019-03-10 00:04:26 +00:00
|
|
|
PrintNetMessage(MSG_SYNTAX_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2014-06-09 12:56:05 +00:00
|
|
|
|
2018-12-23 20:41:27 +00:00
|
|
|
PrintNetMessage(MSG_HELP_SYNTAX);
|
|
|
|
PrintNetMessage(MSG_HELP_HELP);
|
2006-08-25 17:50:26 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-03-10 00:04:26 +00:00
|
|
|
|
|
|
|
INT
|
|
|
|
cmdSyntax(INT argc, WCHAR **argv)
|
|
|
|
{
|
2019-04-09 19:44:03 +00:00
|
|
|
PrintMessageString(4381);
|
|
|
|
ConPuts(StdOut, L"\n");
|
2019-03-10 00:04:26 +00:00
|
|
|
PrintNetMessage(MSG_SYNTAX_HELP);
|
|
|
|
return 0;
|
|
|
|
}
|