2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS net command
4 * FILE: base/applications/network/net/cmdContinue.c
7 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
12 INT
cmdContinue(INT argc
, WCHAR
**argv
)
14 SC_HANDLE hManager
= NULL
;
15 SC_HANDLE hService
= NULL
;
16 SERVICE_STATUS status
;
22 ConResPuts(StdOut
, IDS_GENERIC_SYNTAX
);
23 ConResPuts(StdOut
, IDS_CONTINUE_SYNTAX
);
27 for (i
= 2; i
< argc
; i
++)
29 if (_wcsicmp(argv
[i
], L
"/help") == 0)
31 ConResPuts(StdOut
, IDS_GENERIC_SYNTAX
);
32 ConResPuts(StdOut
, IDS_CONTINUE_SYNTAX
);
33 ConResPuts(StdOut
, IDS_CONTINUE_HELP_1
);
34 ConResPuts(StdOut
, IDS_CONTINUE_HELP_2
);
35 ConResPuts(StdOut
, IDS_GENERIC_PAGE
);
40 hManager
= OpenSCManager(NULL
, SERVICES_ACTIVE_DATABASE
, SC_MANAGER_ENUMERATE_SERVICE
);
43 ConPrintf(StdErr
, L
"[OpenSCManager] Error: %ld\n", GetLastError());
48 hService
= OpenService(hManager
, argv
[2], SERVICE_PAUSE_CONTINUE
);
51 ConPrintf(StdErr
, L
"[OpenService] Error: %ld\n", GetLastError());
56 if (!ControlService(hService
, SERVICE_CONTROL_CONTINUE
, &status
))
58 ConPrintf(StdErr
, L
"[ControlService] Error: %ld\n", GetLastError());
64 CloseServiceHandle(hService
);
67 CloseServiceHandle(hManager
);