From f7c6bf4305e070d92dc7af855c4e3178a44267bc Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 7 Mar 2010 23:38:34 +0000 Subject: [PATCH] 2010-03-08 00:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_prn3.c % Changed local version detection to hb_iswin*() calls. --- harbour/ChangeLog | 4 ++++ harbour/contrib/hbwin/win_prn3.c | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 555cbaf1ca..ee507b24c4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,10 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-08 00:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbwin/win_prn3.c + % Changed local version detection to hb_iswin*() calls. + 2010-03-08 00:32 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/win_prn2.c ! Changed one remaining local version detection to hb_iswin*() call. diff --git a/harbour/contrib/hbwin/win_prn3.c b/harbour/contrib/hbwin/win_prn3.c index 744359bd75..ba6e1f81ed 100644 --- a/harbour/contrib/hbwin/win_prn3.c +++ b/harbour/contrib/hbwin/win_prn3.c @@ -93,16 +93,11 @@ static HB_BOOL hb_SetDefaultPrinter( LPCTSTR lpPrinterName ) { #if ! defined( HB_OS_WIN_CE ) BOOL bFlag; - OSVERSIONINFO osv; DWORD dwNeeded = 0; HANDLE hPrinter = NULL; PRINTER_INFO_2 * ppi2 = NULL; LPTSTR pBuffer = NULL; - /* What version of Windows are you running? */ - osv.dwOSVersionInfoSize = sizeof( OSVERSIONINFO ); - GetVersionEx( &osv ); - /* If Windows 95 or 98, use SetPrinter. */ if( hb_iswin9x() ) { @@ -155,9 +150,9 @@ static HB_BOOL hb_SetDefaultPrinter( LPCTSTR lpPrinterName ) } /* If Windows NT, use the SetDefaultPrinter API for Windows 2000, or WriteProfileString for version 4.0 and earlier. */ - else if( osv.dwPlatformId == VER_PLATFORM_WIN32_NT ) + else if( hb_iswinnt() ) { - if( osv.dwMajorVersion >= 5 ) /* Windows 2000 or later (use explicit call) */ + if( hb_iswin2k() ) /* Windows 2000 or later (use explicit call) */ { HMODULE hWinSpool; typedef BOOL ( WINAPI * DEFPRINTER )( LPCTSTR ); /* stops warnings */