creer un fichier executable - C++ - Programmation
Marsh Posté le 04-07-2005 à 22:45:12
Merci mais c'est dejà fais. 
 
Le truc c'est que je passe par "mplay32" et je n'aime pas l'affichage de celui ci , en realité je voudrais que rien ne s'affiche a l'ecran. Meme pas la fenetre noire du batch. 
 
C'est pour ca que j'ai pensé à un executable. 
 
Peut etre y a t-il une autre solution, je sais pas.
Marsh Posté le 04-07-2005 à 23:09:11
OP OP OP ! 
 
Yes, C'est bon . C génial ! 
 
J'ai trouve une autre methode,c'etait tout bete! 
 
Bonsoir et Marci
Marsh Posté le 08-07-2005 à 10:34:02
on s'enerve pas... 
pour lancer un processus (toto.exe avec l'argument arg1) 
 
#include <windows.h> 
 
int init_proc(char* proc_location,char* command_line); 
int WINAPI 
WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR pszCmdLine, int iCmdShow) 
{ 
init_proc("C:\\Program Files\\softruc\\toto.exe", 
                           "C:\\Program Files\\softruc\\toto.exe" 
                           " /arg1" ); 
} 
 
int init_proc(char* proc_location,char* command_line) 
{ 
  BOOL bWorked; 
  STARTUPINFO suInfo; 
  PROCESS_INFORMATION procInfo; 
  char* m_Process = proc_location;  
  char *vip = command_line; 
 
  memset (&suInfo, 0, sizeof(suInfo)); 
  suInfo.cb = sizeof(suInfo); 
 
  bWorked = ::CreateProcess(m_Process, 
             vip,      
             NULL, 
             NULL, 
             FALSE, 
             NORMAL_PRIORITY_CLASS, 
             NULL, 
             NULL, 
             &suInfo, 
             &procInfo); 
 
  return bWorked; 
}
Marsh Posté le 04-07-2005 à 22:26:25
Bonsoir
J'aurais voulu savoir la "methode la plus simple" pour creer un fichier executable de ce type:
1- Jouer un son
2- Lancer un programme
Je suis une brêle en prog, mais une boule en creation de Theme pour Aston.
Sil vous plait un pauvre inculte en programmation.
Merci mille fois