Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #2171

Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error

From "Farnsworth" <nospam@nospam.com>
Newsgroups microsoft.public.vb.general.discussion, comp.lang.basic.visual.misc
Subject Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error
Date 2014-10-23 08:04 -0400
Organization Aioe.org NNTP Server
Message-ID <m2aqsc$u84$1@speranza.aioe.org> (permalink)
References <m2aelp$t5s$1@speranza.aioe.org>

Cross-posted to 2 groups.

Show all headers | View raw


I was able to duplicate the error with VB6 with SP5 applied, but with SP6 
runtime files on Windows XP+SP2. I haven't applied any OS updates for a long 
time. Here is the code I used:

Option Explicit

Private Sub Form_Load()
    Dim Data() As Byte
    Dim Result As String

    Data = ""
    Debug.Print LBound(Data), UBound(Data)
    Result = StrConv(Data, vbUnicode)

End Sub

Output:

 0            -1

If you use it in many places, you can write your own DoStrConv() function 
that takes care of that special case. 

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-23 09:35 +0100
  Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Arne Saknussemm <motz001.20.wannabet@spamgourmet.com> - 2014-10-23 10:39 +0200
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-23 11:46 +0100
      Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Arne Saknussemm <es215.10.wannabet@spamgourmet.com> - 2014-10-23 15:09 +0200
        Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-23 14:28 +0100
  Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error "Farnsworth" <nospam@nospam.com> - 2014-10-23 08:04 -0400
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error "Farnsworth" <nospam@nospam.com> - 2014-10-23 08:35 -0400
  Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error "Farnsworth" <nospam@nospam.com> - 2014-10-23 11:48 -0400
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-24 09:47 +0100
  Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-24 14:47 +0100
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Arne Saknussemm <es215.10.wannabet@spamgourmet.com> - 2014-10-27 12:32 +0100
      Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-27 12:14 +0000
        Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Arne Saknussemm <motz001.20.wannabet@spamgourmet.com> - 2014-10-28 11:22 +0100
    Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error "Blue Planet" <sorry@nospamme.org> - 2014-10-27 12:11 -0400
      Re: StrConv(ByteArray, vbUnicode) raising an "Out of memory" error Deanna Earley <dee.earley@icode.co.uk> - 2014-10-27 16:26 +0000

csiph-web