Results 1 to 40 of 260

Thread: [vb6] Project Scanner

Threaded View

  1. #11
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    Re: [vb6] Project Scanner

    Hi LaVolpe and DrUnicode, the attachment is the test file you want:

    Code:
    Public Function CreateBuffer(FileName As String, Buffer As CodePageStruct, _
                                Caller As ICustEvent, bNoArrayOverlay As Boolean, _
                                Optional ReleaseOnly As Boolean = False) As Boolean
    '...
    '...
    
     With Buffer
            '.Buffer = StrConv(bData(), vbUnicode)   ' get code data
            
            '--- DreamManor Added 2018-12-23 ------------------------------
            .Buffer = StrConv(bData(), vbUnicode, 2052)
            Dim bTestData() As Byte
            bTestData() = .Buffer
            Open "C:\1\Lavolpe.dat" For Binary As #1
            Put #1, 1, bTestData()
            Close #1
            Erase bTestData
            ' *** Note: ***
            ' Buffer.length -1 = 1731
            ' UBound(bTestData) = 3423     '???
            '----------------------------------------------------------------
    
            Erase bData()
            .tSA.cDims = 1                          ' nr of dimensions
            .tSA.cbElements = 2                     ' integer
            .tSA.rgSABlBound = 1                    ' one-bound same as string char indexing
            .tSA.pvData = StrPtr(.Buffer)           ' memory address
            .tSA.rgSABelements = .length + 1        ' number array items
            .cIndex = 1
            .iLTrim = 0: .iRTrim = 0
            .FileName = FileName
            ' overlay array onto the buffer string for faster parsing
            If bNoArrayOverlay = False Then _
                CopyMemory ByVal VarPtrArray(.Bytes), VarPtr(.tSA), 4&
        End With
    
    '...
    , ...
    Also, hope the following information is useful to you:

    Len("中") = 1
    LenB("中") = 2
    Len("abc中")= 4
    LenB("abc中")= 8
    LenB("abc") = 6
    Asc("中") = -10544
    Ascw("中")= 20013

    The above information is output in the debug(immediate) window.

    Merry Christmas and Happy New Year.
    Attached Files Attached Files
    Last edited by dreammanor; Dec 22nd, 2018 at 09:52 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width