From 36b37697ca67b4ba0b51ec92a6dbb1207f8e0876 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 27 May 2010 21:38:12 +0000 Subject: [PATCH] 2010-05-27 23:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbmisc/calldll.prg ! Cleanup and fix to previous change. --- harbour/ChangeLog | 4 ++++ harbour/contrib/hbmisc/calldll.prg | 10 +++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 68ff5e4c63..2f490026eb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,10 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-27 23:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbmisc/calldll.prg + ! Cleanup and fix to previous change. + 2010-05-27 22:56 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/hvm.c ! fixed GPF when hb_arrayToParams() is used with empty array reported diff --git a/harbour/contrib/hbmisc/calldll.prg b/harbour/contrib/hbmisc/calldll.prg index 56bafd2ba8..3aa733a4be 100644 --- a/harbour/contrib/hbmisc/calldll.prg +++ b/harbour/contrib/hbmisc/calldll.prg @@ -75,13 +75,9 @@ FUNCTION HB_DYNACALL1( cFunction, cLibrary, nCount, ... ) s_hDLL[ cLibrary ] := hb_LibLoad( cLibrary ) ENDIF - IF ISNUMBER( nCount ) - IF nCount == 0 - RETURN hb_dynCall( { cFunction, s_hDLL[ cLibrary ], _DEF_CALLCONV_ } ) - ELSEIF nCount >= 0 .AND. nCount < PCount() - 3 - aParams := ASize( hb_AParams(), nCount ) - RETURN hb_dynCall( { cFunction, s_hDLL[ cLibrary ], _DEF_CALLCONV_ }, hb_arrayToParams( aParams ) ) - ENDIF + IF ISNUMBER( nCount ) .AND. nCount >= 0 .AND. nCount < PCount() - 3 + aParams := ASize( hb_AParams(), nCount ) + RETURN hb_dynCall( { cFunction, s_hDLL[ cLibrary ], _DEF_CALLCONV_ }, hb_arrayToParams( aParams ) ) ELSE RETURN hb_dynCall( { cFunction, s_hDLL[ cLibrary ], _DEF_CALLCONV_ }, ... ) ENDIF