Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Com port enable

Com port enable

Scheduled Pinned Locked Moved C / C++ / MFC
comdesignhelpquestionannouncement
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anuchelvi
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • A anuchelvi

      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

      A Offline
      A Offline
      anuchelvi
      wrote on last edited by
      #2

      hi, pls help any one. mithila

      S H 2 Replies Last reply
      0
      • A anuchelvi

        hi, pls help any one. mithila

        S Offline
        S Offline
        shiraztk
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • A anuchelvi

          hi, pls help any one. mithila

          H Offline
          H Offline
          Hardy_Smith
          wrote on last edited by
          #4

          Now I understand. You want to enumerate the com-ports of a machine? Look here: http://www.codeproject.com/system/enumports.asp[^] Hardy.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups