var FILE_ATTRIBUTE_NORMAL = "&H80";
var FFile = "C:\antivir.exe";
var Result = Interop.Call('shell32', 'SHGetFileInfo', FFile, FILE_ATTRIBUTE_NORMAL, '', FFile, "&H800");
Debug.Trace(Result);
Using only one "\" it outputs "1", but i don't think it is correct anyway. How can i use SHFILEINFO then? Here is its structure:
typedef struct _SHFILEINFO {
HICON hIcon; // i don't have it
int iIcon; // i don't have it
DWORD dwAttributes; // needs GetAttributesOf (below)
TCHAR szDisplayName[MAX_PATH]; // should i put file path here?
TCHAR szTypeName[80]; // what to put here?
} SHFILEINFO;
GetAttributesOf here:
HRESULT GetAttributesOf(UINT cidl,
PCUITEMID_CHILD_ARRAY *apidl,
SFGAOF *rgfInOut
);
what a mess