BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CreateProcess Problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API)
View previous topic :: View next topic  
Author Message
Artaud
Guest





PostPosted: Fri Oct 28, 2005 1:15 pm    Post subject: CreateProcess Problem Reply with quote



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


Back to top
Arnie
Guest





PostPosted: Tue Nov 01, 2005 3:09 pm    Post subject: Re: CreateProcess Problem Reply with quote



"Artaud" <artaud.patrick (AT) wanadoo (DOT) fr> wrote

Quote:
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

I have BCB 5, not 6. But I'll make a wild guess. There is a
check box under 'Debugger Options" that says "Debug spawned
processes". If it is checked, you'll break at the entry point to
Optitool with the CPU assembler/registers window open.

- Arnie



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.