IShellFolder::ParseDisplayName unknown

IShellFolder::ParseDisplayName unknown

Post by Andreas Marti » Sun, 17 Nov 2002 02:44:40



Hi!

In the documentation it's explained, how to use IShellFolders. But my code
forces lcc to break compiling with "unknown field 'ParseDisplayName' of
'struct IShellFolder'.

BROWSEINFO bi;
CHAR buffer[1024];

static int SelectDir(void){

    LPITEMIDLIST pidlSelected = NULL;
    BROWSEINFO bi = {0};
    IShellFolder *psfDeskTop = NULL;
    ULONG chEaten;

    SHGetDesktopFolder(&psfDeskTop);
    psfDeskTop->GetDisplayName(NULL, NULL, L"c:\\Windows", &chEaten,
&bi.pidlRoot, NULL);

    bi.hwndOwner=NULL;
    bi.pszDisplayName=buffer;
    bi.lpszTitle="Bitte w?hlen Sie ein Verzeichnis:";
    bi.ulFlags=BIF_RETURNONLYFSDIRS;
    bi.lpfn=NULL;
    bi.lParam=0;
    bi.iImage=0;

    pidlSelected = SHBrowseForFolder(&bi);

    if (!pidlSelected)
        return 0;

    SHGetPathFromIDList(pidlSelected, buffer);

    return 1;

Quote:}

 
 
 

IShellFolder::ParseDisplayName unknown

Post by John » Sun, 17 Nov 2002 04:03:41



Quote:> Hi!

> In the documentation it's explained, how to use IShellFolders. But my code
> forces lcc to break compiling with "unknown field 'ParseDisplayName' of
> 'struct IShellFolder'.

> BROWSEINFO bi;
> CHAR buffer[1024];

> static int SelectDir(void){

>     LPITEMIDLIST pidlSelected = NULL;
>     BROWSEINFO bi = {0};
>     IShellFolder *psfDeskTop = NULL;
>     ULONG chEaten;

>     SHGetDesktopFolder(&psfDeskTop);
>     psfDeskTop->GetDisplayName(NULL, NULL, L"c:\\Windows", &chEaten,
> &bi.pidlRoot, NULL);

Try this.

    psfDeskTop->lpVtbl->ParseDisplayName(psfDeskTop, NULL, NULL,
L"c:\\Windows", &chEaten, &bi.pidlRoot, NULL);

John

 
 
 

1. IShellFolder::ParseDisplayName called with strange arguments

Has anyone had any experience with ParseDisplayName being called "out
of the blue" with weird arguments?

When I expand a 2nd-level folder (just under my root), mine is being
called with the following (weird) arguments:

this          0x02201e40 (seems to be right for my 2nd-level folder)
hwndOwner     0x00c2f1f8 (bogus handle, I checked)
pbcReserved   0x000CC640
lpDisplayName 0x00000000
pdwEaten      0x00000000
pPidlNew      0x00000000
pdwAttributes 0x02201e40 (NOTE - always same value as 'this' pointer)

While trying to find the source of a crash that occured after
CreateViewObject was called, I noticed that, whether I provided an
IShellView or not, ParseDisplay name would be consistently called for
no reason.

I understand the workings of WantsForParsing and other reasons why
ParseDisplayName would be called, but in this case, there is no reason
at all.

At no time do I ever return a display name from GetDisplayNameOf.  And
though I do have WantsForParsing set in the registry, my
GetDisplayName always returns E_NOTIMPL on the first line of the
function.

Furthermore, just to be sure, I went to another namespace extension (I
am writing 2), and this behaviour does not occur in the 2nd one.  A no
time is GetDisplayNameOf called during the expansion of my NSE tree.

I look at the value denoted as the 'this' pointer for
ParseDisplayName, and it looks correct - the data that it contains
seems to be right.  However, the arguments to the function are
obviously wrong, and in any case, this method should not be called.

The only thing I can think of is that the virtual function table of my
2nd level folder is being corrupted somehow, but I am not doing
anything out of the ordinary to cause this.

-John-

2. ISDN and Analog Modems

3. PRB: IShellFolder::ParseDisplayName and '..'

4. fix pack installaton

5. Caching IShellFolders for IShellFolder::BindToObject

6. pleae help (amiga user) help

7. org.omg.CORBA.UNKNOWN: remote exception - Unknown error

8. What happened to BZONE?????

9. Catching unknown socket (or unknown handle / filehandle)

10. Error, (in unknown) unknown uses a 2nd argument, c (of type string), which is missing

11. Common Dialog NSE ParseDisplayName GetOpenFileName GetDisplayNameOf

12. How to find absolute PIDLs using ParseDisplayName?

13. XP IShellFolder::EnumObjects bug