Click here to Skip to main content
16,007,885 members
Home / Discussions / C#
   

C#

 
GeneralRe: Communicating with an USB Device Pin
haolan4-Jan-08 7:31
haolan4-Jan-08 7:31 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak4-Jan-08 12:13
mveDave Kreskowiak4-Jan-08 12:13 
GeneralRe: Communicating with an USB Device Pin
haolan7-Jan-08 0:57
haolan7-Jan-08 0:57 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak7-Jan-08 3:08
mveDave Kreskowiak7-Jan-08 3:08 
GeneralRe: Communicating with an USB Device Pin
haolan9-Jan-08 3:40
haolan9-Jan-08 3:40 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak9-Jan-08 17:00
mveDave Kreskowiak9-Jan-08 17:00 
GeneralRe: Communicating with an USB Device Pin
haolan10-Jan-08 12:39
haolan10-Jan-08 12:39 
GeneralRe: Communicating with an USB Device Pin
Dave Kreskowiak10-Jan-08 13:19
mveDave Kreskowiak10-Jan-08 13:19 
haolan wrote:
So translated into code you are saying that I should do something like this when i read:


Kind of, though there are async read methods that do all of this work for you and call you when there is some data to read.


haolan wrote:
The 10 bytes to read is because I know that the valid data always will be 10 characters long.


That's not how you do it. Even though your return data may be 10 bytes, you can still get it in several small chunks in multiple reads. Your code has to be able to reassemble the data as it comes in so it can provide a completed message back to the code that's expecting a 10 byte message.



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralRe: Communicating with an USB Device Pin
haolan10-Jan-08 14:09
haolan10-Jan-08 14:09 
GeneralRe: Communicating with an USB Device Pin
Mircea Puiu3-Jan-08 6:39
Mircea Puiu3-Jan-08 6:39 
Generalinheriting from a class and also using a constraint Pin
bwilhite3-Jan-08 4:25
bwilhite3-Jan-08 4:25 
GeneralRe: inheriting from a class and also using a constraint Pin
Pete O'Hanlon3-Jan-08 4:41
mvePete O'Hanlon3-Jan-08 4:41 
GeneralRe: inheriting from a class and also using a constraint Pin
bwilhite3-Jan-08 4:48
bwilhite3-Jan-08 4:48 
GeneralRe: inheriting from a class and also using a constraint Pin
Tim Paaschen3-Jan-08 5:57
Tim Paaschen3-Jan-08 5:57 
GeneralRe: inheriting from a class and also using a constraint Pin
bwilhite3-Jan-08 6:13
bwilhite3-Jan-08 6:13 
Generalstring value in url Pin
eyeseetee3-Jan-08 4:13
eyeseetee3-Jan-08 4:13 
GeneralRe: string value in url Pin
Not Active3-Jan-08 4:50
mentorNot Active3-Jan-08 4:50 
QuestionAdding a RichTextBox to a Tab Page Pin
Programm3r3-Jan-08 4:07
Programm3r3-Jan-08 4:07 
AnswerRe: Adding a RichTextBox to a Tab Page Pin
Programm3r3-Jan-08 4:12
Programm3r3-Jan-08 4:12 
GeneralRe: Adding a RichTextBox to a Tab Page Pin
Justin Perez3-Jan-08 4:14
Justin Perez3-Jan-08 4:14 
GeneralRe: Adding a RichTextBox to a Tab Page Pin
Programm3r3-Jan-08 4:44
Programm3r3-Jan-08 4:44 
GeneralRe: Adding a RichTextBox to a Tab Page Pin
Justin Perez3-Jan-08 5:02
Justin Perez3-Jan-08 5:02 
GeneralCompletely delete a file Pin
Johan Martensson3-Jan-08 2:51
Johan Martensson3-Jan-08 2:51 
GeneralRe: Completely delete a file Pin
Paul Conrad3-Jan-08 7:29
professionalPaul Conrad3-Jan-08 7:29 
GeneralRe: Completely delete a file Pin
Johan Martensson3-Jan-08 13:59
Johan Martensson3-Jan-08 13:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.