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.
Migrating to Harbour
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Antonio,
EMG
Yes!Antonio Linares wrote:Enrico,
Do you just need function OleDefaultArg() ?
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Antonio,
EMG
And?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.
EMG
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Migrating to Harbour
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.
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.
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Migrating to Harbour
We should not change NILs.
When the parameter is an Object then we need to deal with Obj[1] and obj[2]
When the parameter is an Object then we need to deal with Obj[1] and obj[2]
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Migrating to Harbour
We should do it the same way the xHarbour does it:
case HB_IT_ARRAY: /* or OBJECT */
if( HB_IS_OBJECT( pItem ) )
case HB_IT_ARRAY: /* or OBJECT */
if( HB_IS_OBJECT( pItem ) )
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Migrating to Harbour
Any news about OleDefaultArg() in Harbour?
EMG
EMG