Am developing app for receiving the Data from Serial Port and handling it Microsoft Visual C++ 2010 Win Forms Application!!!
To Receive the data i am using Read method by giving input buffer. But while reading the data, getting System.ArgumentNullException (Buffer cannot be null) exception. the part of the code is below. can any one help why am getting this exception n handling it.
this->sp1->Open();
array<wchar_t>^ buf2;
this->sp1->Read(buf2,1,1024);
this->sp1->Close();
Your buffer doesn’t have an initial size. Try: