From 873e71fdf3063f6916234bed66cda1bb8716a47f Mon Sep 17 00:00:00 2001 From: Mindaugas Kavaliauskas Date: Sat, 15 Dec 2007 16:35:16 +0000 Subject: [PATCH] 2007-12-15 18:35 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/hbrddads/adsfunc.c + ADSGetServerName() * harbour/contrib/hbrddads/make_b32.bat * harbour/contrib/hbrddads/make_vc.bat ! Fixed variable names in help screen * Added setting to ADS_REQUIRE_VERSION by value of ADS_VER --- harbour/ChangeLog | 8 ++++++++ harbour/contrib/hbrddads/adsfunc.c | 16 ++++++++++++++++ harbour/contrib/hbrddads/make_b32.bat | 8 ++++++-- harbour/contrib/hbrddads/make_vc.bat | 8 ++++++-- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a4a675067b..cc1385043f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,14 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-12-15 18:35 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + * harbour/contrib/hbrddads/adsfunc.c + + ADSGetServerName() + * harbour/contrib/hbrddads/make_b32.bat + * harbour/contrib/hbrddads/make_vc.bat + ! Fixed variable names in help screen + * Added setting to ADS_REQUIRE_VERSION by value of ADS_VER + 2007-12-14 08:55 UTC+0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/hbgtwvg/wvtutils.c ! Fixed memory leak in HB_FUNC( WVT_GETTITLE ) diff --git a/harbour/contrib/hbrddads/adsfunc.c b/harbour/contrib/hbrddads/adsfunc.c index 01385b0d9d..13be9e8cfb 100644 --- a/harbour/contrib/hbrddads/adsfunc.c +++ b/harbour/contrib/hbrddads/adsfunc.c @@ -2551,6 +2551,22 @@ HB_FUNC( ADSSTMTSETTABLEPASSWORD ) } +HB_FUNC( ADSGETSERVERNAME ) +{ + ADSHANDLE hConnect = HB_ADS_PARCONNECTION( 1 ); + UNSIGNED16 usLen = 256; + char buf[ 256 ]; + + if( AdsGetServerName( hConnect, buf, &usLen ) == AE_SUCCESS ) + { + hb_retclen( buf, usLen ); + } + else + { + hb_ret(); + } +} + #endif /* ADS_REQUIRE_VERSION >= 6 */ #if ADS_REQUIRE_VERSION >= 7 diff --git a/harbour/contrib/hbrddads/make_b32.bat b/harbour/contrib/hbrddads/make_b32.bat index bf9e598bc9..890fc3de51 100644 --- a/harbour/contrib/hbrddads/make_b32.bat +++ b/harbour/contrib/hbrddads/make_b32.bat @@ -8,14 +8,18 @@ if not "%ADS_DIR%" == "" goto DIR_OK echo --------------------------------------------------------------- echo IMPORTANT: You'll need Advantage Client Engine installed and echo these envvars set to successfully build this library: -echo set ACE_VER=810 -echo set ACE_DIR=C:\ads\acesdk +echo set ADS_VER=8 +echo set ADS_DIR=C:\ads\acesdk echo --------------------------------------------------------------- goto POST_EXIT :DIR_OK set CFLAGS=-I%ADS_DIR% +if "%ADS_VER%" == "" goto DERFAULT_VER +set CFLAGS=%CFLAGS% -DADS_REQUIRE_VERSION=%ADS_VER% +:DEFAULT_VER + set HB_DLL_NAME=ace32 if exist "%ADS_DIR%\32bit\%HB_DLL_NAME%.dll" set HB_DLL_DIR=%ADS_DIR%\32bit if exist "%ADS_DIR%\Redistribute\%HB_DLL_NAME%.dll" set HB_DLL_DIR=%ADS_DIR%\Redistribute diff --git a/harbour/contrib/hbrddads/make_vc.bat b/harbour/contrib/hbrddads/make_vc.bat index dd0381a100..a1e09cf2c8 100644 --- a/harbour/contrib/hbrddads/make_vc.bat +++ b/harbour/contrib/hbrddads/make_vc.bat @@ -8,14 +8,18 @@ if not "%ADS_DIR%" == "" goto DIR_OK echo --------------------------------------------------------------- echo IMPORTANT: You'll need Advantage Client Engine installed and echo these envvars set to successfully build this library: -echo set ACE_VER=810 -echo set ACE_DIR=C:\ads\acesdk +echo set ADS_VER=8 +echo set ADS_DIR=C:\ads\acesdk echo --------------------------------------------------------------- goto POST_EXIT :DIR_OK set CFLAGS=-I%ADS_DIR% +if "%ADS_VER%" == "" goto DERFAULT_VER +set CFLAGS=%CFLAGS% -DADS_REQUIRE_VERSION=%ADS_VER% +:DEFAULT_VER + set HB_DLL_NAME=ace32 if exist "%ADS_DIR%\32bit\%HB_DLL_NAME%.dll" set HB_DLL_DIR=%ADS_DIR%\32bit if exist "%ADS_DIR%\Redistribute\%HB_DLL_NAME%.dll" set HB_DLL_DIR=%ADS_DIR%\Redistribute