Make a copy of a serial port handle to local class var
I’m trying to pass a handle to a serial port class to a form that will configure the serial port.
I can pass a handle to the constructor and it works fine/as I expect inside the constructor but I need a local copy of the handle that points to the port I can use after the constructor is finished by combobox events.
I can declare a local serial port class var.
I can copy of the original serial port’s class data but I want a handle to the original not a copy of its data.
public ref class Config_Serial_Port_Form : public System::Windows::Forms::Form
initport->BaudRate = 600; //this accesses the correct port
theport = initport; //this only copies all the original to the local object
//I need theport to be a pointer
//TODO: Add the constructor code here