🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5026

Re: CreateProcess Problem

#5026
From: Arnie
Date: Tue, 01 Nov 2005 15:09
61 lines
3016 bytes
"Artaud" <artaud.patrick@wanadoo.fr> wrote in message 
news:43622488@newsgroups.borland.com...
> 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 
Technical Details
Message-ID: <43678555$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <43622488@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e158c5e45fc51780
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII
From: "Arnie" <none>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43622488@newsgroups.borland.com>
Subject: Re: CreateProcess Problem
Date: Tue, 1 Nov 2005 10:09:48 -0500
Lines: 63
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 12.29.236.34
Message-ID: <43678555$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1130857813 12.29.236.34 (1 Nov 2005 07:10:13 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail