Question about CreateProcess
From: -Mr. Coder- (Deathrunner_at_web.de)
Date: 05/16/04
- Next message: Winston Tuck: "Re: Systray Icon - Does it exist"
- Previous message: Nicholas Sherlock: "Re: prevent Monitor Poweroff"
- Next in thread: Maarten Wiltink: "Re: Question about CreateProcess"
- Reply: Maarten Wiltink: "Re: Question about CreateProcess"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 16 May 2004 22:00:19 +0200
Hello.
I'm writing a service application with Delphi 7 which should call a GUI
application.
I use the CreateProcess to run the GUI application, but I only get a "beep".
The task manager shows that the GUI application is running, but I can't see
a window. And I also get problems when I try to enumerate the windows using
"EnumWindows". I've read something about "Desktops and Window stations",
probably that what I'm doing wrong... (???)
That's the code:
var si: STARTUPINFO;
with si do
begin
cb := SizeOf(si);
lpReserved := nil;
lpDesktop := nil;
cbReserved2 := 0;
lpReserved2 := nil;
dwFlags := STARTF_USESHOWWINDOW;
wShowWindow := SW_SHOW;
end;
CreateProcess(nil, PChar(CommandLine), nil, nil, False, 0, nil, nil, si,
pi);
What am I doing wrong?
Thanks in advance.
-Mr. Coder-
- Next message: Winston Tuck: "Re: Systray Icon - Does it exist"
- Previous message: Nicholas Sherlock: "Re: prevent Monitor Poweroff"
- Next in thread: Maarten Wiltink: "Re: Question about CreateProcess"
- Reply: Maarten Wiltink: "Re: Question about CreateProcess"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|