More robustly query the SHGDN_FORPARSING flag in the shell32's folders

GetDisplayNameOf methods.
This commit is contained in:
Michael Jung 2005-05-23 16:31:42 +00:00 committed by Alexandre Julliard
parent 4f14044f29
commit 8016f6cc62
4 changed files with 6 additions and 6 deletions

View File

@ -559,7 +559,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
if (_ILIsDesktop (pidl)) if (_ILIsDesktop (pidl))
{ {
if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) &&
(GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING)) (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING))
{ {
BOOL defCharUsed; BOOL defCharUsed;
@ -589,7 +589,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
if ((clsid = _ILGetGUIDPointer (pidl))) if ((clsid = _ILGetGUIDPointer (pidl)))
{ {
if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)
{ {
int bWantsForParsing; int bWantsForParsing;

View File

@ -764,7 +764,7 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl,
strRet->uType = STRRET_CSTR; strRet->uType = STRRET_CSTR;
if (_ILIsDesktop(pidl)) { /* empty pidl */ if (_ILIsDesktop(pidl)) { /* empty pidl */
if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) && if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) &&
(GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER)) (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER))
{ {
if (This->sPathTarget) if (This->sPathTarget)
@ -774,7 +774,7 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl,
hr = E_INVALIDARG; hr = E_INVALIDARG;
} }
} else if (_ILIsPidlSimple(pidl)) { } else if (_ILIsPidlSimple(pidl)) {
if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) && if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) &&
(GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) && (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER) &&
This->sPathTarget) This->sPathTarget)
{ {

View File

@ -567,7 +567,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
clsid = _ILGetGUIDPointer (pidl); clsid = _ILGetGUIDPointer (pidl);
if (clsid) if (clsid)
{ {
if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) if (GET_SHGDN_FOR (dwFlags) & SHGDN_FORPARSING)
{ {
static const WCHAR clsidW[] = static const WCHAR clsidW[] =
{ 'C','L','S','I','D','\\',0 }; { 'C','L','S','I','D','\\',0 };

View File

@ -793,7 +793,7 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDisplayNameOf(IShellFolder2* i
TRACE("(iface=%p, pidl=%p, uFlags=%lx, lpName=%p)\n", iface, pidl, uFlags, lpName); TRACE("(iface=%p, pidl=%p, uFlags=%lx, lpName=%p)\n", iface, pidl, uFlags, lpName);
if ((GET_SHGDN_FOR(uFlags) == SHGDN_FORPARSING) && if ((GET_SHGDN_FOR(uFlags) & SHGDN_FORPARSING) &&
(GET_SHGDN_RELATION(uFlags) != SHGDN_INFOLDER)) (GET_SHGDN_RELATION(uFlags) != SHGDN_INFOLDER))
{ {
if (!pidl->mkid.cb) { if (!pidl->mkid.cb) {