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
a9a04e8d
Commit
a9a04e8d
authored
Apr 15, 2004
by
Martin Fuchs
Committed by
Alexandre Julliard
Apr 15, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- make drive letters in PIDLs always uppercase to enable PIDL
comparison - Unicodify _ILCreateDrive()
parent
675855d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
pidl.c
dlls/shell32/pidl.c
+5
-5
pidl.h
dlls/shell32/pidl.h
+1
-1
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+5
-7
No files found.
dlls/shell32/pidl.c
View file @
a9a04e8d
...
...
@@ -1633,16 +1633,16 @@ HRESULT _ILCreateFromPathA(LPCSTR szPath, LPITEMIDLIST* ppidl)
return
S_OK
;
}
LPITEMIDLIST
_ILCreateDrive
(
LPC
STR
lpszNew
)
LPITEMIDLIST
_ILCreateDrive
(
LPCW
STR
lpszNew
)
{
char
sTemp
[
4
];
WCHAR
sTemp
[
4
];
LPITEMIDLIST
pidlOut
;
sTemp
[
0
]
=
lpszNew
[
0
]
;
sTemp
[
0
]
=
toupperW
(
lpszNew
[
0
])
;
sTemp
[
1
]
=
':'
;
sTemp
[
2
]
=
'\\'
;
sTemp
[
3
]
=
0x00
;
TRACE
(
"(%s)
\n
"
,
sTemp
);
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
sTemp
)
);
if
((
pidlOut
=
_ILAlloc
(
PT_DRIVE
,
sizeof
(
DriveStruct
))))
{
...
...
@@ -1650,7 +1650,7 @@ LPITEMIDLIST _ILCreateDrive( LPCSTR lpszNew)
if
((
pszDest
=
_ILGetTextPointer
(
pidlOut
)))
{
memcpy
(
pszDest
,
sTemp
,
sizeof
(
sTemp
)
);
WideCharToMultiByte
(
CP_ACP
,
0
,
sTemp
,
sizeof
(
sTemp
)
/
sizeof
(
WCHAR
),
pszDest
,
sizeof
(
sTemp
)
/
sizeof
(
WCHAR
),
NULL
,
NULL
);
TRACE
(
"-- create Drive: %s
\n
"
,
debugstr_a
(
pszDest
));
}
}
...
...
dlls/shell32/pidl.h
View file @
a9a04e8d
...
...
@@ -220,7 +220,7 @@ LPITEMIDLIST _ILCreateControlPanel (void);
LPITEMIDLIST
_ILCreatePrinters
(
void
);
LPITEMIDLIST
_ILCreateNetwork
(
void
);
LPITEMIDLIST
_ILCreateBitBucket
(
void
);
LPITEMIDLIST
_ILCreateDrive
(
LPCSTR
);
LPITEMIDLIST
_ILCreateDrive
(
LPC
W
STR
);
/*
* helper functions (getting struct-pointer)
...
...
dlls/shell32/shfldr_mycomp.c
View file @
a9a04e8d
...
...
@@ -196,7 +196,6 @@ ISF_MyComputer_fnParseDisplayName (IShellFolder2 * iface,
HRESULT
hr
=
E_INVALIDARG
;
LPCWSTR
szNext
=
NULL
;
WCHAR
szElement
[
MAX_PATH
];
CHAR
szTempA
[
MAX_PATH
];
LPITEMIDLIST
pidlTemp
=
NULL
;
CLSID
clsid
;
...
...
@@ -217,8 +216,7 @@ ISF_MyComputer_fnParseDisplayName (IShellFolder2 * iface,
/* do we have an absolute path name ? */
else
if
(
PathGetDriveNumberW
(
lpszDisplayName
)
>=
0
&&
lpszDisplayName
[
2
]
==
(
WCHAR
)
'\\'
)
{
szNext
=
GetNextElementW
(
lpszDisplayName
,
szElement
,
MAX_PATH
);
WideCharToMultiByte
(
CP_ACP
,
0
,
szElement
,
-
1
,
szTempA
,
MAX_PATH
,
NULL
,
NULL
);
pidlTemp
=
_ILCreateDrive
(
szTempA
);
pidlTemp
=
_ILCreateDrive
(
szElement
);
}
if
(
szNext
&&
*
szNext
)
{
...
...
@@ -249,15 +247,15 @@ static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags)
/*enumerate the folders*/
if
(
dwFlags
&
SHCONTF_FOLDERS
)
{
CHAR
szDriveName
[]
=
"A:
\\
"
;
WCHAR
wszDriveName
[]
=
{
'A'
,
':'
,
'\\'
,
'\0'
}
;
DWORD
dwDrivemap
=
GetLogicalDrives
();
HKEY
hkey
;
while
(
ret
&&
szDriveName
[
0
]
<=
'Z'
)
while
(
ret
&&
w
szDriveName
[
0
]
<=
'Z'
)
{
if
(
dwDrivemap
&
0x00000001L
)
ret
=
AddToEnumList
(
list
,
_ILCreateDrive
(
szDriveName
));
szDriveName
[
0
]
++
;
ret
=
AddToEnumList
(
list
,
_ILCreateDrive
(
w
szDriveName
));
w
szDriveName
[
0
]
++
;
dwDrivemap
=
dwDrivemap
>>
1
;
}
...
...
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