CSerial::EPortCSerial::CheckPort(LPCTSTRlpszDevice){//TrytoopenthedeviceHANDLEhFile=::CreateFile(lpszDevice,GENERIC_READ|GENERIC_WRITE,0,0,OPEN_EXISTING,0,0);//Checkifwecouldopenthedeviceif(hFile==INVALID_HANDLE_VALUE){