Com port enable
-
hi, my module is to enable the comports which r present in the system. For eg: if COM port1 & 3 r present in my system, then 1 & 3 should be enabled in my menu bar. void CComDlg::OnUpdateport2(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here if(port3==1) pCmdUI->Enable(TRUE); else pCmdUI->Enable(FALSE); Is this the correct method to enable the port which is present in the system? But it is not working. Pls help. Mithila mithila
-
hi, my module is to enable the comports which r present in the system. For eg: if COM port1 & 3 r present in my system, then 1 & 3 should be enabled in my menu bar. void CComDlg::OnUpdateport2(CCmdUI* pCmdUI) { // TODO: Add your command update UI handler code here if(port3==1) pCmdUI->Enable(TRUE); else pCmdUI->Enable(FALSE); Is this the correct method to enable the port which is present in the system? But it is not working. Pls help. Mithila mithila
-
Hi, What I understand from your question is that you want to work with com ports, right ? then, I think you should use GetCommState and SetCommState api after fillig in the DCB. Regards Shiraz The Best Relligion is Science. Once you understand it, you will know God.
-
Now I understand. You want to enumerate the com-ports of a machine? Look here: http://www.codeproject.com/system/enumports.asp[^] Hardy.