See the question and my original answer on StackOverflow

This is documented here: Infotip Customization

Implement an object that supports IQueryInfo and then register that object under the proper subkey in the registry (see Registering Shell Extension Handlers below).

You must write a COM server that implements the IQueryInfo interface. This server must be registered using standard COM ways, plus it must add some key to specify how it will affects tooltips.

Note you're not supposed to implement all this using .NET per Microsoft guidelines on this: Guidance for Implementing In-Process Extensions

Also, here is an old Delphi project that's interesting to consult on this: Customizing Shell Infotips and implementing IQueryInfo