How do I open a Network location using C++?

Discussion in 'C++' started by Panarchy, Apr 24, 2009.

  1. Panarchy

    Panarchy New Member

    Joined:
    Nov 29, 2007
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    0
    Hello

    Just having some trouble opening a Network location with the ShellExecute() call.

    I've tried opening the Share using the ShellExecute() call, however, it didn't work;

    ShellExecute(NULL, TEXT("open"), TEXT("explorer"), TEXT("\\panarchy\\share"), NULL, SW_HIDE);

    Please tell me a method of opening the network share (in explorer) with C++.

    Thanks in advance,

    Panarchy

    PS: Please make sure that whichever method you suggest to me, can be run without launching a command-prompt window.
     
  2. Panarchy

    Panarchy New Member

    Joined:
    Nov 29, 2007
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    0
    Hello

    Joske solved it for me, see below;
    Code:
    [B]ShellExecute[/B](NULL, "explore", "\\\\panarchy\\share", NULL, NULL, SW_SHOWNORMAL);
    Panarchy
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice