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
ab820ef2
Commit
ab820ef2
authored
Feb 15, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Add support for the NoDrives registry key.
parent
3d421a47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+39
-1
No files found.
dlls/shell32/shfldr_mycomp.c
View file @
ab820ef2
...
...
@@ -252,6 +252,44 @@ static HRESULT WINAPI ISF_MyComputer_fnParseDisplayName (IShellFolder2 *iface,
return
hr
;
}
/* retrieve a map of drives that should be displayed */
static
DWORD
get_drive_map
(
void
)
{
static
const
WCHAR
policiesW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'P'
,
'o'
,
'l'
,
'i'
,
'c'
,
'i'
,
'e'
,
's'
,
'\\'
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
nodrivesW
[]
=
{
'N'
,
'o'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
's'
,
0
};
static
DWORD
drive_mask
,
init_done
;
if
(
!
init_done
)
{
DWORD
type
,
size
,
data
,
mask
=
0
;
HKEY
hkey
;
if
(
!
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
policiesW
,
&
hkey
))
{
size
=
sizeof
(
data
);
if
(
!
RegQueryValueExW
(
hkey
,
nodrivesW
,
NULL
,
&
type
,
(
LPBYTE
)
&
data
,
&
size
)
&&
type
==
REG_DWORD
)
mask
|=
data
;
RegCloseKey
(
hkey
);
}
if
(
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
policiesW
,
&
hkey
))
{
size
=
sizeof
(
data
);
if
(
!
RegQueryValueExW
(
hkey
,
nodrivesW
,
NULL
,
&
type
,
(
LPBYTE
)
&
data
,
&
size
)
&&
type
==
REG_DWORD
)
mask
|=
data
;
RegCloseKey
(
hkey
);
}
drive_mask
=
mask
;
init_done
=
1
;
}
return
GetLogicalDrives
()
&
~
drive_mask
;
}
/**************************************************************************
* CreateMyCompEnumList()
*/
...
...
@@ -271,7 +309,7 @@ static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags)
if
(
dwFlags
&
SHCONTF_FOLDERS
)
{
WCHAR
wszDriveName
[]
=
{
'A'
,
':'
,
'\\'
,
'\0'
};
DWORD
dwDrivemap
=
GetLogicalDrives
();
DWORD
dwDrivemap
=
get_drive_map
();
HKEY
hkey
;
UINT
i
;
...
...
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