Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   How do I open a Network location using C++? (http://www.go4expert.com/forums/i-network-location-using-cpp-t17085/)

Panarchy 24Apr2009 08:25

How do I open a Network location using C++?
 
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.

Panarchy 26Apr2009 13:26

Re: How do I open a Network location using C++?
 
Hello

Joske solved it for me, see below;
Code:

ShellExecute(NULL, "explore", "\\\\panarchy\\share", NULL, NULL, SW_SHOWNORMAL);
Panarchy


All times are GMT +5.5. The time now is 02:32.