0

I'm currently trying to implement Overlay Icons for the Windows Explorer with Visual C++. For that, I read the Information on Microsoft MSDN (saying I have to implement IShellIconOverlayIdentifier) and also some other resources on the Internet.

My problem is, that I'm not able to get the program running. I think, it's no problem to implement the logic to choose the correct icons, when I'm able to simply display any icons.

First I tried to create a Windows Service, but it seems that I cannot implement the interface then. Now I changed to a DLL and there aren't any compiler errors anymore, but when I try to register, it says the module was loaded, but the entry-point DllRegisterServer was not found. The problem seems to be that I do not have a COM Server, but do I really need it?

I also found a guide on CodeProject.com, which also does not have any compiler errors, but just displays no icons without any errors.

So, can anybody please shortly summarize how to start implementing Overlay Icons with Visual Studio and C++ (Service/DLL/..., any compiler options to be set, what is the minimum of code I need to display simple icons)?

Ajay
  • 18,086
  • 12
  • 59
  • 105
UoS
  • 81
  • 4
  • 2
    You'd be far better choosing one of your three solutions above, providing some code for it in the question and explaining what difficulties you faced and what you need to help with. – Tas May 18 '16 at 07:33
  • 1
    Perhaps it is related to this problem [TortoiseSVN icons not showing up under Windows 7](http://stackoverflow.com/questions/1057734/tortoisesvn-icons-not-showing-up-under-windows-7) – Bo Persson May 18 '16 at 07:36

1 Answers1

0

The "icons" you're referring to are icons shown in the Explorer process. That means you're a guest in another process, and you must behave according to their rules.

If you understand this, it's clear why your code won't work in a service. A service is not the Explorer process.

If you understand this, it's clear why you must provide DllRegisterServer(). Explorer calls it.

The C++ compiler doesn't know about the particular rules of Explorer.EXE. However, you can tell the compiler about IShellIconOverlayIdentifier by including the header file where it's defined. That will tell the compiler it's actually a COM interface.

You probably should start with simple COM examples before trying something as complex as providing icons to another process outside your control. You can't compile Explorer.EXE in debug mode, so you only see one half of any problem.

MSalters
  • 173,980
  • 10
  • 155
  • 350