the current module i am doing, receives some data bytes from winsock(for testing purpose temporarily in com port). from my previous experience, i would collect the data bytes received from port, write it to a file and read the file to get the appropriate fields.

the reason why i write to file is., the data packet which i receive will be like this ., for ex.,

id int,
deviceid int,
customername char[17],
amount float.

and i receive it as packet(collection of all these). i write the packet to the file and open the file and i will store it in the type which is in the exact format in which the packet has been sent. like this.,

Type info
ID as Integer,
DeviceID as Integer,
Cust_Name as String * 17,
Amount as Double
end Type


and use this as .,

dim Config as info
Open SavedFile For Binary Access Read As #fileno
Get #fileno, 1, Config
'SavedFile(variable) has the name of the file in which i stored the bytes.


now i get the values in the file in the variable Config. I get the data like this. I wanted to know is there any way around to skip the file process.

"In Short, I wanted to read the bytes received from port(either from winsock or com) and store it in VB's variables for my process"