From: Dan Holmes on
I have to call the following COM interface. Can i just pass a c# arrary of longs and doubles? What about the out
parameters? They need to be preallocated.


[id(11), helpstring("Calculate travel time and distance between locations assuming given start or end time ")]
HRESULT CalculateTravelCosts(
[in] SAFEARRAY(long) *lOriginLocationIds,
[in] SAFEARRAY(long) *lOriginEdgeIds,
[in] SAFEARRAY(long) *lOriginEdgePercents,
[in] SAFEARRAY(double) *dOriginLongitudes,
[in] SAFEARRAY(double) *dOriginLatitudes,
[in] SAFEARRAY(long) *lDestinationLocationIds,
[in] SAFEARRAY(long) *lDestinationEdgeIds,
[in] SAFEARRAY(long) *lDestinationEdgePercents,
[in] SAFEARRAY(double) *dDestinationLongitudes,
[in] SAFEARRAY(double) *dDestinationLatitudes,
[in] SAFEARRAY(long) *lOffsetsAtLocationInMinutes,
[in] SAFEARRAY(long) *lOptionFlags,
[in, out] SAFEARRAY(long) *lComputedTravelTimes,
[in, out] SAFEARRAY(long) *lComputeTravelDistances);



thanks
danny
From: Dan Holmes on
clicked on the wrong group when i wrote this.

Dan Holmes wrote:
> I have to call the following COM interface. Can i just pass a c# arrary
> of longs and doubles? What about the out parameters? They need to be
> preallocated.
>
>
> [id(11), helpstring("Calculate travel time and distance between
> locations assuming given start or end time ")]
> HRESULT CalculateTravelCosts(
> [in] SAFEARRAY(long)
> *lOriginLocationIds,
> [in] SAFEARRAY(long)
> *lOriginEdgeIds,
> [in] SAFEARRAY(long)
> *lOriginEdgePercents,
> [in]
> SAFEARRAY(double) *dOriginLongitudes,
> [in]
> SAFEARRAY(double) *dOriginLatitudes,
> [in] SAFEARRAY(long)
> *lDestinationLocationIds,
> [in] SAFEARRAY(long)
> *lDestinationEdgeIds,
> [in] SAFEARRAY(long)
> *lDestinationEdgePercents,
> [in]
> SAFEARRAY(double) *dDestinationLongitudes,
> [in]
> SAFEARRAY(double) *dDestinationLatitudes,
> [in] SAFEARRAY(long)
> *lOffsetsAtLocationInMinutes,
> [in] SAFEARRAY(long)
> *lOptionFlags,
> [in, out] SAFEARRAY(long)
> *lComputedTravelTimes,
> [in, out] SAFEARRAY(long)
> *lComputeTravelDistances);
>
>
>
> thanks
> danny