|
-
Aug 9th, 2005, 07:11 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Receiving Bytes Problem(How to Receive??)
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"
--Kishore...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|