Windows

toc =Versions=
 * Home * Software * Windows**
 * [[image:http://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Windows_logo_and_wordmark_-_2012.svg/489px-Windows_logo_and_wordmark_-_2012.svg.png width="294" height="64" link="https://en.wikipedia.org/wiki/Microsoft_Windows"]] ||~  || **Windows** is a series of 32-bit and 64-bit [|operating systems] by Microsoft for x86 and x86-64 PC's, as well as [|Windows CE] for [|embedded systems] and the [|mobile operating system] [|Windows Mobile]. Its development started in the early 80s as a [|graphical user interface] for 16-bit MS-DOS operating system, with the ability to perform [|cooperative multitasking] while processing an [|event loop].  ||
 * [|Microsoft Windows] Logo ||~  ||^   ||
 * [[image:http://www.digibarn.com/collections/software/microsoft/windows10/Image70.jpg width="294" height="224" link="http://www.digibarn.com/collections/software/microsoft/windows10/page_01.htm"]] ||~  || [[image:http://www.digibarn.com/collections/software/microsoft/windows286/Image54.jpg width="294" height="224" link="http://www.digibarn.com/collections/software/microsoft/windows286/index.html"]] ||
 * Windows 1.0, 1985 ||~  || Windows/286 2.11, 1987 ||
 * [[image:http://www.operating-system.org/betriebssystem/gfx/logo/windowsnt40_screenshot.jpg width="294" height="224" link="http://www.operating-system.org/betriebssystem/_german/bs-winnt40.htm"]] ||~  || [[image:http://www.operating-system.org/betriebssystem/bsgfx/microsoft/winvista/winvista-final-s-18.gif width="294" height="224" link="http://www.operating-system.org/betriebssystem/_german/bs-winvista.htm"]] ||
 * Windows NT 4.0 ||~  || Windows Vista ||
 * [|List of Microsoft Windows versions]
 * [|Windows 1.0]
 * [|Windows 2.0]
 * [|Windows 3.0]
 * [|Windows 95]
 * [|Windows NT]
 * [|Windows 2000]
 * [|Windows XP]
 * [|Windows Vista]
 * [|Windows CE]
 * [|Windows Mobile]
 * [|Windows 7]
 * [|Windows Phone 7]
 * [|Windows 8]
 * [|Windows Phone 8]
 * [|Windows 10]
 * [|Windows 10 Mobile]

=Chess Engines= Most current chess engines are suited to run under Windows, a few with its own proprietary user interface, but most common as [|console application] and child process of an external chess GUI communicating via [|redirected] [|standard streams] using protocols like the Chess Engine Communication Protocol (WinBoard) and/or the Universal Chess Interface (UCI).

=Windows Chess GUIs=
 * [[image:arena320.jpg width="294" height="224" link="http://www.playwitharena.com/"]] ||~  || [[image:CPsshot2.png width="294" height="224" link="http://sjeng.org/deepsjeng.html"]] ||
 * Arena ||~  || Deep Sjeng under ChessPartner ||
 * [[image:DeepFritz14d_1.jpg width="294" height="224" link="http://shop.chessbase.com/en/products/deep_fritz_14_english"]] ||~  || [[image:DeepRybkaInAqurium7.png width="294" height="224" link="http://chessok.com/shop/index.php?main_page=product_info&cPath=7_1&products_id=344"]] ||
 * Deep Fritz 14 GUI ||~  || Deep Rybka 4 Aquarium ||
 * Deep Fritz 14 GUI ||~  || Deep Rybka 4 Aquarium ||


 * Aquarium
 * Arena
 * Chess Academy
 * ChessGUI
 * ChessPartner GUI
 * ChessX
 * Cute Chess
 * Fritz GUI
 * Hiarcs Chess Explorer
 * Mayura Chess Board
 * WinBoard
 * Shredder GUI
 * Scid vs. PC

=Applications=

Major
> [|Microsoft Word] > [|Microsoft Excel] > [|Microsoft PowerPoint]
 * [|Internet Explorer]
 * [|Microsoft Outlook]
 * [|Microsoft Exchange Server]
 * [|Microsoft Office]

Accessories

 * [|Command Prompt]
 * [|Win32 console]
 * [|Windows Explorer]
 * [|Notepad]
 * [|Notepad++]
 * [|Wordpad]
 * [|Calculator]
 * [|Paint]

Entertainment
> [|Taipei] by David Norris > Ziggurat by David Norris
 * [|Microsoft Entertainment Pack]

Remote Desktop
> [|Remote Desktop Services, MSDN]
 * [|Remote Desktop Protocol]

=Development= Covers [|integrated development environments] (IDE), [|Software development kit] (SDK), [|Application programming interface] (API), programming languages, compiler and tools.

IDE
> [|Visual Studio 2010, MSDN] > [|Eclipse.org home]
 * [|Microsoft Visual Studio from Wikipedia]
 * [|Eclipse from Wikipedia]

Frameworks
> [|Common Language Runtime Overview, MSDN] > [|Windows Communication Foundation from Wikipedia]
 * [|.NET Framework from Wikipedia]
 * [|Comparison of the Java and .NET platforms from Wikipedia]
 * [|Common Language Runtime from Wikipedia]

Subsystems

 * [|Virtual DOS machine from Wikipedia]
 * [|Windows on Windows from Wikipedia]
 * [|WOW64 from Wikipedia]

SDK

 * [|Microsoft Windows SDK from Wikipedia]
 * [|MSDN: Microsoft Development]
 * [|Windows Development, MSDN]

API

 * [|Windows API from Wikipedia]
 * [|Windows Runtime from Wikipedia]
 * [|Windowing, MSDN]
 * [|Universal Windows Platform from Wikipedia]

Input and Output

 * [|User Input, MSDN]
 * [|Painting and Drawing, MSDN]
 * [|DirectX]
 * [|File Management, MSDN]

Memory

 * [|Memory Management, MSDN]
 * [|Enumerating a Heap, MSDN]
 * [|Allocating Memory from a NUMA Node, MSDN] » NUMA
 * [|NUMA Support (Windows), MSDN]
 * [|Windows Memory Management - CodeProject]
 * [|Memory Limits for Applications on Windows] by [|Steve Lionel] (Intel), May 16, 2011

Interprocess Communications

 * [|Processes and Threads, MSDN]
 * [|Interprocess Communications, MSDN]
 * [|Creating a Child Process with Redirected Input and Output, MSDN]
 * [|Pipes, MSDN]
 * [|Dynamic Data Exchange] (DDE)
 * [|Object Linking and Embedding] (OLE)
 * [|Component Object Model] (COM)
 * [|ActiveX]
 * [|Distributed Component Object Model] (DCOM)
 * [|Common Object Request Broker Architecture] (CORBA)
 * [|Processes, Threads, and Jobs] (pdf) from [|Microsoft® Windows® Internals, Fourth Edition: Windows 2000, Windows XP, and Windows Server 2003] by [|David Solomon] and [|Mark Russinovich]

Dynamic Linking
> [|Dynamic-Link Libraries, MSDN] > [|The End of DLL Hell, MSDN]
 * [|Dynamic-link library from Wikipedia]
 * [|DLL hell from Wikipedia]

C
C programmers were faced with some new paradigms from early 16-bit [|Windows API], not to mention the fact that a lot of [|C standard library] functions were hard and error-prone to use, or even taboo. [|Charles Petzold]: "The original [|hello world program] in the [|Windows 1.0 SDK] was a bit of a scandal. HELLO.C was about 150 lines long, and the HELLO.RC resource script had another 20 or so more lines". (...) Veteran C programmers often curled up in horror or laughter when encountering the Windows hello-world program.".

WinMain and the Message loop
Windows programs are [|event-driven], have no usual main, but [|WinMain] to enter a [|event loop], where [|DispatchMessage] transfers [|messages] to a [|callback procedure] [|associated] with the [|window] the message refers to, i.e. for keyboard events one window which owns the [|keyboard focus]. To make Windows applications work flawlessly, keeping its windows up to date, that is processing [|paint messages], the [|I/O bound] GUI thread needs to be run in the message loop, to react on messages best within 20 ms. In early 16-bit Windows, DispatchMessage implemented [|cooperative multitasking] - but one application being uncooperative could made the whole system hang.

code format="cpp" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {  WNDCLASS wc; MSG msg; ...  wc.lpfnWndProc = (WNDPROC) MyWndProc; // associate a Window procedure for this "class" of windows if (!RegisterClass(&wc)) // register window class return FALSE; hwnd = CreateWindow(...); ShowWindow(hwnd, SW_SHOW); while(GetMessage(&msg, NULL, 0, 0) > 0) {    TranslateMessage(&msg); DispatchMessage(&msg); }  return msg.wParam; } code

Window Procedure
The callback or [|Window procedure] is called from the above message loop. code format="cpp" LRESULT CALLBACK MyWndProc(   HWND hwnd,        // handle to window    UINT uMsg,        // message identifier    WPARAM wParam,    // first message parameter    LPARAM lParam)    // second message parameter {   PAINTSTRUCT ps; HDC hdc; switch (uMsg) {       case WM_CREATE:    // Initialize the window return 0; case WM_PAINT: hdc = BeginPaint(hwnd, &ps); TextOut(hdc, 0, 0, "Hello, Windows!", 15); EndPaint(hwnd, &ps); return 0; case WM_DESTROY:  // Clean up window-specific data objects return 0; case WM_CHAR:     // Process Keyboard character events return 0; case WM_MOUSEMOVE: // Process mouse move events return 0; // Process other messages default: return DefWindowProc(hwnd, uMsg, wParam, lParam); }   return 0; } code

Standard C Library

 * [|C standard library from Wikipedia]
 * [|Standard C Library Functions, MSDN]
 * [|Windows File I/O vs. C Run-time File I/O, MS Support]

C++
Microsoft's proprietary C++ [|Foundation Classes] wrapped the [|handle] based Windows API and hides much of its complexity. Still one of the early class libs, it has a lot of ugly [|macros], i.e. for [|message maps]. [|Borland's] counter part was the [|Object Windows Library].

Command-Line Applications
Applies for most UCI and/or Chess Engine Communication Protocol (WinBoard) compatible chess engines, relying on an external GUI.
 * [|Creating Command-Line Applications (C++), MSDN]
 * [|Managed Extensions for C++ from Wikipedia] now deprecated

Class Libs
> [|MFC Reference, MSDN]
 * [|Windows Forms from Wikipedia]
 * [|Microsoft Foundation Classes from Wikipedia]
 * [|Visual Component Library from Wikipedia]
 * [|Object Windows Library from Wikipedia]
 * [|Interix from Wikipedia]
 * [|Qt (software) from Wikipedia]
 * [|Boost (C++ libraries) from Wikipedia]

Compiler
> [|Visual C++ Tutorials, Library, and More on MSDN] > [|MinGW - Minimalist GNU for Windows] > [|Cygwin Information and Installation] > [|Intel® Compilers] > [|Intel(R) C++ Compiler User and Reference Guides] covers Intrinsics » x86, x86-64, MMX, SSE2, SSSE3, SSE4, AVX
 * [|Visual C++ from Wikipedia]
 * [|MinGW from Wikipedia], port of the GNU Compiler Collection (GCC)
 * [|Cygwin from Wikipedia], Unix-like environment and [|command-line interface]
 * [|Intel C++ Compiler from Wikipedia]

Calling Conventions
[|Agner Fog] describes x86 and x86-64 [|calling conventions] for different C++ compilers and operating systems, covering 32-bit and 64-bit Windows :

Other Languages

 * C#
 * [|Visual Basic from Wikipedia]
 * [|Embarcadero Delphi from Wikipedia]
 * [|Intel Fortran Compiler from Wikipedia]
 * Java

=See also=
 * Linux
 * Mac OS
 * MS-DOS
 * [|OS/2 from Wikipedia]
 * Unix

=Publications=
 * [|Mark Russinovich] and [|David Solomon] with [|Alex Ionescu] (**2009**). //[|Microsoft Windows Internals, Fifth Edition]//.

=Forum Posts=

1995 ...

 * [|hash mem in win-chess progs] by Pc Sol, rgcc, September 28, 1995 » Transposition Table
 * [|Win32 based "professional" chess software] by Chris Smith, rgcc, June 17, 1997
 * [|What will be the position of Windows in 3, 4 years in the future?] by Leonid, CCC, November 29, 1999

2000 ...

 * [|Re: Stormx is this a Crafty Clone??] by Sean Empey, CCC, May 25, 2004 » Process, Thread
 * [|Kiwi for Win98 and input-reading stuff] by Alessandro Scotti, CCC, September 29, 2004 » Kiwi, C++, Thread

2010 ...

 * [|MSVC calloc question] by Harm Geert Muller, CCC, March 17, 2011
 * [|Windows GCC Development] by Joshua Shriver, CCC, January 10, 2012
 * [|microsecond-accurate timing on Windows] by Martin Sedlak, CCC, May 28, 2012
 * [|Windows 8.1 and Visual Studio 2013 preview] by Jose Mº Velasco, CCC, June 30, 2013

2015 ...

 * [|Windows 10 Experience] by Fernando Villegas, CCC, August 10, 2015
 * [|OT: Full Removal of Windows 10] by Terry McCracken, CCC, December 13, 2015
 * [|Weird Windows / WinBoard behavior] by Harm Geert Muller, CCC, September 15, 2016 » Process, WinBoard
 * [|Help needed for porting to Windows] by Evert Glebbeek, CCC, October 22, 2016
 * [|MinGW AlphaBlend] by Harm Geert Muller, CCC, November 29, 2016 » 2D Graphics Board, WinBoard
 * [|Importance of Windows XP support] by Evert Glebbeek, CCC, March 27, 2017

=Further Links=
 * [|Microsoft Windows from Wikipedia]
 * [|Wintel from Wikipedia] » Intel
 * [|Wine (software) from Wikipedia]
 * [|Engineering Windows 7 - Windows Desktop Search] by Chris McConnell, October 13, 2008

=References=


 * Up one Level**