use MSComm control in C#

J

jiatiejun

I add the MSComm control in my C# program,

but I can't get byte [] data,

only to get string data;

there are some problem when char >126 or <32

How to access NO ASCII char (for examples: like UNICODE Chinese,
Japanese...) like a [0..255] char ?
 
R

Rene

private MSCommLib.MSCommClass commControl;

// Tell the control you want to retreive binary.
commControl.InputMode = MSCommLib.InputModeConstants.comInputModeBinary;

// Get byte array.
byte [] ret = (byte[])commControl.Input;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top