From: Ged Murphy Date: Sun, 6 Nov 2005 13:30:42 +0000 (+0000) Subject: couple of fixes to get it building under mingw X-Git-Tag: backups/ros-branch-0_2_9@19949~871 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=23a452955637b600d7fc6d9adfe51c9c353c5efd couple of fixes to get it building under mingw svn path=/trunk/; revision=19027 --- diff --git a/reactos/subsys/system/sc/query.c b/reactos/subsys/system/sc/query.c index f2333017ece..968742daafe 100644 --- a/reactos/subsys/system/sc/query.c +++ b/reactos/subsys/system/sc/query.c @@ -13,7 +13,7 @@ /* local function decs */ VOID PrintService(BOOL bExtended); -INT EnumServices(DWORD ServiceType, DWORD ServiceState); +BOOL EnumServices(DWORD ServiceType, DWORD ServiceState); /* global variables */ static ENUM_SERVICE_STATUS_PROCESS *pServiceStatus = NULL; @@ -88,13 +88,15 @@ BOOL Query(LPCTSTR ServiceName, LPCTSTR *ServiceArgs, BOOL bExtended) /* print default values */ PrintService(bExtended); } + + return TRUE; } -INT EnumServices(DWORD ServiceType, DWORD ServiceState) +BOOL EnumServices(DWORD ServiceType, DWORD ServiceState) { - SC_HANDLE hSc; + //SC_HANDLE hSc; DWORD BufSize = 0; DWORD BytesNeeded = 0; DWORD NumServices = 0; @@ -144,6 +146,8 @@ INT EnumServices(DWORD ServiceType, DWORD ServiceState) return FALSE; } } + + return TRUE; } diff --git a/reactos/subsys/system/sc/sc.c b/reactos/subsys/system/sc/sc.c index a82231f43ee..657d6d786bd 100644 --- a/reactos/subsys/system/sc/sc.c +++ b/reactos/subsys/system/sc/sc.c @@ -62,7 +62,7 @@ INT ScControl(LPTSTR MachineName, // remote machine name hSCManager = OpenSCManager(MachineName, NULL, SC_MANAGER_ALL_ACCESS); if (hSCManager == NULL) { - _tprintf(_T("[SC] OpenSCManager FAILED %d:\n\n"), GetLastError()); + _tprintf(_T("[SC] OpenSCManager FAILED %lu:\n\n"), GetLastError()); ReportLastError(); return -1; } @@ -134,7 +134,7 @@ INT ScControl(LPTSTR MachineName, // remote machine name } -int _tmain(DWORD argc, LPCTSTR argv[]) +int _tmain(int argc, LPCTSTR argv[]) { LPTSTR MachineName = NULL; // remote machine LPCTSTR Command = NULL; // sc command diff --git a/reactos/subsys/system/sc/sc.xml b/reactos/subsys/system/sc/sc.xml index 7f0dad68622..9ba8301bffc 100644 --- a/reactos/subsys/system/sc/sc.xml +++ b/reactos/subsys/system/sc/sc.xml @@ -3,8 +3,11 @@ kernel32 sc.c - manage.c + start.c query.c + control.c + create.c + delete.c usage.c sc.rc