🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14542

Re: Getting PIDL for UNC path

#14542
From: Martin Nijhoff
Date: Mon, 11 Aug 2003 07:50
62 lines
3639 bytes
> For "Network Neighborhood" itself?  Use SHGetSpecialFolderLocation() with
> the CSIDL_NETWORK flag.

No, I would like to get the PIDL for the path "\\User\Share" that is
displayed in the 'Network neighborhood' folder in the Windows Explorer. When
I use ParseDisplayName(), I get the PIDL for this path in the 'Entire
network' folder (as a subfolder of the workgroup that my machine belongs
to).

+- Network neighborhood
    +- Entire network
    |    +- Workgroup 1
    |    +- Workgroup 2
    |         +- User
    |              +- Share      <-- GetDisplayName() returns this PIDL.
    +- User
         +- Share       <-- I want to get this PIDL.

The PIDL that is returned by ParseDisplayName() for 'User' differs from the
PIDLs that I get when I use EnumObjects() on 'Network neighborhood' and
'Workgroup 2' and record the PIDL of the 'User' folder.

This is the PIDL for "\\User\Share" in the 'Network neighborhood' folder
(the value in front of the ':' is the size as a decimal value, the values
after the ':' are hexadecimal values):

20: 1F 2D 60 2C 8D 20 EA 3A 69 10 A2 D7 08 00 2B 30 30 9D
32: 42 03 82 5C 5C 4D 61 72 74 69 6E 00 4D 69 63 72 6F 73 6F 66 74 20 4E 65
74 77 6F 72 6B 00
23: C3 01 05 5C 5C 4D 61 72 74 69 6E 5C 70 72 69 6B 62 6F 72 64 00
0: <None>

This is the PIDL for "\\User\Share" in the 'Workgroup 2' folder of 'Entire
network':

20: 1F 2D 60 2C 8D 20 EA 3A 69 10 A2 D7 08 00 2B 30 30 9D
22: 47 00 02 56 6F 6C 6C 65 64 69 67 20 6E 65 74 77 65 72 6B 00
27: 41 03 82 54 65 6E 00 4D 69 63 72 6F 73 6F 66 74 20 4E 65 74 77 6F 72 6B
00
14: 42 03 02 5C 5C 4D 61 72 74 69 6E 00
23: C3 01 05 5C 5C 4D 61 72 74 69 6E 5C 70 72 69 6B 62 6F 72 64 00
0: <None>

This is the PIDL for "\\User\Share" that is returned by ParseDisplayName():

20: 1F 2D 60 2C 8D 20 EA 3A 69 10 A2 D7 08 00 2B 30 30 9D
22: 47 00 02 56 6F 6C 6C 65 64 69 67 20 6E 65 74 77 65 72 6B 00
29: 41 00 82 54 65 6E 00 4D 69 63 72 6F 73 6F 66 74 20 4E 65 74 77 6F 72 6B
00 00 00
14: 42 00 02 5C 5C 4D 61 72 74 69 6E 00
24: C3 01 45 5C 5C 4D 61 72 74 69 6E 5C 70 72 69 6B 62 6F 72 64 00 00
0: <None>

As you can see, this is not an exact match for either of the two PIDLs
obtained with EnumObjects().

I wanted to use ParseDisplayName() to get an absolute PIDL for a certain
path name and then traverse a tree view object, starting at the 'Desktop'
node, to find and select the tree node for that path by comparing the
relative PIDs that are stored for each node in the tree. This works fine
when I use ParseDisplayName() on a local path name, like
"C:\Windows\System", but not on a network path name, like "\\User\Share".
Technical Details
Message-ID: <3f375067@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f33a15f@newsgroups.borland.com> <3f33d06a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,cd4e24ee33325537
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-11 01:16:33 PST
From: "Martin Nijhoff" <dont@mail.me>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f33a15f@newsgroups.borland.com> <3f33d06a$1@newsgroups.borland.com>
Subject: Re: Getting PIDL for UNC path
Date: Mon, 11 Aug 2003 09:50:09 +0200
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 81.68.7.211
Message-ID: <3f375067@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1060589671 81.68.7.211 (11 Aug 2003 01:14:31 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail