I am trying to write and read bytes from usb device.I have an array dout(8) of boolean say f,t,t,f,t,t,f,t representing switch states.I need to convert that to a variable DataOut as byte. 01101101 Later I read the usb device.This gives me a variable Data as byte 10110100 I need to convert that to an array DIn(10) of boolean t,f,t,t,f,t,f,f All my code attempts have failed.
Im currently making a program and I was really thinking about adding a simple hex editor into it (nothing really fancy). I know how to read/write/view bytes already but im stuck on how i will make the interface and stuff. Ive been searching google for hours and i cant find anything.
Does it read the entire message string sent by the client? I have a line to write to the stream later in the code and that does not seem to be sending anything back to the client, although the code around is excuting.
i = stream.Read(bytes, 0, bytes.Length) While (i <> 0) Try ' Translate data bytes to a ASCII string.
I am writing a CSV File from a Database. I am stuck in writing lines which become greater then 1024 bytes collectively. It write line terminator after 1024 bytes and thus adds the remaining string to new line which obviously results what I don't want. Is there any way so that I increase the line length limit to some reasonable amount of bytes?
I have 10 parts of a file. Each part is 10,000 bytes.Now say I receive these parts out of order meaning I cannot simply just write them in order as I receive them, but I am able to detect what part it is.
If I received part 3 how would I write those bytes in the 20,000-30,000 byte section of a file?
In web service I have function that return bytes array. Now, I call it from VbScript and I need to catch result of this function. How I can catch result of this function in value that is gone be like a value that function return (bytes array)?
I have an old fashion Database with several files.I need to import to a new Sql Server dababase the data.There are tables with 6 Bytes numbers fields and we have no Number data type with that length.
I want to read 15 bytes of data starting at byte 40 and ending at byte 55. I then want the value of the 15 bytes of data to print to textbox5. I know this should be a simple task but I'm having a lot of trouble figuring this out.
how to write a null bytes onto unused hard disk spaces? I understand that files deleted are still existed on hard disk, I am thinking of may be if I write the null bytes to every single unused bytes so that the unused hard disk space would be become all null bytes, and unused space would no longer contain of those deleted files.
I have an old fashion Database with several random access files and I need to import the data to a new Sql Server dababase the data. There are tables with 6 Bytes floating numbers fields and we have no Number data type with that length in VB. I tried and tried and... and can't find. I found this code in the ERP folder, is AlphaBasic. It use an envoirement namend A-shell from Microsabio .
I have seen countless examples of reading standard output from command line applications which print text to the screen and one can read that back into the application as a string. I want to read the binary data back that is written to standard output from something such as image magick's convert program. What is coming back is an image, not a text result or error code. Is this possible? I have been looking for ages but found nothing that makes sense.
I need to do some operations that require converting array of bytes to string and the other way. After struggling with it for a few hours I found out the core of my problems. Look at this piece of [code]...
I have a tcpclient connection setup capturing a continuous http stream. For some reason after the first few bytes are read, the stream does not get any data for a long time. Is there a problem with my code?
Dim tclient As TcpClient = New TcpClient(url, "80") nstream = tclient.GetStream() If nstream.CanRead Then[code].....
Why does this programmer use a binary reader to read bytes, why not the client.getstream.read or streamreader?
Case RequestTags.Connect 'sent from server to client informing client that a successful 'connection negotiation has been made and the connection now exists.
i was wondering if it was possible to write my own firmware that will run on a device im making. This device is very similar to the price portable price checkers you see in grocery stores. it scans the barcode which returns an id number. More information about my device and about the big project im working on can be found here: My Idea For A New Type Of WCP (Wireless Connection Protocol)
I am trying to write a VB program to automatically detect and identify a particular device that will only communicate to my program when I have 2 or more devices plug into the USB port. One way of doing it that I can think of is to scan through the available port and do a write and read to identified the port. But that would take up a lot of time if I were to scan through say 5 available port.
im from iran.your site very fine. i have a question . in my country have vary device that send it information by phone line(example:fax,POS...) if me connect it to my computer modem and my computer modem connect to phone line.how can i read information recived and sended.
I am using sockets and such for a while now, and want to go an step further in this. Now for example lets say an client would send [lenghtofstringinbytes]string[somethingelseinbytes]another thing. How can I send/read/parse it?
Now I am doing this: Private Sub onDataArrival(ByVal ar As IAsyncResult) Try Dim obj_SocketState As StateObject = CType(ar.AsyncState, StateObject) Dim obj_Socket As Socket = obj_SocketState.WorkSocket Dim sck_Data As String [Code] .....
So using Getstring for it, but thats not the way for this as you get nothing else but an empty string back. So I have to parse it without converting it to an string.
I have this code that was working in a proof of concept app I had - but now will not work.
For Each ddfile As String In ddfiles Dim MyThread As Thread ' simple new thread Dim newFS As FSObject = New FSObject() 'new FSObject which is a file object I made up' used because i needed to keep the name and index matched so the callback function had something to work with
How can I read SMS from mobile with my .net application? i have a Nokia 5310 mobile phone. Can you tell me from where i can download Nokia SDK or source code or Nokia API etc?
I want to make a custom application which reads SMS and at the same time sends a response to the sender's mobile number.
My current program can read in a continuous stream of data when initialized and I can send a command to retrieve the devices stored data, I also have within the same program code that will read an XML file and populate from controls.
I have two separate idea's right now that I'm trying to merge into one
I want to read in XML and populate my controls. I'm aware of delegate and Invoke but I'm having a hard time working them into my XML portion or the opposite "working my XML into my serial port class".
I have a timer control that sends data to a hardware every 3 seconds. I sent 6 bytes of data. In return I am expecting 8 bytes of data in DataReceived event. First time I send 6 bytes of date, in DataReceived event, I get the expected 8 bytes. Then in next 3 seconds, again the expected 8 bytes of data is received. But after that I find that DataReceived is fired 2 times: first time I get 6 bytes and then I get 2 bytes. After that I again get 8 bytes as expected. So in short, 2 times I get 8 bytes as expected and 6 bytes and 2 bytes and again 8 bytes. This pattern is repeating continuously. Why? Is there any reason why I cannot get all 8 bytes everytime? Note that the code is in vb.net 2008
Code in button btn_Start () 'Set serial port parameters x.PortName = "COM1"
I'm working on a project involving reading RFID tags, I've written the code and it reads the tags ok by using the recieved data handler and displaying the result in a listbox, the only problem is that the data displayed has a couple of unreadable characters at the start (I'm using ReadLine() command.)If I read the buffer byte by byte the data is all readable.How can I read and display the whole 16 Bytes in one go??