http://msdn.microsoft.com/en-us/library/windows/desktop/aa511487.aspx#patterns