Prev: Usage (scope) of ALTER TABLE in sproc
Next: A transport-level error has occurred when sending the request tothe server. (provider: TCP Provider, error: 0 - An existing connection wasforcibly closed by the remote host.)
From: Dan Holmes on 17 Nov 2009 08:09 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 17 Nov 2009 08:12
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 |