If I want to use ToolTip class I have to create a form, draw a bitton, assign tooltip to this button and hide the form?
What do you think the CreateWindowEx function call is doing?

But I want to make a module which is working all the time independently on what we are trying to code (console application or library or windows forms application).
That isn't really possible. A console app simply does not support tooltips. A library should most definitely *not* be creating tooltips. What if you want to use your library in a web app, why would you want it to be creating tooltips? If you have a windows forms app, you can use the standard tooltip class. If you don't, well, why are you trying to create windows forms tooltips through P/Invokes. It just doesn't make sense to me.