mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:11:48 +00:00
couple of fixes to get it building under mingw
svn path=/trunk/; revision=19027
This commit is contained in:
parent
96d7886067
commit
23a4529556
3 changed files with 13 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
<define name="DEFINE_GUID" />
|
||||
<library>kernel32</library>
|
||||
<file>sc.c</file>
|
||||
<file>manage.c</file>
|
||||
<file>start.c</file>
|
||||
<file>query.c</file>
|
||||
<file>control.c</file>
|
||||
<file>create.c</file>
|
||||
<file>delete.c</file>
|
||||
<file>usage.c</file>
|
||||
<file>sc.rc</file>
|
||||
</module>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue