Need help extracting the folder size in the recycle bin on Win2003

Need help extracting the folder size in the recycle bin on Win2003

Post by deepak_kam » Thu, 07 Dec 2006 18:51:50


Hello,

I need to get the folder size of a deleted folder that sits in the
recycle bin.
My code snippet for the same:
----------------------------------------------------------------------------

---------------------------------------------------------------------------

WIN32_FIND_DATA finddata;
HRESULT hr2 = SHGetDataFromIDList(pshfRB, pItemIDList,
SHGDFIL_FINDDATA,
reinterpret_ca<t(&finddata),
sizeof(WIN32_FIND_DATA));
if(hr2==0)
{


char cType[1024] = {'\0'}; // Directory or File...
char cSize[64] = {'\0'};


if (finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
strcpy(cType, "Directory");
}
else
{
strcpy(cType, "File");
}


_ltoa(finddata.nFileSizeLow, cSize, 10);
cou<<<< "Looks ok...Size<<<< cSi<<<< endl;
}
-----------------------------------------------------------------------------------

----------------------------------------------------------------------------------



When I run the program on a Win2K, I get the folder size. However, on a

Win2003 machine, I am getting the folder size as 0.


Is this a known issue and do we have a workaround?


Any help in this regard is appreciated.


Thanks in advance!


Regards,
Deepak
 
 
 

Need help extracting the folder size in the recycle bin on Win2003

Post by mark » Fri, 08 Dec 2006 08:14:41


This has nothing to do with kernel.
Ask on microsoft.public.win32.programmer.ui or shell