SHGetFileInfo API translation

Post Reply
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

SHGetFileInfo API translation

Post by hua »

I want to display a list of filenames along with their icons and I found out SHGetFileInfo can be used to obtain them. Could someone help me translate the VB code that can be found here and here?

Hopefully inch by inch I can get closer to what my boss wants, something that's similar to Views icon in Windows Explorer.

TIA
Last edited by hua on Thu Apr 10, 2008 4:21 am, edited 2 times in total.
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

API-Function

Post by ukoenig »

Hello,
There is the FW-Function for the API

Code: Select all


DLL32 FUNCTION SHGetFilIn;
     ( pszPath AS STRING, ;
     dwFileAttributes AS LONG, ;
     @psfi AS LPSTR, ;                    // SHFILEINFO
     cbFileInfo AS LONG, ;
     uFlags AS LONG ) ;
     AS LONG PASCAL; 
     FROM "SHGetFileInfoA" LIB "SHELL32"


STRUC oSHFILEINF
   MEMBER hIcon AS LONG
   MEMBER iIcon AS LONG
   MEMBER dwAttributes AS LONG
   MEMBER szDisplayName AS STRING
   MEMBER szTypeName AS STRING
END STRUC


Regards

Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Post by hua »

Thanks Uwe. I'll give it a try
Post Reply