I believe you need to use NTDLL.DLL. As far as I know, this is that all process monitoring tools, pens and other system information should be used at the end, under Windows. I used it in a small Win32 tool, but I never had to list handles.
Check here to get a good idea about this library and related to your question. http://forum.sysinternals.com/howto-enumerate-handles_topic18892.html
Also the GetObjectName function in the first post http://forum.sysinternals.com/enumerate-opened-files_topic3577.html
Accessing such information on Windows may seem very difficult and looks frightening because Microsoft does not want to support it, but you will see that when the “simple” API does not give you what you need, you will have to dig to NTDLL. This is what tools like ProcessExplorer are used at the end. It's not that difficult: load the DLL, get the right function pointers to populate the structures that you declare yourself with what you find on the network.
source share