Re: [Dev-C++] How do you find a file's path?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: veenurs <ve...@ma...> - 2003-01-21 17:25:44
|
Hi again ,
Something like this :
************************************
#include <process.h>
char *my_env[] =
{
"Environ To Pass",
NULL //pass sytem environ
};
char *my_Prog ="iexplorer"; //program to launch
char *args[4]; // arguments for my_Prog
_spawnvpe( _P_NOWAIT , my_Prog, args, my_env );
**************************************
Hope it works .
_Rahul
Luc Saint-Elie wrote:
> At 15:56 21/01/2003 +0100, Philippe de Rochambeau wrote:
>
>> Hello,
>>
>> I have developed a basic application using C++-Dev that creates a
>> process that runs IExplorer. Unfortunately, CreateProcess will not
>> launch IExplorer unless I specify the latter's complete path (e.g.,
>> C:\program files\Explorer\ieexplore.exe) as second parameter value:
>> CreateProcess( NULL, "C:\\Program Files\\Explorer\\Iexplore.exe",
>> ...). I would like to search for IExplorer on the user's PC before
>> creating the process. What is the easiest way to do that on Windows?
>>
>> Many thanks.
>>
>> Philippe de Rochambeau
>
>
> I don't have the answer but to launch an URL I use (in C++Builder but
> its Windows stuff so it may work in Dev-CPP) :
> ShellExecute(Handle, "open", MyURLToLaunch, NULL, NULL, SW_SHOWNORMAL);
>
> Luc
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies!
> Can't afford IT training? All 2003 ictp students receive scholarships.
> Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
> www.ictp.com/training/sourceforge.asp
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|