Why this thing ships with its own GetConsoleWindow function I don't understand. Rename it and make the rest of the code use it. Compiles fine on gcc 3.x and msvc6 and works properly.
Modified: trunk/reactos/apps/utils/net/telnet/src/tnclass.cpp
Modified: trunk/reactos/apps/utils/net/telnet/src/tnmisc.cpp
Modified: trunk/reactos/apps/utils/net/telnet/src/tnmisc.h

Modified: trunk/reactos/apps/utils/net/telnet/src/tnclass.cpp
--- trunk/reactos/apps/utils/net/telnet/src/tnclass.cpp	2005-08-25 23:20:34 UTC (rev 17552)
+++ trunk/reactos/apps/utils/net/telnet/src/tnclass.cpp	2005-08-25 23:54:39 UTC (rev 17553)
@@ -78,7 +78,7 @@
 	telSetConsoleTitle("No Connection");
 
 	// Change the icon
-	hConsoleWindow = GetConsoleWindow();
+	hConsoleWindow = TelnetGetConsoleWindow();
 	iconChange = SetIcon(hConsoleWindow, 0, &oldBIcon, &oldSIcon, ini.get_startdir());
 
 	if (WSAStartup(MAKEWORD(1, 1), &WsaData)) {
@@ -105,7 +105,7 @@
 Console(GetStdHandle(STD_OUTPUT_HANDLE)),
 TelHandler(Network, Console, Parser),
 ThreadParams(TelHandler),
-Clipboard(GetConsoleWindow(), Network),
+Clipboard(TelnetGetConsoleWindow(), Network),
 Mouse(Clipboard),
 Scroller(Mouse, ini.get_scroll_size()),
 Parser(Console, KeyTrans, Scroller, Network, Charmap) {
@@ -117,7 +117,7 @@
 Console(GetStdHandle(STD_OUTPUT_HANDLE)),
 TelHandler(Network, Console, Parser),
 ThreadParams(TelHandler),
-Clipboard(GetConsoleWindow(), Network),
+Clipboard(TelnetGetConsoleWindow(), Network),
 Mouse(Clipboard),
 Scroller(Mouse, ini.get_scroll_size()),
 Parser(Console, KeyTrans, Scroller, Network, Charmap) {

Modified: trunk/reactos/apps/utils/net/telnet/src/tnmisc.cpp
--- trunk/reactos/apps/utils/net/telnet/src/tnmisc.cpp	2005-08-25 23:20:34 UTC (rev 17552)
+++ trunk/reactos/apps/utils/net/telnet/src/tnmisc.cpp	2005-08-25 23:54:39 UTC (rev 17553)
@@ -110,7 +110,7 @@
 // Paul Brannan 8/7/98
 // This code is from Michael 'Hacker' Krelin (author of KINSole)
 // (slightly modified)
-HWND GetConsoleWindow() {
+HWND TelnetGetConsoleWindow() {
 	DWORD pid = GetCurrentProcessId(), wpid;
 	char title[512], *t = title;
 	HWND hrv = NULL;

Modified: trunk/reactos/apps/utils/net/telnet/src/tnmisc.h
--- trunk/reactos/apps/utils/net/telnet/src/tnmisc.h	2005-08-25 23:20:34 UTC (rev 17552)
+++ trunk/reactos/apps/utils/net/telnet/src/tnmisc.h	2005-08-25 23:54:39 UTC (rev 17553)
@@ -9,7 +9,7 @@
 
 int GetWin32Version(void);
 
-HWND GetConsoleWindow();
+HWND TelnetGetConsoleWindow(void);
 
 bool SetIcon(HWND hConsoleWindow, HANDLE hIcon, LPARAM *pOldBIcon, LPARAM *pOldSIcon,
 			 const char *icondir);