Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
354aabd7
Commit
354aabd7
authored
Nov 11, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Add a few more dirids.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b940c5e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
28 deletions
+22
-28
dirid.c
dlls/setupapi/dirid.c
+22
-28
No files found.
dlls/setupapi/dirid.c
View file @
354aabd7
...
...
@@ -56,14 +56,13 @@ static const WCHAR *csidl_dirids[MAX_CSIDL_DIRID-MIN_CSIDL_DIRID+1];
static
const
WCHAR
*
get_unknown_dirid
(
void
)
{
static
WCHAR
*
unknown_dirid
;
static
const
WCHAR
unknown_str
[]
=
{
'\\'
,
'u'
,
'n'
,
'k'
,
'n'
,
'o'
,
'w'
,
'n'
,
0
};
if
(
!
unknown_dirid
)
{
UINT
len
=
GetSystemDirectoryW
(
NULL
,
0
)
+
lstrlenW
(
unknown_str
);
UINT
len
=
GetSystemDirectoryW
(
NULL
,
0
)
+
lstrlenW
(
L"
\\
unknown"
);
if
(
!
(
unknown_dirid
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
)))
return
NULL
;
GetSystemDirectoryW
(
unknown_dirid
,
len
);
lstrcatW
(
unknown_dirid
,
unknown_str
);
lstrcatW
(
unknown_dirid
,
L"
\\
unknown"
);
}
return
unknown_dirid
;
}
...
...
@@ -73,17 +72,6 @@ static const WCHAR *get_csidl_dir(DWORD csidl);
/* create the string for a system dirid */
static
const
WCHAR
*
create_system_dirid
(
int
dirid
)
{
static
const
WCHAR
Null
[]
=
{
0
};
static
const
WCHAR
C_Root
[]
=
{
'C'
,
':'
,
'\\'
,
0
};
static
const
WCHAR
Drivers
[]
=
{
'\\'
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
0
};
static
const
WCHAR
Inf
[]
=
{
'\\'
,
'i'
,
'n'
,
'f'
,
0
};
static
const
WCHAR
Help
[]
=
{
'\\'
,
'h'
,
'e'
,
'l'
,
'p'
,
0
};
static
const
WCHAR
Fonts
[]
=
{
'\\'
,
'f'
,
'o'
,
'n'
,
't'
,
's'
,
0
};
static
const
WCHAR
Viewers
[]
=
{
'\\'
,
'v'
,
'i'
,
'e'
,
'w'
,
'e'
,
'r'
,
's'
,
0
};
static
const
WCHAR
System
[]
=
{
'\\'
,
's'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
0
};
static
const
WCHAR
Spool
[]
=
{
'\\'
,
's'
,
'p'
,
'o'
,
'o'
,
'l'
,
0
};
static
const
WCHAR
UserProfile
[]
=
{
'U'
,
'S'
,
'E'
,
'R'
,
'P'
,
'R'
,
'O'
,
'F'
,
'I'
,
'L'
,
'E'
,
0
};
WCHAR
buffer
[
MAX_PATH
+
32
],
*
str
;
int
len
;
DWORD
needed
;
...
...
@@ -91,7 +79,7 @@ static const WCHAR *create_system_dirid( int dirid )
switch
(
dirid
)
{
case
DIRID_NULL
:
return
Null
;
return
L""
;
case
DIRID_WINDOWS
:
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
break
;
...
...
@@ -100,45 +88,52 @@ static const WCHAR *create_system_dirid( int dirid )
break
;
case
DIRID_DRIVERS
:
GetSystemDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
Drivers
);
lstrcatW
(
buffer
,
L"
\\
drivers"
);
break
;
case
DIRID_INF
:
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
Inf
);
lstrcatW
(
buffer
,
L"
\\
inf"
);
break
;
case
DIRID_HELP
:
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
Help
);
lstrcatW
(
buffer
,
L"
\\
help"
);
break
;
case
DIRID_FONTS
:
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
Fonts
);
lstrcatW
(
buffer
,
L"
\\
fonts"
);
break
;
case
DIRID_VIEWERS
:
GetSystemDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
Viewers
);
lstrcatW
(
buffer
,
L"
\\
viewers"
);
break
;
case
DIRID_COLOR
:
GetSystemDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
L"
\\
spool
\\
drivers
\\
color"
);
break
;
case
DIRID_APPS
:
return
C_Root
;
/* FIXME */
return
L"C:
\\
"
;
/* FIXME */
case
DIRID_SHARED
:
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
break
;
case
DIRID_BOOT
:
return
C_Root
;
/* FIXME */
return
L"C:
\\
"
;
/* FIXME */
case
DIRID_SYSTEM16
:
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
System
);
lstrcatW
(
buffer
,
L"
\\
system"
);
break
;
case
DIRID_SPOOL
:
case
DIRID_SPOOLDRIVERS
:
/* FIXME */
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
Spool
);
lstrcatW
(
buffer
,
L"
\\
spool"
);
break
;
case
DIRID_SPOOLDRIVERS
:
GetWindowsDirectoryW
(
buffer
,
MAX_PATH
);
lstrcatW
(
buffer
,
L"
\\
spool
\\
drivers"
);
break
;
case
DIRID_USERPROFILE
:
if
(
GetEnvironmentVariableW
(
UserProfile
,
buffer
,
MAX_PATH
))
break
;
if
(
GetEnvironmentVariableW
(
L"USERPROFILE"
,
buffer
,
MAX_PATH
))
break
;
return
get_csidl_dir
(
CSIDL_PROFILE
);
case
DIRID_LOADER
:
return
C_Root
;
/* FIXME */
return
L"C:
\\
"
;
/* FIXME */
case
DIRID_PRINTPROCESSOR
:
if
(
!
GetPrintProcessorDirectoryW
(
NULL
,
NULL
,
1
,
(
LPBYTE
)
buffer
,
sizeof
(
buffer
),
&
needed
))
{
...
...
@@ -146,7 +141,6 @@ static const WCHAR *create_system_dirid( int dirid )
return
get_unknown_dirid
();
}
break
;
case
DIRID_COLOR
:
/* FIXME */
default:
FIXME
(
"unknown dirid %d
\n
"
,
dirid
);
return
get_unknown_dirid
();
...
...
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