Results 1 to 1 of 1

Thread: changing values in byte array - [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2002
    Location
    california
    Posts
    245

    changing values in byte array - [RESOLVED]

    Hi,

    I have a byte array which I would like to For-Next through byte by byte and change values as needed then write this array into an existing file.

    Here's the code I'm using. It does not currently work. It breaks on line: Put tfNewArray(), tfParInt, BGColRef

    I was using Put to change the value in the file directly but this is very slow. But I don't know what the equilivant to "Put" is when dealing with a byte array.

    Thanks for any help.

    - Jake

    VB Code:
    1. Dim tfParInt As Long
    2.         Dim rByteValHex_1 As Byte
    3.         Dim rByteValHex2 As Byte
    4.         Dim tfBGColRef As Byte
    5.         Dim tfOthColRef As Byte
    6.         Dim tfNewArray() As Byte
    7.         ReDim tfNewArray(BOB_p1 To lngFileLen)
    8.  
    9.         tfBGColRef = 0
    10.         tfOthColRef = BOB_FstByteColTblRef
    11.        
    12.         Seek #f, BOB_p1
    13.         For tfParInt = BOB_p1 To lngFileLen
    14.             rByteValHex_1 = argArray_raster(tfParInt)
    15.            
    16.             If rByteValHex_1 = BOB_FstByteColTblRef Then
    17.                 'MsgBox ("here 1")
    18.                 Put tfNewArray(), tfParInt, tfBGColRef
    19.                 GoTo NexttfParInt
    20.             Else
    21.                 If rByteValHex_1 = 0 Then
    22.                     Put tfNewArray(), tfParInt, tfOthColRef
    23.                 End If
    24.             End If
    25. NexttfParInt:
    26.         Next tfParInt
    27.  
    28.         Put #f, BOB_p1, tfNewArray()
    Last edited by sequoyan; Nov 3rd, 2002 at 07:27 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