Results 1 to 6 of 6

Thread: [RESOLVED] Unicode problem: read binary file at spesific position with unicode path

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2009
    Posts
    33

    Resolved [RESOLVED] Unicode problem: read binary file at spesific position with unicode path

    i have a code like this:

    Code:
    Public Function GetBin(ByVal lpFileName As String, ByVal lpByteCount As Long, Optional ByVal StartByte As Long = 0) As String
    On Error Resume Next
    Dim Bin() As Byte
    Dim ByteSum As Long
    Dim i As Long
    
    ReDim Bin(lpByteCount) As Byte
    
    Open lpFileName For Binary As #1
        If StartByte = 0 Then
            Get #1, , Bin
        Else
            Get #1, StartByte, Bin
        End If
    Close #1
    
    For i = 0 To lpByteCount
        ByteSum = ByteSum + Bin(i)
    Next i
    
    GetBin = ByteSum
    
    End Function
    which can read spesific bytes within spesific position.
    the problem is:

    how to make it supports unicode path?

    or..
    is there any replacement for this function??
    Last edited by astralist; Jan 10th, 2010 at 07:38 AM.

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