i need the current opened applications(those that appear in the task bar) and NOT the currently running processes.
thanks
You need to enumerate all the top level windows (with the EnumWindows function); you have to skip:
All the others should be the ones shown in the taskbar (here's the full story).
Then, if you want to get the process/thread owning each of the window, you can use the GetWindowThreadProcessId function.