Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.comp.os.windows-xp    |    Actually wasn't too bad for a M$-OS    |    17,273 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 16,916 of 17,273    |
|    R.Wieser to as well as thruout my    |
|    Re: VBScript OCX receive and supply a sa    |
|    22 May 24 17:52:14    |
      XPost: alt.windows7.general, comp.os.ms-windows.programmer.win32       From: address@is.invalid              Newyana2,              > Variants have subtypes. But VBS only handles. An array is just a       > collection of data packets in a row with an array descriptor prepended.       > Once you access a(x) you're accessing a data type. If that type is not a       > variant then VBS can't use it.              I beg to differ again (exemptions-to-the-rule are the bane of most people       :-) ).              My previously mentioned "method #1" returns a SafeArray of type VT_UI1,       which in VBScript gets stored into a variant (which than shows its "vartype"       as 0x2011 and its "typename" as "Byte()"(!) ).              I can "wscript.echo" and use use "len()" and "mid()" on it - though it does       all of that badly, treating the VT_UI1 SafeArray as a BSTR. :-(              But yes, if I return a SafeArray of, for example, type VT_UI2 I cannot do       anything with it - other than provide it to another OCX-based method.              ... which was/is exactly what I was trying to do :-)              > The variant is a 16-byte package              :-) you're preaching to the choir. I've been working with the internal       makeup of Variants and looking into SafeArrays for quite a while now.              > If you declare Dim A2()              Which I have not done and, in the current case, have no intention to. Any       explanation in that direction is wasted energy. Sorry.              > I assumed you were working in VB6, using VB6 strings.              Whut ? I specifically mentioned VBScript in the subjectline and the first       post, as well as thruout my replies ...              > A safearray is a variant. The data may be other datatypes.              No, it isn't. What you are referring to is a Variant which contains (a       pointer to) a SafeArray.              > I can then reference each character as an integer in the array, without       > any string handling. It's just memory addresses, after all.       >       > For i = 0 to UBound(ArrayThatsAString)       > Select Case i              Are you trying to pull my leg ? The only thing there you are using       "ArrayThatsAString" for is to get its length.              Also, in VBScript that "ubound()" on a string doesn't work. It *does* work       on my VT_UI1 SafeArray-in-a-variant though. |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca