1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Fix for `slow-startup-printer': use PRINTER_INFO_4 on NT-class systems, which

apparently tries less hard to find printers so won't slow the system down.

Tested on 2000 and 98; in both cases printer enumeration and printing worked
as well as they did in 2003-08-21.

Made a single shared copy of osVersion in winmisc.c so that printing.c can
find it. Made other users (window.c, pageant.c) use this copy.

[originally from svn r3411]
This commit is contained in:
Jacob Nevins
2003-08-21 19:48:45 +00:00
parent 46f26ee483
commit 40dc8b940c
5 changed files with 73 additions and 41 deletions

View File

@ -179,8 +179,6 @@ static int compose_state = 0;
static int wsa_started = 0;
static OSVERSIONINFO osVersion;
static UINT wm_mousewheel = WM_MOUSEWHEEL;
/* Dummy routine, only required in plink. */
@ -221,16 +219,13 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
* config box. */
defuse_showwindow();
if (!init_winver())
{
ZeroMemory(&osVersion, sizeof(osVersion));
osVersion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (!GetVersionEx ( (OSVERSIONINFO *) &osVersion)) {
char *str = dupprintf("%s Fatal Error", appname);
MessageBox(NULL, "Windows refuses to report a version",
str, MB_OK | MB_ICONEXCLAMATION);
sfree(str);
return 1;
}
char *str = dupprintf("%s Fatal Error", appname);
MessageBox(NULL, "Windows refuses to report a version",
str, MB_OK | MB_ICONEXCLAMATION);
sfree(str);
return 1;
}
/*