Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: GS Newsgroups: microsoft.public.scripting.vbscript Subject: Re: ADODB.Stream binary array to binary string failed unless x-user-defined is used Date: Mon, 16 Sep 2019 12:32:29 -0400 Organization: A noiseless patient Spider Lines: 42 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 16 Sep 2019 16:32:30 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="329d4e94e8e4f71f8570c93914d4a026"; logging-data="11330"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18j99+aC/puc+llcLuPU3Qu" Cancel-Lock: sha1:ujFofiLefh+m5zECq6U6mqUfl+g= X-Antivirus-Status: Clean X-Newsreader: MesNews/1.08.06.00-gb X-Antivirus: Avast (VPS 190916-2, 09/16/2019), Outbound message X-Face: G"ln~:.wBqHZznO'(lJjjprxGYAjIF7#^u)lx,@"H'F#uXm%j`T6kxat5rq092aW;K*#m4jZ(2aW$34N&B&E@ j~tjGV-aC18j1y>zi.\[ZGXsd X-ICQ: 543516788 Xref: csiph.com microsoft.public.scripting.vbscript:12194 > "GS" wrote > >> That's a very concise method; - it duplicates David Ireland's Radix 64 >> method exactly both ways. Nice job!!! >> > > David Ireland? Radix64? I looked it up but only seem to > be finding a pastor. > > I came up with it because many years ago I was writing > SMTP software and needed to incorporate Base64 operations. > I'm not sure where I got the code but it was probably > from VBSpeed. That's where I've always gone for high > efficiency operations. > > Later I added Base64 to a binary > functions DLL for VBS, but I also wanted to provide as much > code as possible that didn't require my 3rd-party DLL. With > that I worked out that Textstream could actually handle > any binary operation if it's done in the right way. So then > I just adapted the VB code for VBS, adding it to a VBS binary > class, which is also online. The class includes sample scripts to > do things like lighten a BMP image, read file headers, and > do Base64 conversion -- all with only Textstream. I also use > those methods for scripts that extract icons from PE files > and retrieve PE data, such as import and export table. It's > handy because it can be trusted to work on all systems, > as long as the local codepage is not a wide character language. > (Japanese, Chinese, Korean.) It doesn't depend on anything > that's not in WSH. Interesting that it works same as the VB6 solution I found by David Ireland many years ago when I was developing my AppLicensing system. Yours is more concise so I'm thinking to convert it for VB6/C# use. -- Garry Free usenet access at http://www.eternal-september.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion