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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. opening network connections

opening network connections

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadmin
6 Posts 4 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.
  • V Offline
    V Offline
    VCProgrammer
    wrote on last edited by
    #1

    Hi all, I want to open network connection dialog, how can i do so? thanks in advance

    D D M 3 Replies Last reply
    0
    • V VCProgrammer

      Hi all, I want to open network connection dialog, how can i do so? thanks in advance

      D Offline
      D Offline
      Dr Emmett Brown
      wrote on last edited by
      #2

      I'm not sure if this is what you're looking for, but you can find a windows app called rasphone.exe in C:\Windows\System32. So, something like this might help:

      ShellExecute(0, 0, _T("rasphone.exe"), 0, 0, SW_SHOW);

      When you execute that, it will let you connect, disconnect, and edit properties of you network connections. Hope it helps. :)

      1 Reply Last reply
      0
      • V VCProgrammer

        Hi all, I want to open network connection dialog, how can i do so? thanks in advance

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Have you tried SHGetFolderLocation(NULL, CSIDL_CONNECTIONS, ...)? That would get you a PIDL that can then be used to obtain the actual path of the "Network Connections" virtual folder.

        "Love people and use things, not love things and use people." - Unknown

        "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

        1 Reply Last reply
        0
        • V VCProgrammer

          Hi all, I want to open network connection dialog, how can i do so? thanks in advance

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          The control panel "dialog"? If so... // On Vista: ::CreateProcess(_T("C:\\Windows\\System32\\control.exe"), _T(" /name Microsoft.NetworkAndSharingCenter"), ... // On older OSs (I didn't test this): ::CreateProcess(_T("C:\\Windows\\System32\\control.exe"), _T(" ncpa.cpl"), ... And if that's the wrong dialog, never mind :) Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          V 1 Reply Last reply
          0
          • M Mark Salsbery

            The control panel "dialog"? If so... // On Vista: ::CreateProcess(_T("C:\\Windows\\System32\\control.exe"), _T(" /name Microsoft.NetworkAndSharingCenter"), ... // On older OSs (I didn't test this): ::CreateProcess(_T("C:\\Windows\\System32\\control.exe"), _T(" ncpa.cpl"), ... And if that's the wrong dialog, never mind :) Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            V Offline
            V Offline
            VCProgrammer
            wrote on last edited by
            #5

            thanks for your solution it worked for vista but the one which you gave for lower version is not working(xp i have checked)....

            V 1 Reply Last reply
            0
            • V VCProgrammer

              thanks for your solution it worked for vista but the one which you gave for lower version is not working(xp i have checked)....

              V Offline
              V Offline
              VCProgrammer
              wrote on last edited by
              #6

              sorry its working thanks for your answer

              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