--- In [email protected], "Sheri" <sheri...@...> wrote:
>
> --- In [email protected], "entropyreduction" 
> <alancampbelllists+yahoo@> wrote:
> >
> > Hi Sheri,
> > 
> > I need tosettle on a default lower bound for safearray argument
> > dimensions. You got any idea whether 0 or 1 is more frequent? 
 
> Are you sure it matters? "A SafeArray is called safe because it contains 
> information about the bounds of each array dimension, and limits access to 
> array elements within those bounds."
 
> More from <http://msdn.microsoft.com/en-us/library/ms675103%28VS.85%29.aspx> 
> (You should probably review that whole page):
> 
> "When the ADO API Reference says a method or property takes or returns an 
> array, it means the method or property takes or returns a SafeArray, not a 
> native C/C++ array."
> 
> "For example, the second parameter of the Connection object OpenSchema method 
> requires an array of Variant values. Those Variant values must be passed as 
> elements of a SafeArray, and that SafeArray must be set as the value of 
> another Variant. It is that other Variant that is passed as the second 
> argument of OpenSchema."
> 
> "As further examples, the first argument of the Find method is a Variant 
> whose value is a one-dimensional SafeArray; each of the optional first and 
> second arguments of AddNew is a one-dimensional SafeArray; and the return 
> value of the GetRows method is a Variant whose value is a two-dimensional 
> SafeArray."

I can find references like this:

"All safe arrays that are used with the UI Automation client API methods are 
zero-based, one-dimensional arrays."
http://msdn.microsoft.com/en-us/library/ee684093%28VS.85%29.aspx

Meaning in at least some circumstances SAFEARRAY arguments will probably cause 
a method to fail if it ain't what's expected.


Reply via email to