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
3f6f036b
Commit
3f6f036b
authored
Jun 01, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Start the 32-bit winedevice.exe for 32-bit kernel drivers.
parent
0dd44a37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
services.c
programs/services/services.c
+23
-10
No files found.
programs/services/services.c
View file @
3f6f036b
...
...
@@ -38,6 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(service);
HANDLE
g_hStartedEvent
;
struct
scmdatabase
*
active_database
;
static
const
int
is_win64
=
(
sizeof
(
void
*
)
>
sizeof
(
int
));
static
const
WCHAR
SZ_LOCAL_SYSTEM
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
0
};
/* Registry constants */
...
...
@@ -548,25 +550,36 @@ static DWORD service_start_process(struct service_entry *service_entry, HANDLE *
service_lock_exclusive
(
service_entry
);
size
=
ExpandEnvironmentStringsW
(
service_entry
->
config
.
lpBinaryPathName
,
NULL
,
0
);
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
if
(
!
path
)
return
ERROR_NOT_ENOUGH_SERVER_MEMORY
;
ExpandEnvironmentStringsW
(
service_entry
->
config
.
lpBinaryPathName
,
path
,
size
);
if
(
service_entry
->
config
.
dwServiceType
==
SERVICE_KERNEL_DRIVER
)
{
static
const
WCHAR
winedeviceW
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
'e'
,
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
0
};
DWORD
len
=
GetSystemDirectoryW
(
NULL
,
0
)
+
sizeof
(
winedeviceW
)
/
sizeof
(
WCHAR
)
+
strlenW
(
service_entry
->
name
);
WCHAR
system_dir
[
MAX_PATH
];
DWORD
type
,
len
;
GetSystemDirectoryW
(
system_dir
,
MAX_PATH
);
if
(
is_win64
)
{
if
(
!
GetBinaryTypeW
(
path
,
&
type
))
{
HeapFree
(
GetProcessHeap
(),
0
,
path
);
return
GetLastError
();
}
if
(
type
==
SCS_32BIT_BINARY
)
GetSystemWow64DirectoryW
(
system_dir
,
MAX_PATH
);
}
len
=
strlenW
(
system_dir
)
+
sizeof
(
winedeviceW
)
/
sizeof
(
WCHAR
)
+
strlenW
(
service_entry
->
name
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
if
(
!
(
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
ERROR_NOT_ENOUGH_SERVER_MEMORY
;
GetSystemDirectoryW
(
path
,
len
);
lstrcpyW
(
path
,
system_dir
);
lstrcatW
(
path
,
winedeviceW
);
lstrcatW
(
path
,
service_entry
->
name
);
}
else
{
size
=
ExpandEnvironmentStringsW
(
service_entry
->
config
.
lpBinaryPathName
,
NULL
,
0
);
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
if
(
!
path
)
return
ERROR_NOT_ENOUGH_SERVER_MEMORY
;
ExpandEnvironmentStringsW
(
service_entry
->
config
.
lpBinaryPathName
,
path
,
size
);
}
ZeroMemory
(
&
si
,
sizeof
(
STARTUPINFOW
));
si
.
cb
=
sizeof
(
STARTUPINFOW
);
...
...
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