Problème avec CreateProcess()

jetix Messages postés 15 Date d'inscription mardi 18 avril 2006 Statut Membre Dernière intervention 7 mars 2007 - 5 mars 2007 à 09:26
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019 - 5 mars 2007 à 11:37
   je voudrais savoir pourquoi firefox ne démarre pas lorsque l'on appelle? Quel est l'erreur dans ce code.Enfin comment faire pour fermer l'application si on utilise TerminateProcess().

        STARTUPINFO StartupInfo;
                PROCESS_INFORMATION ProcessInformation;

                ZeroMemory(&StartupInfo,sizeof(STARTUPINFO));

        StartupInfo.dwFlags=STARTF_USESHOWWINDOW;
                StartupInfo.wShowWindow=SW_SHOWNORMAL;

                
  CreateProcess(NULL,"firefox.exe",NULL,NULL,TRUE,0,NULL,NULL,&StartupInfo,&ProcessInformation );
           

1 réponse

BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
5 mars 2007 à 11:37
STARTUPINFO si = {sizeof(si)};

et mets le full path pour assurer de trouver l'exe à lancer.

ciao...
BruNews, MVP VC++
0
Rejoignez-nous