--- In [email protected], "Sheri" <sheri...@...> wrote: > > Interesting. > > using comPlugin0.72_091218_no_guesses I get (for the values in the first row > of the vector): > local r=myselect.Search(chgVec[i,1], wholeword, casesensitive, chgVec[i,2])
So what are values of chgVec[i,1], chgVec[i,2] (I take it they're all digits?). > ERROR: com.method: Invoke failed (sys code 80020009: "Exception occurred.") > > If I click "OK", I get a series of errors because I reference r and r is > invalid (since above iteration had a com exception). If I click "OK" on all > of those, the subsequent rows and values do work. So it isn't because of the > booleans getting mistyped in the subsequent usages (the booleans are also > "Variant" in the typelibrary). So there is evidently still a problem strictly > related to the vector value that is is all digits. I'll have to go back and double check source code next week, see if I actually did what I think I did. > If I use unicode.new on the vector values, it still works for all the > iterations without error. > Maybe you should make a version that prints out to file what vt it is > actually setting. > > From my reasearch VT_VARIANT for a VARIANTARG is not valid. It must be > VT_VARIANT|VT_BYREF pointing to another variable which is VT_VARIANT. Not > that I strictly understand what all that means. I read that those settings > are available for "languages that allow the variant type to be changed". Not sure what that means either. Mechanically, it means I have one VARIANT, vt == VT_VARIANT|VT_BYREF, and pvarVal member of the VARIANT takes a pointer to another VARIANT. The recipient can then alter the pointed-to-VARIANT, and caller gets a result back. It's why you pass things by pointer/reference: so caller can get a result by other means than the return value. Does this have anything to do with price of tea? Well, when you look at function description for myselect.Search, are you seeing VARIANT or VARIANT*? or any "byref " modifier on any parameter?
