It works for most kernel handles, sockets might be a little more normal starting with Win7 but I stopped doing Windows development around then.
Here are the official docs: http://msdn.microsoft.com/en-us/library/windows/desktop/ms72...
Here are the official docs: http://msdn.microsoft.com/en-us/library/windows/desktop/ms72...
Still, cool stuff there too.