Click here to Skip to main content
16,022,205 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a Windows service application to add custom icons to files and directories using .Net Framework 4.5.2 SharpShell library.

When I try to create a Microsoft Excel file on desktop, file icon moves to default file position on the desktop (top left).

If I create any other type of file (e.g. Microsoft Word), file gets created at the exact location where I clicked.

And if I create multiple Microsoft Excel files consecutively, explorer.exe crashes and restarts.

What can I do about it?


C#
[ComVisible(true)]
   public class MyIconOVerlay: SharpIconOverlayHandler
   {
       protected override bool CanShowOverlay(string path, FILE_ATTRIBUTE attributes)
       {
           // some process
       }

       protected override Icon GetOverlayIcon()
       {
           return Properties.Resources.overlay_icon_inverted;
       }

       protected override int GetPriority()
       {
           return 50;
       }
   }


What I have tried:

I tried to create another task to add icons, different from actual explorer.exe process.
Posted
Comments
Richard Deeming 2-Jul-24 8:26am    
Clearly there's a secret error somewhere in your secret code. You should get on and fix it!

Seriously, how do you expect us to help you resolve a crash we cannot see, caused by code we cannot see, on a system we cannot access?!

If you don't provide any details, the you shouldn't expect to receive any help.
khraLiezx 2-Jul-24 9:50am    
I am sorry. You are correct. I didn't share the source code of my project because I thought there might be a memory management method in the SharpShell library that I didn't aware of or didn't used before.
Dave Kreskowiak 2-Jul-24 9:25am    
SharpShell is not part of the .NET Framework. You're probably going to have to whoever wrote that library for any issues you're having with it.

1 solution

According to Github Sharpshell was produced by Dave Kerr - who is a member here. I don't see any articles about it by him, but it might be a good idea to politely ask him: @DaveKerr might start the conversation.

[edit]
Nope, AT codes don't work in solutions ...
I'll try a comment.
[/edit]

[edit]
Nope, that didn't work either.
Hmmm...
[/edit]

[edit]
And he hasn't logged in for four years ... there is an "Issues" tab on the project Github page: Issues · dwmkerr/sharpshell · GitHub[^]
[/edit]
 
Share this answer
 
v4
Comments
OriginalGriff 2-Jul-24 12:21pm    
@DaveKerr

Can you have a look at this one? It's about a project of yours on Github
khraLiezx 3-Jul-24 3:08am    
Thank you for your comment @OriginalGriff.

Yes, I saw this Github page and I also wrote a question.
But I need a quick solution and I searched lots of / many repositories.

By the way, I messaged Dave on many platforms like e-mail, LinkedIn, etc.

Have a nice day.

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