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
ddc26aa9
Commit
ddc26aa9
authored
May 05, 2005
by
Michael Jung
Committed by
Alexandre Julliard
May 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed MyComputer's GetDisplayNameOf method.
parent
a9d42f44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
39 deletions
+29
-39
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+29
-39
No files found.
dlls/shell32/shfldr_mycomp.c
View file @
ddc26aa9
...
@@ -535,9 +535,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
...
@@ -535,9 +535,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
{
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
char
szPath
[
MAX_PATH
],
szDrive
[
18
];
char
szPath
[
MAX_PATH
];
int
len
=
0
;
BOOL
bSimplePidl
;
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(pidl=%p,0x%08lx,%p)
\n
"
,
This
,
pidl
,
dwFlags
,
strRet
);
TRACE
(
"(%p)->(pidl=%p,0x%08lx,%p)
\n
"
,
This
,
pidl
,
dwFlags
,
strRet
);
...
@@ -547,9 +545,6 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
...
@@ -547,9 +545,6 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
return
E_INVALIDARG
;
return
E_INVALIDARG
;
szPath
[
0
]
=
0x00
;
szPath
[
0
]
=
0x00
;
szDrive
[
0
]
=
0x00
;
bSimplePidl
=
_ILIsPidlSimple
(
pidl
);
if
(
!
pidl
->
mkid
.
cb
)
if
(
!
pidl
->
mkid
.
cb
)
{
{
...
@@ -557,10 +552,10 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
...
@@ -557,10 +552,10 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
lstrcpyA
(
szPath
,
"::"
);
lstrcpyA
(
szPath
,
"::"
);
SHELL32_GUIDToStringA
(
&
CLSID_MyComputer
,
&
szPath
[
2
]);
SHELL32_GUIDToStringA
(
&
CLSID_MyComputer
,
&
szPath
[
2
]);
}
}
else
if
(
_ILIs
SpecialFolder
(
pidl
))
else
if
(
_ILIs
PidlSimple
(
pidl
))
{
{
/* take names of special folders only if its only this folder */
/* take names of special folders only if its only this folder */
if
(
bSimplePidl
)
if
(
_ILIsSpecialFolder
(
pidl
)
)
{
{
GUID
const
*
clsid
;
GUID
const
*
clsid
;
...
@@ -634,42 +629,37 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
...
@@ -634,42 +629,37 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
_ILSimpleGetText
(
pidl
,
szPath
,
MAX_PATH
);
_ILSimpleGetText
(
pidl
,
szPath
,
MAX_PATH
);
}
}
}
}
else
else
if
(
_ILIsDrive
(
pidl
))
FIXME
(
"special folder
\n
"
);
{
}
_ILSimpleGetText
(
pidl
,
szPath
,
MAX_PATH
);
/* append my own path */
else
{
if
(
!
_ILIsDrive
(
pidl
))
{
ERR
(
"Wrong pidl type
\n
"
);
return
E_INVALIDARG
;
}
_ILSimpleGetText
(
pidl
,
szPath
,
MAX_PATH
);
/* append my own path */
/* long view "lw_name (C:)" */
/* long view "lw_name (C:)" */
if
(
bSimplePidl
&&
!
(
dwFlags
&
SHGDN_FORPARSING
))
if
(
!
(
dwFlags
&
SHGDN_FORPARSING
))
{
DWORD
dwVolumeSerialNumber
,
dwMaximumComponetLength
,
dwFileSystemFlags
;
char
szDrive
[
18
]
=
""
;
GetVolumeInformationA
(
szPath
,
szDrive
,
sizeof
(
szDrive
)
-
6
,
&
dwVolumeSerialNumber
,
&
dwMaximumComponetLength
,
&
dwFileSystemFlags
,
NULL
,
0
);
strcat
(
szDrive
,
" ("
);
strncat
(
szDrive
,
szPath
,
2
);
strcat
(
szDrive
,
")"
);
strcpy
(
szPath
,
szDrive
);
}
}
else
{
{
DWORD
dwVolumeSerialNumber
,
dwMaximumComponetLength
,
dwFileSystemFlags
;
/* Neither a shell namespace extension nor a drive letter. */
ERR
(
"Wrong pidl type
\n
"
);
GetVolumeInformationA
(
szPath
,
szDrive
,
sizeof
(
szDrive
)
-
6
,
return
E_INVALIDARG
;
&
dwVolumeSerialNumber
,
&
dwMaximumComponetLength
,
&
dwFileSystemFlags
,
NULL
,
0
);
strcat
(
szDrive
,
" ("
);
strncat
(
szDrive
,
szPath
,
2
);
strcat
(
szDrive
,
")"
);
strcpy
(
szPath
,
szDrive
);
}
}
}
}
else
if
(
!
bSimplePidl
)
{
{
/* go deeper if needed */
/* Complex pidl. Let the child folder do the work */
PathAddBackslashA
(
szPath
);
strRet
->
uType
=
STRRET_CSTR
;
len
=
strlen
(
szPath
);
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
szPath
,
MAX_PATH
);
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
|
SHGDN_INFOLDER
,
szPath
+
len
,
MAX_PATH
-
len
);
}
}
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
...
...
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