2010-03-05 13:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbver.c
* include/hbapi.h
+ Added hb_iswinvista() to detect Vista and newer Windows versions.
* src/rtl/version.c
* include/hbextern.ch
+ Added HB_OSISWINVISTA() .prg level function with above meaning.
* contrib/hbwin/win_os.prg
% Changed to use HB_OSISWINVISTA() instead of hbwin specific
WIN_OSISVISTAORUPPER().
This commit is contained in:
@@ -17,6 +17,19 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-03-05 13:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/common/hbver.c
|
||||
* include/hbapi.h
|
||||
+ Added hb_iswinvista() to detect Vista and newer Windows versions.
|
||||
|
||||
* src/rtl/version.c
|
||||
* include/hbextern.ch
|
||||
+ Added HB_OSISWINVISTA() .prg level function with above meaning.
|
||||
|
||||
* contrib/hbwin/win_os.prg
|
||||
% Changed to use HB_OSISWINVISTA() instead of hbwin specific
|
||||
WIN_OSISVISTAORUPPER().
|
||||
|
||||
2010-03-05 13:19 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbrddnsx.h
|
||||
* harbour/src/rdd/dbfnsx/dbfnsx1.c
|
||||
@@ -43,7 +56,7 @@
|
||||
|
||||
2010-03-05 11:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/rddsql/sddoci/sddoci.c
|
||||
! Fixed OCILIB initalization to make OCI_GetLastError() work.
|
||||
! Fixed OCILIB initialization to make OCI_GetLastError() work.
|
||||
(Thanks to OCILIB author Vincent Rogier for the report
|
||||
and fix)
|
||||
|
||||
@@ -52,7 +65,7 @@
|
||||
on code posted Saulius Zrelskis)
|
||||
+ Added code to disable 'close' menu also. This is using
|
||||
undocumented Windows API call, so by default the logic
|
||||
is disabled, and can be enabled with HB_GTWIN_UNDOC_WINAPI
|
||||
is disabled, and can be enabled with HB_GTWIN_USE_UNDOC_WINAPI
|
||||
macro. (Thanks to Saulius Zrelskis for this API tip)
|
||||
(NOTE: All 'close' controls are controlled by HB_GTI_CLOSABLE)
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ FUNCTION WIN_OSNETREGOK( lSetIt, lDoVista )
|
||||
DEFAULT lSetIt TO .F.
|
||||
DEFAULT lDoVista TO .T.
|
||||
|
||||
IF ! lDoVista .AND. win_osIsVistaOrUpper()
|
||||
IF ! lDoVista .AND. hb_osIsWinVista()
|
||||
/* do nothing */
|
||||
ELSEIF hb_osIsWin9x()
|
||||
bRetVal := win_regQuery( WIN_HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Services\VxD\VREDIR", "DiscardCacheOnOpen", 1, lSetIt )
|
||||
@@ -94,7 +94,7 @@ FUNCTION WIN_OSNETREGOK( lSetIt, lDoVista )
|
||||
bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "SharingViolationDelay", 0, lSetIt )
|
||||
bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "SharingViolationRetries", 0, lSetIt )
|
||||
|
||||
IF win_osIsVistaOrUpper()
|
||||
IF hb_osIsWinVista()
|
||||
/* If SMB2 is enabled turning off oplocks does not work, so SMB2 is required to be turned off on Server. */
|
||||
bRetVal := bRetVal .AND. win_regQuery( WIN_HKEY_LOCAL_MACHINE, cKeySrv, "SMB2", 0, lSetIt )
|
||||
ENDIF
|
||||
|
||||
@@ -1129,9 +1129,11 @@ extern HB_EXPORT const char * hb_verFlagsPRG( void ); /* retrieves a stat
|
||||
extern HB_EXPORT const char * hb_verHB_PLAT( void ); /* retrieves a static buffer containing build time HB_PLATFORM setting */
|
||||
extern HB_EXPORT const char * hb_verHB_COMP( void ); /* retrieves a static buffer containing build time HB_COMPILER setting */
|
||||
|
||||
extern HB_EXPORT HB_BOOL hb_iswin9x( void ); /* return .T. if OS == Windows 9x, ME */
|
||||
extern HB_EXPORT HB_BOOL hb_iswinnt( void ); /* return .T. if OS == Windows NT, 2000, XP */
|
||||
extern HB_EXPORT HB_BOOL hb_iswince( void ); /* return .T. if OS is Windows CE or Windows Mobile */
|
||||
extern HB_EXPORT HB_BOOL hb_iswin9x( void ); /* return HB_TRUE if OS == Windows 9x, ME */
|
||||
extern HB_EXPORT HB_BOOL hb_iswinnt( void ); /* return HB_TRUE if OS == Windows NT, 2000, XP or newer */
|
||||
extern HB_EXPORT HB_BOOL hb_iswinvista( void ); /* return HB_TRUE if OS == Windows Vista, 7, 2008 or newer */
|
||||
extern HB_EXPORT HB_BOOL hb_iswince( void ); /* return HB_TRUE if OS is Windows CE or Windows Mobile */
|
||||
|
||||
extern HB_EXPORT HB_BOOL hb_printerIsReady( const char * pszPrinterName );
|
||||
|
||||
/* OS/Harbour codepage conversion */
|
||||
|
||||
@@ -948,6 +948,7 @@ EXTERNAL HB_MILLISECONDS
|
||||
EXTERNAL HB_CURDRIVE
|
||||
EXTERNAL HB_OSNEWLINE
|
||||
EXTERNAL HB_OSISWINNT
|
||||
EXTERNAL HB_OSISWINVISTA
|
||||
EXTERNAL HB_OSISWINCE
|
||||
EXTERNAL HB_APARAMS
|
||||
EXTERNAL HB_PVALUE
|
||||
|
||||
@@ -399,6 +399,7 @@ char * hb_verPlatform( void )
|
||||
#if defined( HB_OS_WIN )
|
||||
static HB_BOOL s_fWinVerInit = HB_FALSE;
|
||||
|
||||
static HB_BOOL s_fWinVista = HB_FALSE;
|
||||
static HB_BOOL s_fWinNT = HB_FALSE;
|
||||
static HB_BOOL s_fWin9x = HB_FALSE;
|
||||
|
||||
@@ -409,6 +410,7 @@ static void s_hb_winVerInit( void )
|
||||
osvi.dwOSVersionInfoSize = sizeof( osvi );
|
||||
if( GetVersionEx( &osvi ) )
|
||||
{
|
||||
s_fWinVista = osvi.dwMajorVersion >= 6;
|
||||
s_fWinNT = osvi.dwPlatformId == VER_PLATFORM_WIN32_NT; /* && osvi.dwMajorVersion >= 4); */
|
||||
s_fWin9x = osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS;
|
||||
}
|
||||
@@ -416,6 +418,17 @@ static void s_hb_winVerInit( void )
|
||||
}
|
||||
#endif
|
||||
|
||||
HB_BOOL hb_iswinvista( void )
|
||||
{
|
||||
#if defined( HB_OS_WIN )
|
||||
if( ! s_fWinVerInit )
|
||||
s_hb_winVerInit();
|
||||
return s_fWinVista;
|
||||
#else
|
||||
return HB_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
HB_BOOL hb_iswinnt( void )
|
||||
{
|
||||
#if defined( HB_OS_WIN )
|
||||
|
||||
@@ -196,6 +196,11 @@ HB_FUNC( HB_OSISWINNT )
|
||||
hb_retl( hb_iswinnt() );
|
||||
}
|
||||
|
||||
HB_FUNC( HB_OSISWINVISTA )
|
||||
{
|
||||
hb_retl( hb_iswinvista() );
|
||||
}
|
||||
|
||||
HB_FUNC( HB_OSISWINCE )
|
||||
{
|
||||
hb_retl( hb_iswince() );
|
||||
|
||||
Reference in New Issue
Block a user