Hello,
If I load all file details into a binary array how would I convert two of those binary entries into an integer or long?
e.g
VB Code:
Dim FileBinary() as byte Dim intFile as integer Dim intTest as integer 'Read in the whole file to a binary array intFile = FreeFile ReDim FileBinary(Len(Filename)) Open Filename For Binary Access Read As intFile Len = 1 Get intFile, 1, FileBinary Close intFile 'How do I now read the first two elements as though they were an integer intTest = FileBinary(0) & Filebinary(1) 'doesnt work
I hope this makes sense. The application I am writting reads in a third part file and needs to be read in as bytes so that I can process the file correctly. i cant therefore load in the value straight to an integer as I dont actually know its an integer until I have the file information.




Reply With Quote