mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:53:06 +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 */
|
/* local function decs */
|
||||||
VOID PrintService(BOOL bExtended);
|
VOID PrintService(BOOL bExtended);
|
||||||
INT EnumServices(DWORD ServiceType, DWORD ServiceState);
|
BOOL EnumServices(DWORD ServiceType, DWORD ServiceState);
|
||||||
|
|
||||||
/* global variables */
|
/* global variables */
|
||||||
static ENUM_SERVICE_STATUS_PROCESS *pServiceStatus = NULL;
|
static ENUM_SERVICE_STATUS_PROCESS *pServiceStatus = NULL;
|
||||||
|
@ -89,12 +89,14 @@ BOOL Query(LPCTSTR ServiceName, LPCTSTR *ServiceArgs, BOOL bExtended)
|
||||||
PrintService(bExtended);
|
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 BufSize = 0;
|
||||||
DWORD BytesNeeded = 0;
|
DWORD BytesNeeded = 0;
|
||||||
DWORD NumServices = 0;
|
DWORD NumServices = 0;
|
||||||
|
@ -144,6 +146,8 @@ INT EnumServices(DWORD ServiceType, DWORD ServiceState)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ INT ScControl(LPTSTR MachineName, // remote machine name
|
||||||
hSCManager = OpenSCManager(MachineName, NULL, SC_MANAGER_ALL_ACCESS);
|
hSCManager = OpenSCManager(MachineName, NULL, SC_MANAGER_ALL_ACCESS);
|
||||||
if (hSCManager == NULL)
|
if (hSCManager == NULL)
|
||||||
{
|
{
|
||||||
_tprintf(_T("[SC] OpenSCManager FAILED %d:\n\n"), GetLastError());
|
_tprintf(_T("[SC] OpenSCManager FAILED %lu:\n\n"), GetLastError());
|
||||||
ReportLastError();
|
ReportLastError();
|
||||||
return -1;
|
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
|
LPTSTR MachineName = NULL; // remote machine
|
||||||
LPCTSTR Command = NULL; // sc command
|
LPCTSTR Command = NULL; // sc command
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
<define name="DEFINE_GUID" />
|
<define name="DEFINE_GUID" />
|
||||||
<library>kernel32</library>
|
<library>kernel32</library>
|
||||||
<file>sc.c</file>
|
<file>sc.c</file>
|
||||||
<file>manage.c</file>
|
<file>start.c</file>
|
||||||
<file>query.c</file>
|
<file>query.c</file>
|
||||||
|
<file>control.c</file>
|
||||||
|
<file>create.c</file>
|
||||||
|
<file>delete.c</file>
|
||||||
<file>usage.c</file>
|
<file>usage.c</file>
|
||||||
<file>sc.rc</file>
|
<file>sc.rc</file>
|
||||||
</module>
|
</module>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue