hello all ...
i have managed to generate all .exe file paths of a drive .
now i want to get their system icon index .

this is my code portion :

invoke SHGetFileInfo,addr aline,NULL,addr shfi,sizeof shfi,SHGFI_SYSICONINDEX

;aline == file path
;shfi == SHFILEINFO<>

mov ebx , shfi.iIcon
invoke dwtoa , ebx ,addr BUFFER
invoke StdOut , addr BUFFER

But shfi.iIcon is not working at all .
it generates the same result for various .exe file . :(
i think i should use shell32.dll for this purpose . how can i use it ??

i have attached a .zip file as an example <i have found it form net>.
i want to make this code output similar to SysImg.exe file of this attachment
Posted on 2010-03-14 14:44:26 by maruf10
sorry ...
here is the attachment ..

Posted on 2010-03-14 14:50:36 by maruf10
sorry againn .....
but where is the " edit " button !!!

actual download link :

Posted on 2010-03-14 14:53:01 by maruf10

Have you read SHGetFileInfo() description carefully?

SHGFI_SYSICONINDEX    Retrieve the index of a system image list icon. If successful, the index is copied to the iIcon member of psfi. The return value is a handle to the system image list. Only those images whose indices are successfully copied to iIcon are valid. Attempting to access other images in the system image list will result in undefined behavior.

System image list contains cached icons for desktop/start menu/quicklaunch.

P.S. "Modify" button is in the upper left corner of message and looks like this: . Another one is in the lower right corner.
Posted on 2010-03-14 15:36:53 by baldr
isn't there any way to get system icon index from cached icon index ??
Posted on 2010-03-15 11:53:17 by maruf10

System image lists (there are several of them for different icon sizes) contain cached icons for desktop/start menu/quicklaunch.

When you call SHGetFileInfo(, SHGFI_SYSICONINDEX), you get handle of corresponding image list (actually pointer to IImageList interface) as return value and image index in iIcon member of SHFILEINFO structure.

Any image list handling function can be used with this handle (or handle can be used itself, to set image list for ListView for example, as in SysImg.C).
Posted on 2010-03-15 18:11:30 by baldr
i just want to detect those .exe files which icon is like "file folder" ??
assuming that i know  the path of that exe file ..
how can i do this ??

I have already posted a new topic about this ....
but there is no response ....  :sad:
Posted on 2010-03-21 09:01:31 by maruf10

i just want to detect those .exe files which icon is like "file folder" ??
assuming that i know  the path of that exe file ..
how can i do this ??

In this case, the topic name is completely misleading.

You need to extract an icon and compare it to a known icon. This ca vary from simple pixel-to-pixel comparisons to AIs which can tell whether something looks like a folder icon, or not. The topic is VEEEEEEEEEEERY broad.
Posted on 2010-03-21 10:57:59 by ti_mo_n