Article View: borland.public.cppbuilder.nativeapi
Article #5017CreateProcess Problem
From: Artaud
Date: Fri, 28 Oct 2005 13:15
Date: Fri, 28 Oct 2005 13:15
51 lines
2715 bytes
2715 bytes
Hello
I try to use CreateProcess to launch an application built with BCB6 from my
application (also created with BCB6)
I use this code :
Tha called application's name is "Optitool"
//--------------------------
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si,sizeof(si));
si.cb=sizeof(si);
ZeroMemory(&pi,sizeof(pi));
if(!CreateProcess(NULL,
TEXT("Optitool.exe"),
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&si,
&pi)
)
{ShowMessage("Process loup�"+AnsiString(
GetLastError()));
return;
}
WaitForSingleObject(pi.hProcess,INFINITE);
//-------------------------------------
I click the button calling the CreateProcess method (I have a break point
far away) I obtain the CPU window stopped on a line and at the caption of
wich there is error in "optitool.exe"
I clik the line on wich is the debugger to see the caller and obtain another
CPU window with only "??????????"
If I click the green run button of BCB6 (to execute) my optitool application
appears correctly an run well.
And when I close it My first application from wich I have called optitool is
always here running all is ok.
I don't understand why the CPR window appears
I have looked at the debugger options and checked "managed by debugger" at
SE exception and also for the go on check box.
I don't understand
I have looked at the microsoft's developper support for the use of
CreateProcess and the sample is the same.
I try to load other applications with it and it is the same thing
I don't understand
If you can help me please
Thank you in advance
Patrick
PS:excuse my English
Technical Details
Message-ID:
<43622488@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e158c5e45fc51780,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII Reply-To: "Artaud" <patrick_artaud@aidealadecision.com> From: "Artaud" <artaud.patrick@wanadoo.fr> Newsgroups: borland.public.cppbuilder.nativeapi Subject: CreateProcess Problem Date: Fri, 28 Oct 2005 15:15:57 +0200 Lines: 53 Organization: Optisoft X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 82.228.58.174 Message-ID: <43622488@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1130505352 82.228.58.174 (28 Oct 2005 06:15:52 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail