1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 09:37:34 -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

@ -1810,7 +1810,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
{
WNDCLASS wndclass;
MSG msg;
OSVERSIONINFO osi;
HMODULE advapi;
char *command = NULL;
int added_keys = 0;
@ -1821,9 +1820,11 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
* Determine whether we're an NT system (should have security
* APIs) or a non-NT system (don't do security).
*/
memset(&osi, 0, sizeof(OSVERSIONINFO));
osi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
if (GetVersionEx(&osi) && osi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
if (!init_winver())
{
modalfatalbox("Windows refuses to report a version");
}
if (osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT) {
has_security = TRUE;
} else
has_security = FALSE;