Nollie :)
2005-10-13 12:35:45 UTC
The first byte of a pidl determines what type of file system object
the item is. For example,
ITEMIDLIST *pidl;
...GetThePIDL...
switch ( pidl->mkid.abID[0] )
{
case 0x25: // cd-rom drive
case 0x29 // floppy drive
case 0x23: // fixed drive?
case 0x2f: // fixed drive?
break;
}
On my XP machine, all of the fixed drives show up as 0x2f. On my Win98
box, all of the fixed drives show up as 0x23.
There's at least one circumstance where this causes a major problem
for me on Win98:
My shell viewer (treeview control) stores all its items with their
respective simple pidls. All the fixed drives' pidls start with 0x23.
After registering SHChangeNotifyRegister(), my program receives the
SHCNE_NETSHARE message along with a pidl of the affected item. If the
item is on a fixed drive, the drive component of the pidl is 0x2f,
which makes it very difficult to locate in my treeview because all the
fixed drives begin with 0x23!
1. Why does the drive's pidl differ from one point to another in
Win98?
2. Sure, I can simply change the pidl upon receipt from 0x2f to 0x23,
but I'm afraid this is a small symptom of a much larger problem. Is
it?
3. Is this a bug in the Windows 98 shell?
Any help or advice will be greatly appreciated. TIA.
-Nollie
the item is. For example,
ITEMIDLIST *pidl;
...GetThePIDL...
switch ( pidl->mkid.abID[0] )
{
case 0x25: // cd-rom drive
case 0x29 // floppy drive
case 0x23: // fixed drive?
case 0x2f: // fixed drive?
break;
}
On my XP machine, all of the fixed drives show up as 0x2f. On my Win98
box, all of the fixed drives show up as 0x23.
There's at least one circumstance where this causes a major problem
for me on Win98:
My shell viewer (treeview control) stores all its items with their
respective simple pidls. All the fixed drives' pidls start with 0x23.
After registering SHChangeNotifyRegister(), my program receives the
SHCNE_NETSHARE message along with a pidl of the affected item. If the
item is on a fixed drive, the drive component of the pidl is 0x2f,
which makes it very difficult to locate in my treeview because all the
fixed drives begin with 0x23!
1. Why does the drive's pidl differ from one point to another in
Win98?
2. Sure, I can simply change the pidl upon receipt from 0x2f to 0x23,
but I'm afraid this is a small symptom of a much larger problem. Is
it?
3. Is this a bug in the Windows 98 shell?
Any help or advice will be greatly appreciated. TIA.
-Nollie