0

I read this article in http://www.codeproject.com/KB/shell/overlayicon.aspx. I have some questions that I cannot answer. Please help me?

First, after I build the project. I received an OverlayIcon.dll. I used regsrv32 to register it to Windows. How can I call or do something to enable overlay icon on file? Whether I will use other program to call functions to enable overlay function on the dll or not ?

And I want to know the location of the file/directory that will be affected by the overlay? If I select a file and right-click on it, how can I code to enable overlay icon on it?

Please help me, I'm very grateful to you.

Thanks in advance.

T.Rob
  • 31,522
  • 9
  • 59
  • 103
Sean
  • 51
  • 3

1 Answers1

0

You should have implemented the IShellIconOverlayIdentifier::IsMemberOf(LPCWSTR pwszPath, DWORD dwAttrib) method, that tells explorer to show (or not to) the overlay icon.

In pwszPath you have the full path of the file that is currently being analyzed, starting from there you should have all the info in order to determine if the file needs the overlay.

Just return S_OK to display the icon, or S_FALSE to avoid it.

I've successfully used that article "as is". Be also sure that the .dll is built according to your cpu architecture.

BeerBaron
  • 388
  • 6
  • 18