SHFILEINFO fileInfo;
SHGetFileInfo(
"C:\\boot.ini", NULL,
&fileInfo,
sizeof(SHFILEINFO),
SHGFI_ICON|SHGFI_TYPENAME);
cout<<fileInfo.szTypeName<<"文件"<<endl;
cout<<"0x"<<hex<<fileInfo.hIcon<<endl;
cout<<"0x"<<hex<<fileInfo.dwAttributes<<endl;
/* 输出:
配置设置文件
0x09FC07B5
0x40400177
*/
//Handle to the icon that represents the file.
//You are responsible for destroying this handle
//with DestroyIcon when you no longer need it.
DestroyIcon(fileInfo.hIcon);
时间: 2024-10-11 00:07:23