Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
6840a927
Commit
6840a927
authored
13 years ago
by
Bernhard Loos
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
winedevice: A driver path can also start with \systemroot\.
parent
da110750
Branches
Branches containing commit
Tags
wine-950620
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
programs/winedevice/device.c
+20
-4
20 additions, 4 deletions
programs/winedevice/device.c
with
20 additions
and
4 deletions
programs/winedevice/device.c
+
20
−
4
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,12 +241,9 @@ static BOOL load_driver(void)
lstrcatW
(
path
,
driversW
);
lstrcatW
(
path
,
driver_name
);
lstrcatW
(
path
,
postfixW
);
str
=
path
;
}
/* 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
)
);
module
=
load_driver_module
(
str
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment