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
6840a927
Commit
6840a927
authored
Nov 23, 2011
by
Bernhard Loos
Committed by
Alexandre Julliard
Nov 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedevice: A driver path can also start with \systemroot\.
parent
da110750
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
device.c
programs/winedevice/device.c
+20
-4
No files found.
programs/winedevice/device.c
View file @
6840a927
...
...
@@ -170,6 +170,7 @@ static NTSTATUS init_driver( HMODULE module, UNICODE_STRING *keyname )
static
BOOL
load_driver
(
void
)
{
static
const
WCHAR
driversW
[]
=
{
'\\'
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
'\\'
,
0
};
static
const
WCHAR
systemrootW
[]
=
{
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'R'
,
'o'
,
'o'
,
't'
,
'\\'
,
0
};
static
const
WCHAR
postfixW
[]
=
{
'.'
,
's'
,
'y'
,
's'
,
0
};
static
const
WCHAR
ntprefixW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
0
};
static
const
WCHAR
ImagePathW
[]
=
{
'I'
,
'm'
,
'a'
,
'g'
,
'e'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
...
...
@@ -209,6 +210,24 @@ static BOOL load_driver(void)
}
HeapFree
(
GetProcessHeap
(),
0
,
str
);
if
(
!
path
)
return
FALSE
;
if
(
!
strncmpiW
(
path
,
systemrootW
,
12
))
{
WCHAR
buffer
[
MAX_PATH
];
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
size
-
11
+
strlenW
(
buffer
))
*
sizeof
(
WCHAR
));
lstrcpyW
(
str
,
buffer
);
lstrcatW
(
str
,
path
+
11
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
path
=
str
;
}
else
if
(
!
strncmpW
(
path
,
ntprefixW
,
4
))
str
=
path
+
4
;
else
str
=
path
;
}
else
{
...
...
@@ -222,11 +241,8 @@ static BOOL load_driver(void)
lstrcatW
(
path
,
driversW
);
lstrcatW
(
path
,
driver_name
);
lstrcatW
(
path
,
postfixW
);
}
/* GameGuard uses an NT-style path name */
str
=
path
;
if
(
!
strncmpW
(
path
,
ntprefixW
,
4
))
str
+=
4
;
}
WINE_TRACE
(
"loading driver %s
\n
"
,
wine_dbgstr_w
(
str
)
);
...
...
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