In 2004, incomplete copies of the source code of Windows NT 4.0 and Windows 2000 have appeared on the Internet. These leaks have been illegal, as the Windows source code is both a trade secret and copyrighted, and as so is protected by law. However, Microsoft has released parts of the source of the Windows Server 2003 kernel for research purposes.
Windows NT 4.0
Windows Research Kernel