Here's the code to load a file into a byte array.
VB Code:
Public Function GetFile(ByVal pstrFilename As String) As Byte()
Dim bytData() As Byte
Dim intFile As Integer
Dim lngLen As Long
On Error GoTo ErrHandler
If Dir(pstrFilename) = vbNullString Then
Err.Raise vbObjectError, App.EXEName, "File not found."
Else
intFile = FreeFile
Open pstrFilename For Binary Access Read Lock Read Write As #intFile
lngLen = LOF(intFile)
ReDim bytData(lngLen - 1) As Byte
Get #intFile, 1, bytData()
Close #intFile
GetFile = bytData
End If
Exit Function
ErrHandler:
Close #intFile
Err.Raise Err.Number, Err.Source, Err.Description
End Function
Hope that helps.
Woka