Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
70d4f9b0
Commit
70d4f9b0
authored
Feb 07, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sc: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8806159b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
Makefile.in
programs/sc/Makefile.in
+0
-1
sc.c
programs/sc/sc.c
+11
-11
No files found.
programs/sc/Makefile.in
View file @
70d4f9b0
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
sc.exe
MODULE
=
sc.exe
IMPORTS
=
advapi32
IMPORTS
=
advapi32
...
...
programs/sc/sc.c
View file @
70d4f9b0
...
@@ -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 %
l
u
\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 %
l
u
\n
"
,
GetLastError
());
CloseServiceHandle
(
service
);
CloseServiceHandle
(
service
);
}
}
else
WINE_TRACE
(
"failed to open service %u
\n
"
,
GetLastError
());
else
WINE_TRACE
(
"failed to open service %
l
u
\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 %
l
u
\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 %
l
u
\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 %
l
u
\n
"
,
GetLastError
());
CloseServiceHandle
(
service
);
CloseServiceHandle
(
service
);
}
}
else
WINE_TRACE
(
"failed to open service %u
\n
"
,
GetLastError
());
else
WINE_TRACE
(
"failed to open service %
l
u
\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 %
l
u
\n
"
,
GetLastError
());
CloseServiceHandle
(
service
);
CloseServiceHandle
(
service
);
}
}
else
WINE_TRACE
(
"failed to open service %u
\n
"
,
GetLastError
());
else
WINE_TRACE
(
"failed to open service %
l
u
\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 %
l
u
\n
"
,
GetLastError
());
CloseServiceHandle
(
service
);
CloseServiceHandle
(
service
);
}
}
else
WINE_TRACE
(
"failed to open service %u
\n
"
,
GetLastError
());
else
WINE_TRACE
(
"failed to open service %
l
u
\n
"
,
GetLastError
());
}
}
else
if
(
!
wcsicmp
(
argv
[
1
],
L"sdset"
))
else
if
(
!
wcsicmp
(
argv
[
1
],
L"sdset"
))
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment