FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Migrating to Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrating to Harbour
Posted: Tue Oct 08, 2013 12:22 PM

Enrico,

xHarbour defines such function as:

FUNCTION OleDefaultArg()

RETURN VTWrapper( VT_ERROR, DISP_E_PARAMNOTFOUND )

So I guess that for those missing params, a Variant of type VT_ERROR is required.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrating to Harbour
Posted: Tue Oct 08, 2013 12:42 PM
Antonio,

Antonio Linares wrote:Enrico,

Do you just need function OleDefaultArg() ?


Yes! :-)

EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrating to Harbour
Posted: Tue Oct 08, 2013 12:43 PM
Antonio,

Antonio Linares wrote:Enrico,

xHarbour defines such function as:

FUNCTION OleDefaultArg()

RETURN VTWrapper( VT_ERROR, DISP_E_PARAMNOTFOUND )

So I guess that for those missing params, a Variant of type VT_ERROR is required.


And? :-)

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrating to Harbour
Posted: Tue Oct 08, 2013 12:58 PM

Enrico,

We already commented this (as far as I remember)

Harbour function void hb_oleItemToVariantRef() actually uses these types:
case HB_IT_STRING:
case HB_IT_MEMO:
case HB_IT_LOGICAL:
case HB_IT_INTEGER:
case HB_IT_LONG:
case HB_IT_DOUBLE:
case HB_IT_DATE:
case HB_IT_TIMESTAMP:
case HB_IT_POINTER:
case HB_IT_ARRAY: / or OBJECT /
if( HB_IS_OBJECT( pItem ) )

and also there is a default branch:
default:
if( pVarRef )
{
V_VT( pVarRef ) = VT_VARIANT | VT_BYREF;
V_VARIANTREF( pVarRef ) = pVariant;
}

Where to insert it ? I guess we may need to use HB_IT_ARRAY and HB_IS_OBJECT(), as if we do it for all NILs then we will be changing many users code default behavior.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Migrating to Harbour
Posted: Tue Oct 08, 2013 01:01 PM

We should not change NILs.

When the parameter is an Object then we need to deal with Obj[1] and obj[2]

Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrating to Harbour
Posted: Tue Oct 08, 2013 01:15 PM

We should do it the same way the xHarbour does it:

case HB_IT_ARRAY: / or OBJECT /
if( HB_IS_OBJECT( pItem ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrating to Harbour
Posted: Tue Oct 08, 2013 01:19 PM

Sorry, I can't be of any help... :-(

EMG

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Migrating to Harbour
Posted: Thu Oct 24, 2013 03:36 PM

Any news about OleDefaultArg() in Harbour? :-)

EMG

Continue the discussion