Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 20 May 2008 11:20:54 -0700 (PDT),    group: microsoft.public.platformsdk.shell        back       


PIDL problem when reading files from a DVD/CD drive.   
I've run in to a problem trying to browse a DVD/CD using the shell (on
XP). The methods I've used work for hard disks/usb disks so it's a
strange one.

When converting from a filename to a PIDL then back again, the new
filename is incorrect (just displays the drive and the first folder).

For example

// get the pidl of an existing file
SHParseDisplayName(L”e:\\music\\rock\\test.txt”,......)

// get the filename of the pidl
Desktop->GetDisplayNameOf(pidl,  SHGDN_FORPARSING...)

which just returns with
“e:\music”   (missing off \rock\test.txt)

This works as expected on hard disks/usb drives.

I noticed that internally the PIDL's returned on the DVD drive are of
a different type to normal. Usually every PIDL for a folder/file has
the 3rd byte set to 0x31 for a folder, or 0x32 for a file. Folders/
files on the DVD drive have that byte set to zero. The PIDL's  also
seems to be missing any file/date information as SHGetDataFromIDList
fails on them.

It looks like GetDisplayNameOf is walking the PIDL to generate the
full path and if it hits a PIDL of type 0, it stops. So in the example
above we have a pidl list of

my computer  // PIDL with type 1F (guid)
e:\    // PIDL with  type 2F (Drive)
music  // PIDL with type 0
rock  // PIDL with type 0
test.txt”,......) // PIDL with type 0
So it just returns e:\music

Strangely SHGetPathFromIDList does return the correct path/filename
for the same pidl, (unfortunately I can't use SHGetPathFromIDList
because it only works on file/folder pidls).

Anyone come across this problem before or know of a work around?
date: Tue, 20 May 2008 11:20:54 -0700 (PDT)   author:   theo

Re: PIDL problem when reading files from a DVD/CD drive.   
CD/DVD folders have their own CLSID which is not the same as the
regular filesystem folders. Probably this is to service the dual-
purpose shell views of these writable media ("files waiting to be
written")

anyhow, strictly speaking the local folder can do whatever it likes
with its pidls and GetDisplayNameOf from the desktop works only as a
convenient alternative -- when it works!

so you need to get the name from the CD folder itself

---
www.zabkat.com
date: Tue, 27 May 2008 05:08:17 -0700 (PDT)   author:   nikos

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us