diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c765a09793..9f8b596e24 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,13 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2005-09-27 15:10 UTC-0800 Luis Krause Mantilla + * harbour/contrib/rdd_ads/adsfunc.c + ! added missing functions hb_oemansi & hb_ansioem required with + the recent sycn by Ryzard + * harbour/contrib/rdd_ads/ads.ch + ! updated comment on how to use ADS_REQUIRED_VERSION manifest constant + 2005-09-26 12:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * xharbour/source/rdd/dbcmd.c ! fixed bug I introduced in RDDLIST() diff --git a/harbour/contrib/rdd_ads/ads.ch b/harbour/contrib/rdd_ads/ads.ch index 782b0d0059..5a3381e04e 100644 --- a/harbour/contrib/rdd_ads/ads.ch +++ b/harbour/contrib/rdd_ads/ads.ch @@ -94,18 +94,23 @@ #define ADS_AIS_SERVER 4 /* - If you are want to use functions from ADS version 6 or later - (data dictionary support, built-in Internet Server - capabilities, etc.), you must do two things: + If you want to limit your app to use an ADS version + earlier than the current one, you must set this constant + ADS_REQUIRE_VERSION + to the *latest* version you want to allow/require, as in + -DADS_REQUIRE_VERSION=5 + + As of 6/7/2004, the default supports linking to v6 and v7, + as there are no v7-specific features yet. + It does cover v6 data dictionary support, built-in + Internet Server capabilities, etc. + + So to link to v5, do this: + 1) Link with an ACE32.LIB created from the version 5 + dll that imports these functions, and - 1) Link with an ACE32.LIB created from the version 6 or - later dll that imports these functions, and 2) Set this "define" when compiling rddads: - - #define ADS_REQUIRE_VERSION6 - - Otherwise, any version of ADS will work but you won't have - the extra functionality available past v.5. + -DADS_REQUIRE_VERSION=5 */ diff --git a/harbour/contrib/rdd_ads/adsfunc.c b/harbour/contrib/rdd_ads/adsfunc.c index edc004d49b..baa1168673 100644 --- a/harbour/contrib/rdd_ads/adsfunc.c +++ b/harbour/contrib/rdd_ads/adsfunc.c @@ -71,12 +71,42 @@ int adsFileType = ADS_CDX; int adsLockType = ADS_PROPRIETARY_LOCKING; int adsRights = 1; int adsCharType = ADS_ANSI; +#if ADS_REQUIRE_VERSION >= 6 +BOOL adsOEM = FALSE; +#endif ADSHANDLE adsConnectHandle = 0; BOOL bDictionary = FALSE; /* Use Data Dictionary? */ BOOL bTestRecLocks = FALSE; /* Debug Implicit locks */ PHB_ITEM itmCobCallBack = 0; +#if ADS_REQUIRE_VERSION >= 6 +void hb_oemansi( char* pcString, LONG lLen ) +{ +#if defined(HB_OS_WIN_32) + char * pszDst = ( char * ) hb_xgrab( lLen + 1 ); + OemToCharBuff( ( LPCSTR ) pcString, ( LPSTR ) pszDst, (DWORD) lLen ); + memcpy( pcString, pszDst, lLen ); + hb_xfree( pszDst ); +#else + HB_SYMBOL_UNUSED( pcString ); + HB_SYMBOL_UNUSED( lLen ); +#endif +} + +void hb_ansioem( char* pcString, LONG lLen ) +{ +#if defined(HB_OS_WIN_32) + char * pszDst = ( char * ) hb_xgrab( lLen + 1 ); + CharToOemBuff( ( LPCSTR ) pcString, ( LPSTR ) pszDst, (DWORD) lLen ); + memcpy( pcString, pszDst, lLen ); + hb_xfree( pszDst ); +#else + HB_SYMBOL_UNUSED( pcString ); + HB_SYMBOL_UNUSED( lLen ); +#endif +} +#endif HB_FUNC( ADSTESTRECLOCKS ) /* Debug Implicit locks Set/Get call */ {