111,123
社区成员
发帖
与我相关
我的任务
分享

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices ;
[Guid("6F9619FF-8B86-D011-B42D-00C04FC964FF")]
interface IShellIconOverlayIdentifier
{
int IsMemberOf(Char[] pwszPath,ushort dwAttrib);
int GetOverlayInfo(Char[] pwszIconFile,int cchMax,ref int pIndex,ref ushort pdwFlags);
int GetPriority(out int pIPriority);
}
public class Class1 : IShellIconOverlayIdentifier
{
int S_OK = 0;
int S_FALSE = 1;
int faReadonly = 1;
ushort ISIOI_ICONFILE = 1;
public int IsMemberOf(char[] pwszPath, ushort dwAttrib)
{
if ((dwAttrib & faReadonly) == faReadonly)
return S_OK;
else
return S_FALSE;
}
public int GetPriority(out int pIPriority)
{
pIPriority = 0;
return S_OK;
}
public int GetOverlayInfo(char[] pwszIconFile, int cchMax, ref int pIndex, ref ushort pdwFlags)
{
String OverlayPath = @"c:\x.ico";
StringBuilder SB = new StringBuilder(OverlayPath, cchMax);
pdwFlags = ISIOI_ICONFILE;
return S_OK;
}
}