summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3320716)
On enumeration, don't print raw status
svn path=/trunk/; revision=73449
+static
+VOID
+PrintError(DWORD Status)
+{
+ LPWSTR Buffer;
+
+ ConResPrintf(StdErr, IDS_ERROR_SYSTEM_ERROR, Status);
+
+ if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, Status, 0, (LPWSTR)&Buffer, 0, NULL))
+ {
+ ConPrintf(StdErr, L"\n%s", Buffer);
+ LocalFree(Buffer);
+ }
+}
+
if (argc == 2)
{
Status = EnumerateConnections(NULL);
if (argc == 2)
{
Status = EnumerateConnections(NULL);
- ConPrintf(StdOut, L"Status: %lu\n", Status);
+ if (Status == NO_ERROR)
+ ConResPrintf(StdOut, IDS_ERROR_NO_ERROR);
+ else
+ PrintError(Status);
+
return 0;
}
else if (argc == 3)
return 0;
}
else if (argc == 3)
}
Status = EnumerateConnections(argv[2]);
}
Status = EnumerateConnections(argv[2]);
- ConPrintf(StdOut, L"Status: %lu\n", Status);
+ if (Status == NO_ERROR)
+ ConResPrintf(StdOut, IDS_ERROR_NO_ERROR);
+ else
+ PrintError(Status);
+
if (Len != 1 && Len != 2)
{
ConResPrintf(StdErr, IDS_ERROR_INVALID_OPTION_VALUE, L"DeviceName");
if (Len != 1 && Len != 2)
{
ConResPrintf(StdErr, IDS_ERROR_INVALID_OPTION_VALUE, L"DeviceName");
- ConPrintf(StdOut, L"Len: %lu\n", Len);
if (argv[2][0] == L'*' && Status == NO_ERROR && OutFlags == CONNECT_LOCALDRIVE)
ConResPrintf(StdOut, IDS_USE_NOW_CONNECTED, argv[3], Access);
else if (Status != NO_ERROR)
if (argv[2][0] == L'*' && Status == NO_ERROR && OutFlags == CONNECT_LOCALDRIVE)
ConResPrintf(StdOut, IDS_USE_NOW_CONNECTED, argv[3], Access);
else if (Status != NO_ERROR)
- {
- LPWSTR Buffer;
-
- ConResPrintf(StdErr, IDS_ERROR_SYSTEM_ERROR, Status);
-
- if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, Status, 0, (LPWSTR)&Buffer, 0, NULL))
- {
- ConPrintf(StdErr, L"\n%s\n", Buffer);
- LocalFree(Buffer);
- }
- }
IDS_ERROR_OPTION_NOT_SUPPORTED "The %s option is not supported yet.\n"
IDS_ERROR_INVALID_OPTION_VALUE "You entered an invalid value for the %s option.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "The %s option is not supported yet.\n"
IDS_ERROR_INVALID_OPTION_VALUE "You entered an invalid value for the %s option.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
+ IDS_ERROR_NO_ERROR "The command got executed successfully.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "La opción %s todavía no está disponible.\n"
IDS_ERROR_INVALID_OPTION_VALUE "El valor para la opción %s no es válido.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "La opción %s todavía no está disponible.\n"
IDS_ERROR_INVALID_OPTION_VALUE "El valor para la opción %s no es válido.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
+ IDS_ERROR_NO_ERROR "The command got executed successfully.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "Opţiunea %s încă nu este admisă.\n"
IDS_ERROR_INVALID_OPTION_VALUE "Aţi introdus o valoare nevalidă pentru opţiunea %s.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "Opţiunea %s încă nu este admisă.\n"
IDS_ERROR_INVALID_OPTION_VALUE "Aţi introdus o valoare nevalidă pentru opţiunea %s.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
+ IDS_ERROR_NO_ERROR "The command got executed successfully.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "Опция %s в данный момент не поддерживается.\n"
IDS_ERROR_INVALID_OPTION_VALUE "Вы ввели неверный данные для данной опции %s.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "Опция %s в данный момент не поддерживается.\n"
IDS_ERROR_INVALID_OPTION_VALUE "Вы ввели неверный данные для данной опции %s.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
+ IDS_ERROR_NO_ERROR "The command got executed successfully.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "%s seçeneği daha desteklenmiyor.\n"
IDS_ERROR_INVALID_OPTION_VALUE "%s seçeneği için geçersiz bir değer girdiniz.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "%s seçeneği daha desteklenmiyor.\n"
IDS_ERROR_INVALID_OPTION_VALUE "%s seçeneği için geçersiz bir değer girdiniz.\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
+ IDS_ERROR_NO_ERROR "The command got executed successfully.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "尚不支持 %s 选项。\n"
IDS_ERROR_INVALID_OPTION_VALUE "Y您输入了无效的值为 %s 选项。\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "尚不支持 %s 选项。\n"
IDS_ERROR_INVALID_OPTION_VALUE "Y您输入了无效的值为 %s 选项。\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
+ IDS_ERROR_NO_ERROR "The command got executed successfully.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "尚不支援 %s 選項。\n"
IDS_ERROR_INVALID_OPTION_VALUE "您輸入了無效的值為 %s 選項。\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
IDS_ERROR_OPTION_NOT_SUPPORTED "尚不支援 %s 選項。\n"
IDS_ERROR_INVALID_OPTION_VALUE "您輸入了無效的值為 %s 選項。\n"
IDS_ERROR_SYSTEM_ERROR "The system error %d happened.\n"
+ IDS_ERROR_NO_ERROR "The command got executed successfully.\n"
#define IDS_ERROR_OPTION_NOT_SUPPORTED 700
#define IDS_ERROR_INVALID_OPTION_VALUE 701
#define IDS_ERROR_SYSTEM_ERROR 702
#define IDS_ERROR_OPTION_NOT_SUPPORTED 700
#define IDS_ERROR_INVALID_OPTION_VALUE 701
#define IDS_ERROR_SYSTEM_ERROR 702
+#define IDS_ERROR_NO_ERROR 703