Click here to Skip to main content
15,911,786 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MySQL help!!! Pin
Bill Gates Antimatter Particle12-Dec-01 7:25
Bill Gates Antimatter Particle12-Dec-01 7:25 
GeneralRe: MySQL help!!! Pin
Nish Nishant10-Dec-01 20:16
sitebuilderNish Nishant10-Dec-01 20:16 
GeneralXML Schema (xmlspy<=>msxml) Pin
10-Dec-01 4:53
suss10-Dec-01 4:53 
GeneralTab order Pin
andysolman10-Dec-01 4:48
andysolman10-Dec-01 4:48 
GeneralRe: Tab order Pin
Ravi Bhavnani10-Dec-01 4:52
professionalRavi Bhavnani10-Dec-01 4:52 
GeneralRe: Tab order Pin
andysolman10-Dec-01 23:54
andysolman10-Dec-01 23:54 
GeneralRe: Tab order Pin
Ravi Bhavnani11-Dec-01 1:53
professionalRavi Bhavnani11-Dec-01 1:53 
GeneralCreateProcess Pin
HF10-Dec-01 4:30
HF10-Dec-01 4:30 
When I try to launch an external app with args, it doesn't work. It try to launch an app with name equal to my args. After several tests for string AppName and CommandLine of CreateProcess, when I launch sucessfully app, the external app doesn't receive my args.

My code below:

HANDLE LanceProcess(CString nom_fic_exec,CString paramstring)
{
char param[500];

STARTUPINFO startup_info; // STARTUPINFO
/* Set up the STARTUPINFO structure for the CreateProcess() call */
memset(&startup_info, 0, sizeof(startup_info));
startup_info.cb = sizeof(startup_info);
PROCESS_INFORMATION proc_info; // PROCESS_INFORMATION
strcpy(param,(LPCTSTR)nom_fic_exec);
strcat(param," ");
strcat(param,(LPCTSTR)paramstring);
if (!CreateProcess(NULL,(LPSTR)param,NULL,NULL,TRUE,NORMAL_PRIORITY_CLASS,NULL,NULL,&startup_info,&proc_info)) {
DWORD erreur=GetLastError();
CString chaine;
chaine.Format("Problème lors du lancement du process %s %s",nom_fic_exec,paramstring);
AfxMessageBox(chaine);
}
return(proc_info.hProcess);
}
Frown | :(
GeneralRe: CreateProcess Pin
Jon Hulatt10-Dec-01 5:18
Jon Hulatt10-Dec-01 5:18 
GeneralRe: CreateProcess Pin
HF12-Dec-01 0:06
HF12-Dec-01 0:06 
GeneralRe: CreateProcess Pin
HF12-Dec-01 3:26
HF12-Dec-01 3:26 
GeneralRe: CreateProcess Pin
Lim Bio Liong12-Dec-01 18:36
Lim Bio Liong12-Dec-01 18:36 
GeneralRe: CreateProcess Pin
HF13-Dec-01 3:47
HF13-Dec-01 3:47 
GeneralRe: CreateProcess Pin
Lim Bio Liong13-Dec-01 19:40
Lim Bio Liong13-Dec-01 19:40 
GeneralNon Client Painting Pin
Jon Hulatt10-Dec-01 4:29
Jon Hulatt10-Dec-01 4:29 
GeneralRe: Non Client Painting Pin
Ravi Bhavnani11-Dec-01 5:28
professionalRavi Bhavnani11-Dec-01 5:28 
GeneralCropping A DIB Pin
AJ12310-Dec-01 3:24
AJ12310-Dec-01 3:24 
GeneralRe: Cropping A DIB Pin
Chris Losinger10-Dec-01 4:35
professionalChris Losinger10-Dec-01 4:35 
GeneralMySQL HELP! Pin
Bill Gates Antimatter Particle10-Dec-01 1:43
Bill Gates Antimatter Particle10-Dec-01 1:43 
GeneralRe: MySQL HELP! Pin
Jon Hulatt10-Dec-01 4:30
Jon Hulatt10-Dec-01 4:30 
GeneralPrinting bitmap fails, but preview ok Pin
9-Dec-01 23:24
suss9-Dec-01 23:24 
GeneralRe: Printing bitmap fails, but preview ok Pin
Ravi Bhavnani10-Dec-01 4:14
professionalRavi Bhavnani10-Dec-01 4:14 
GeneralRe: Printing bitmap fails, but preview ok Pin
11-Dec-01 2:34
suss11-Dec-01 2:34 
GeneralRe: Printing bitmap fails, but preview ok Pin
11-Dec-01 4:03
suss11-Dec-01 4:03 
GeneralRe: Printing bitmap fails, but preview ok Pin
Chris Losinger11-Dec-01 4:19
professionalChris Losinger11-Dec-01 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.