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,917 of 17,273    |
|    R.Wieser to All    |
|    Re: VBScript OCX receive and supply a sa    |
|    23 May 24 09:47:50    |
      XPost: alt.windows7.general, comp.os.ms-windows.programmer.win32       From: address@is.invalid              JJ,              > VBA doesn't have any problem with your case of code (tested in       > Excel VBA with ADODB.Stream's array of byte - same problematic       > variant type).              Thanks for checking.              And yes, that (VT_UI1 / Byte() ) is the type of the SafeArray I'm returning.              As mentioned, it has got /some/ support, but VBScript mostly regards it as a       string. Which, in my case, it definitily isn't.                     And thanks for reminding me of ADODB. I had downloaded two example scripts,       but hadn't yet taken a look at them. Doing a quick(ish) test and looking       at the "vartype()" result of what "stream.read" returns it does match what       my method #1 returns: &H2011. IOW, nothing outof the ordinary (of sorts)       for VBScript.              After that I checked the TypeLib to that ADOB.stream object and saw that       neither the "stream.read" nor the "stream.write" methods used a SafeArray as       its out- or input (none of the methods do), but just used Variants to wrap       and transport them in.              IOW, althoug I called it "an ugly work-around", it seems to be the way its       supposed to be done. Oh well.              Also, the ADODB example mentioned build-in(!) functions like       lenb(),midb(),ascb() and chrb(), which I was not aware of. Meaning I do not       have to write them myself (my "method #2" was an early attempt to them).       Phew. :-)              And a funny thing : although you can do an "ubound()" on the result of a       "stream.read", you can't actually access that result as if its an array ...              Regards,       Rudy Wieser              --- 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