use MSComm control in C#

  • Thread starter Thread starter jiatiejun
  • Start date Start date
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 ?
 
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;
 
Back
Top