Was in bit of hurry when writing that previous post...

Including windows.h is surprisingly often sufficient and when it's not enough it's mentioned in MSDN. Check out these examples:

For the function CreateWindow, http://msdn.microsoft.com/en-us/library/ms632679.aspx, MSDN states: declared in Winuser.h, include Windows.h; requires linking to User32.lib. This is kind of the normal situation, even if another header declares the stuff windows.h shall be included.

Some functions requires other headers and MSDN also clearly states this. For instance the function getsockname, http://msdn.microsoft.com/en-us/libr...43(VS.85).aspx, MSDN states: is declared in Winsock2.h; requires linking with Ws2_32.lib