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
b10dcfe3
Commit
b10dcfe3
authored
Oct 10, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure we always use the same name for the semaphore (spotted by
Ben A L Jemmett).
parent
7515680a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
20 deletions
+10
-20
service.c
dlls/advapi32/service.c
+10
-20
No files found.
dlls/advapi32/service.c
View file @
b10dcfe3
...
...
@@ -37,6 +37,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi);
static
DWORD
start_dwNumServiceArgs
;
static
LPWSTR
*
start_lpServiceArgVectors
;
static
const
WCHAR
_ServiceStartDataW
[]
=
{
'A'
,
'D'
,
'V'
,
'A'
,
'P'
,
'I'
,
'_'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
'S'
,
't'
,
'a'
,
'r'
,
't'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
/******************************************************************************
* EnumServicesStatusA [ADVAPI32.@]
*/
...
...
@@ -81,7 +85,7 @@ StartServiceCtrlDispatcherA( LPSERVICE_TABLE_ENTRYA servent )
int
i
;
TRACE
(
"(%p)
\n
"
,
servent
);
wait
=
OpenSemaphore
A
(
SEMAPHORE_ALL_ACCESS
,
FALSE
,
"ADVAPI32_ServiceStartData"
);
wait
=
OpenSemaphore
W
(
SEMAPHORE_ALL_ACCESS
,
FALSE
,
_ServiceStartDataW
);
if
(
wait
==
0
)
{
ERR
(
"Couldn't find wait semaphore
\n
"
);
...
...
@@ -135,9 +139,6 @@ StartServiceCtrlDispatcherA( LPSERVICE_TABLE_ENTRYA servent )
BOOL
WINAPI
StartServiceCtrlDispatcherW
(
LPSERVICE_TABLE_ENTRYW
servent
)
{
static
const
WCHAR
_ServiceStartDataW
[]
=
{
'A'
,
'D'
,
'V'
,
'A'
,
'P'
,
'I'
,
'_'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
'S'
,
't'
,
'a'
,
'r'
,
't'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
LPSERVICE_MAIN_FUNCTIONW
fpMain
;
HANDLE
wait
;
DWORD
dwNumServiceArgs
;
...
...
@@ -608,10 +609,6 @@ BOOL WINAPI
StartServiceW
(
SC_HANDLE
hService
,
DWORD
dwNumServiceArgs
,
LPCWSTR
*
lpServiceArgVectors
)
{
static
const
WCHAR
_ServiceStartDataW
[]
=
{
'A'
,
'D'
,
'V'
,
'A'
,
'P'
,
'I'
,
'_'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
'S'
,
't'
,
'a'
,
'r'
,
't'
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
static
const
WCHAR
_WaitServiceStartW
[]
=
{
'A'
,
'D'
,
'V'
,
'A'
,
'P'
,
'I'
,
'_'
,
'W'
,
'a'
,
'i'
,
't'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
'S'
,
't'
,
'a'
,
'r'
,
't'
,
0
};
...
...
@@ -637,21 +634,14 @@ StartServiceW( SC_HANDLE hService, DWORD dwNumServiceArgs,
data
=
CreateSemaphoreW
(
NULL
,
1
,
1
,
_ServiceStartDataW
);
if
(
!
data
)
{
data
=
OpenSemaphoreW
(
SEMAPHORE_ALL_ACCESS
,
FALSE
,
_ServiceStartDataW
);
if
(
data
==
0
)
{
ERR
(
"Couldn't create data semaphore
\n
"
);
return
FALSE
;
}
ERR
(
"Couldn't create data semaphore
\n
"
);
return
FALSE
;
}
wait
=
CreateSemaphoreW
(
NULL
,
0
,
1
,
_WaitServiceStartW
);
if
(
!
wait
)
{
wait
=
OpenSemaphoreW
(
SEMAPHORE_ALL_ACCESS
,
FALSE
,
_ServiceStartDataW
);
if
(
wait
==
0
)
{
ERR
(
"Couldn't create wait semaphore
\n
"
);
return
FALSE
;
}
ERR
(
"Couldn't create wait semaphore
\n
"
);
return
FALSE
;
}
/*
...
...
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