<p>I want to read all thumbnails from a folder with images in Windows XP.
But if I read image file to get thumbnail, it seems a bit slow, so I wish I can first read the windows image thumbnail cache:thumb.db.
Is there any lib in c++ or c to read thumbnails from thumb.db.</p>

The Thumbs.db file is stored in OLE
Compound Document
format, the same format that many Microsoft Office products use.
You could also try to look into
ThumbsDBLib
.  It is in C# but you can probably see what they do to read the data and convert it to C++.
Note: Windows Vista and later doesn't use Thumbs.db.  See the
IThumbnailCache interface
for Vista and later.
For Vista and later they are stored here: %homedrive%\Users\%username%\AppData\Local\Microsoft\Windows\Explorer