views:

38

answers:

2

When I Rightclick on a Shell Drive I want to differentiate whether the Drive is a Normal Drive or a Network Drive.

I hope we can do this using Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY) method but unsure which parameter to use.

+1  A: 

You can use GetDriveType.

Luke
A: 

Initialize is now documented to take a PCIDLIST_ABSOLUTE (not LPCITEMIDLIST), so you know it's rooted in My Desktop. My Computer is the second ItemID on that list, and the drive is the third ItemID. As Luke indicated, once you have the drive, GetDriveType will tell you whether the drive is remote.

MSalters
@MSalters, Any code snipet please.
Subhen