Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
iam using sharpshell but iam confused that how can i specify the path
for files for icon overlay

.NET Shell Extensions - Shell Icon Overlay Handlers[^]

What I have tried:

protected override bool CanShowOverlay(string path, SharpShell.Interop.FILE_ATTRIBUTE attributes)
{
try
{

File.WriteAllLines(@"C:\Abc.txt",new string[]{path});
// Get the file attributes.
var fileAttributes = new FileInfo(path);

// Return true if the file is read only, meaning we'll show the overlay.
return fileAttributes.IsReadOnly;
}
catch (Exception)
{
return false;
}
}
Posted
Updated 7-Mar-16 20:41pm
v2
Comments
Maciej Los 8-Mar-16 2:39am    
And... what's the question?
What is wrong with above code?

1 solution

I'd suggest to ask this question on the forum related to the referenced article: .NET Shell Extensions - Shell Icon Overlay Handlers[^] (down to the article)
 
Share this answer
 
v2
Comments
srilekhamenon 9-Mar-16 0:03am    
Thanks for the reply, i have found the solution :)
Maciej Los 9-Mar-16 1:52am    
So, you should post it to help other memebers in the future.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900