🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

SHGetDataFromIDList fails on temporary internet files

#1178
From: Asger Jørgensen
Date: Fri, 19 Oct 2007 03:40
60 lines
2483 bytes
Hi there

I use SHGetDataFromIDList and PIDL's to get the size 
and the display name of all the files on a drive.
but for some reason this function fails on 
temprary internet files.

when I use FindFirstFile..... I get this structure

Temporary Internet Files
	Content.IE5
		3UCR7HWX // containing lots of files
		4XA345QJ // ....
		73L3NPCW // ....
		8FVNQCXL // ....
		TCJQZFPJ // ....
		TVFVDDK2 // ....
		W9EB8HI3 // ....
		Z58KGR7Z // ....
	Content.MSO

But when I use the explorer 
Temporary Internet Files containing
2877 files but no folders.

And the explorer does show the size of these files.

The code I use:

   IShellFolder *SubFolder = NULL;
   if( FAILED(ParentFolder->BindToObject(pidlSubFolder, NULL, 
IID_IShellFolder, (LPVOID*)&SubFolder)) )
      return;
                                                                
//
   IEnumIDList *Enum = NULL;
   if( FAILED(SubFolder->EnumObjects(NULL, SHCONTF_FOLDERS | 
SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &Enum)) )
   {
      SubFolder->Release();
      return;
   }

   LPITEMIDLIST pidlItem;
   while( Enum->Next(1, &pidlItem, NULL) == S_OK )
   {
      WIN32_FIND_DATA Wfd = {0};
      if( FAILED(SHGetDataFromIDList(SubFolder, pidlItem, 
SHGDFIL_FINDDATA, &Wfd, sizeof(WIN32_FIND_DATA) ) ) )
      {
         CoTaskMemFree(pidlItem);
         continue;// Stop here on temporary internet files.
      }

Snip...From here I just add to my own structure....

Anybody know what to do ?

Thanks in advance
Asger
Technical Details
Message-ID: <MPG.218245b2537e015098985c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9b1c408e0dae3bef,start
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Asger Jørgensen <junk@Asger-P.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: SHGetDataFromIDList fails on temporary internet files
Date: Fri, 19 Oct 2007 05:40:55 +0200
Message-ID: <MPG.218245b2537e015098985c@newsgroups.borland.com>
Organization: Asger-P
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: 83.73.201.25
X-Trace: newsgroups.borland.com 1192765246 83.73.201.25 (18 Oct 2007 20:40:46 -0700)
Lines: 62
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 2331