If I understand you well then we should remove the rriid ISink member
and modifiy this code:
for( ;; )
{
lOleError = HB_VTBL( pEnumCPs )->Next( HB_THIS_( pEnumCPs ) 1,
&pCP, NULL );
if( lOleError != S_OK )
break;
if( HB_VTBL( pCP )->GetConnectionInterface( HB_THIS_( pCP ) &rriid )
== S_OK )
break;
rriid = IID_IUnknown;
}
to accept only IDispatch interfaces, i.e.:
for( ;; )
{
lOleError = HB_VTBL( pEnumCPs )->Next( HB_THIS_( pEnumCPs ) 1,
&pCP, NULL );
if( lOleError != S_OK )
break;
if( HB_VTBL( pCP )->GetConnectionInterface( HB_THIS_( pCP ) &rriid )
== S_OK )
{
if( IsEqualIID( HB_ID_REF( rriid ), HB_ID_REF( IID_IDispatch ) ) )
break;
}
rriid = IID_IUnknown;
}
Am I right?
But that is done by :FindConnectionPoint() method. It accepts interface
parameter and returns a required connect point if it exists, instead of
evaluation over all available interfaces.
It's a kind of:
pConnectionPoint := hConnPointContainer[ IID_IDispatch ]
instead of enumeration:
FOR nI := 1 TO LEN(hConnPointContainer)
IF HB_HKEYAT( hConnPointContainer, nI ) == IID_IDispatch
pConnectionPoint := HB_HVALUEAT( hConnPointContainer, nI )
BREAK
ENDIF
NEXT
That's why I simplified code and used FindConnectionPoint().
The same notice again...
WARINING: I'VE NEVER USED ANY ACTIVEX CONTROL AND ALL ABOVE COULD BE
FALSE. BUT THIS IS THE WAY I UNDERSTAND THE IDEA OF MULTIPLE CONNECTION
POINT INTERFACES.
Regards,
Mindaugas
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour