System::IO::Ports in VC++ windows forms

I face a problem with sending/receiving data from a serial port.

I have a string "Hello World". I use:

1
2
3
4
5
6
7
//sending
array<byte> ^sbyte = Encoding::ASCII->GetBytes("€‚ƒ‰Š");
this->serialPort1->Write(sbyte, 0, sbyte->Length);

//receiving
String ^cipher = this->serialPort1->ReadLine;
array<byte> ^rbyte = this->serialPort1->Read(cipher, 0, cipher->Length);

From above code, I can't receive any bytes.

What I would like to do is

Get bytes from a string which contains extended ASCII.
Send in byte form.
Receive in byte form.
I discovered if I sent extended ASCII in string form, the receiver can't determine it and it comes out as ?????. Is there any other way to make sure the extended ASCII can be sent and received properly?
Anyone lend me a hand? :(
Topic archived. No new replies allowed.