Commit 70d4f9b0 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

sc: Enable compilation with long types.

parent 8806159b
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = sc.exe MODULE = sc.exe
IMPORTS = advapi32 IMPORTS = advapi32
......
...@@ -220,7 +220,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] ) ...@@ -220,7 +220,7 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
CloseServiceHandle( service ); CloseServiceHandle( service );
ret = TRUE; ret = TRUE;
} }
else WINE_TRACE("failed to create service %u\n", GetLastError()); else WINE_TRACE("failed to create service %lu\n", GetLastError());
} }
else if (!wcsicmp( argv[1], L"description" )) else if (!wcsicmp( argv[1], L"description" ))
{ {
...@@ -230,10 +230,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] ) ...@@ -230,10 +230,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
SERVICE_DESCRIPTIONW sd; SERVICE_DESCRIPTIONW sd;
sd.lpDescription = argc > 3 ? (WCHAR *)argv[3] : NULL; sd.lpDescription = argc > 3 ? (WCHAR *)argv[3] : NULL;
ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_DESCRIPTION, &sd ); ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_DESCRIPTION, &sd );
if (!ret) WINE_TRACE("failed to set service description %u\n", GetLastError()); if (!ret) WINE_TRACE("failed to set service description %lu\n", GetLastError());
CloseServiceHandle( service ); CloseServiceHandle( service );
} }
else WINE_TRACE("failed to open service %u\n", GetLastError()); else WINE_TRACE("failed to open service %lu\n", GetLastError());
} }
else if (!wcsicmp( argv[1], L"failure" )) else if (!wcsicmp( argv[1], L"failure" ))
{ {
...@@ -244,14 +244,14 @@ int __cdecl wmain( int argc, const WCHAR *argv[] ) ...@@ -244,14 +244,14 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
if (parse_failure_params( argc - 3, argv + 3, &sfa )) if (parse_failure_params( argc - 3, argv + 3, &sfa ))
{ {
ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_FAILURE_ACTIONS, &sfa ); ret = ChangeServiceConfig2W( service, SERVICE_CONFIG_FAILURE_ACTIONS, &sfa );
if (!ret) WINE_TRACE("failed to set service failure actions %u\n", GetLastError()); if (!ret) WINE_TRACE("failed to set service failure actions %lu\n", GetLastError());
HeapFree( GetProcessHeap(), 0, sfa.lpsaActions ); HeapFree( GetProcessHeap(), 0, sfa.lpsaActions );
} }
else else
WINE_WARN("failed to parse failure parameters\n"); WINE_WARN("failed to parse failure parameters\n");
CloseServiceHandle( service ); CloseServiceHandle( service );
} }
else WINE_TRACE("failed to open service %u\n", GetLastError()); else WINE_TRACE("failed to open service %lu\n", GetLastError());
} }
else if (!wcsicmp( argv[1], L"delete" )) else if (!wcsicmp( argv[1], L"delete" ))
{ {
...@@ -259,10 +259,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] ) ...@@ -259,10 +259,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
if (service) if (service)
{ {
ret = DeleteService( service ); ret = DeleteService( service );
if (!ret) WINE_TRACE("failed to delete service %u\n", GetLastError()); if (!ret) WINE_TRACE("failed to delete service %lu\n", GetLastError());
CloseServiceHandle( service ); CloseServiceHandle( service );
} }
else WINE_TRACE("failed to open service %u\n", GetLastError()); else WINE_TRACE("failed to open service %lu\n", GetLastError());
} }
else if (!wcsicmp( argv[1], L"start" )) else if (!wcsicmp( argv[1], L"start" ))
{ {
...@@ -270,10 +270,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] ) ...@@ -270,10 +270,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
if (service) if (service)
{ {
ret = StartServiceW( service, argc - 3, argv + 3 ); ret = StartServiceW( service, argc - 3, argv + 3 );
if (!ret) WINE_TRACE("failed to start service %u\n", GetLastError()); if (!ret) WINE_TRACE("failed to start service %lu\n", GetLastError());
CloseServiceHandle( service ); CloseServiceHandle( service );
} }
else WINE_TRACE("failed to open service %u\n", GetLastError()); else WINE_TRACE("failed to open service %lu\n", GetLastError());
} }
else if (!wcsicmp( argv[1], L"stop" )) else if (!wcsicmp( argv[1], L"stop" ))
{ {
...@@ -281,10 +281,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] ) ...@@ -281,10 +281,10 @@ int __cdecl wmain( int argc, const WCHAR *argv[] )
if (service) if (service)
{ {
ret = ControlService( service, SERVICE_CONTROL_STOP, &status ); ret = ControlService( service, SERVICE_CONTROL_STOP, &status );
if (!ret) WINE_TRACE("failed to stop service %u\n", GetLastError()); if (!ret) WINE_TRACE("failed to stop service %lu\n", GetLastError());
CloseServiceHandle( service ); CloseServiceHandle( service );
} }
else WINE_TRACE("failed to open service %u\n", GetLastError()); else WINE_TRACE("failed to open service %lu\n", GetLastError());
} }
else if (!wcsicmp( argv[1], L"sdset" )) else if (!wcsicmp( argv[1], L"sdset" ))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment