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,910 of 17,273    |
|    Newyana2 to R.Wieser    |
|    Re: VBScript OCX receive and supply a sa    |
|    21 May 24 20:49:37    |
      XPost: alt.windows7.general, comp.os.ms-windows.programmer.win32       From: newyana@invalid.nospam              On 5/21/2024 2:44 PM, R.Wieser wrote:              > I've just build an OCX for usage within vbscript, and am running into a       > problem :       >       > I'm trying to have a method #1 return a SafeArray of type VT_UI1, and later       > provide it to a method #2.       >               What JJ said. VBS doesn't do datatypes. You have       two choices: Convert each array element to variant       when assigning it, or don't use an array. I typically       use a character-delimited string that can be converted       to array easily by the caller:              Dim c1       c1 = Chr(1)              s = "one" & c1 & "2" & c1 & "three"       a = Split(s, c1)              For i = 0 to 2        MsgBox a(i)       next               The caller can convert the string to a variant array in one       simple line. You don't have to convert the string to variant       until the final act of your function: Get3Numbers = CVar(s)               If you want to return an array then you have to convert each       array member individually.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca