mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-07 20:21:42 +02:00
+ Removed extra handle on process.
This commit is contained in:
parent
1814389256
commit
deb9c23bdb
@ -50,7 +50,6 @@ Type
|
|||||||
FThreadID : Integer;
|
FThreadID : Integer;
|
||||||
FProcessHandle : Thandle;
|
FProcessHandle : Thandle;
|
||||||
FThreadHandle : Thandle;
|
FThreadHandle : Thandle;
|
||||||
FHandle : THandle;
|
|
||||||
FFillAttribute : Cardinal;
|
FFillAttribute : Cardinal;
|
||||||
FApplicationName : string;
|
FApplicationName : string;
|
||||||
FConsoleTitle : String;
|
FConsoleTitle : String;
|
||||||
@ -91,7 +90,6 @@ Type
|
|||||||
procedure SetEnvironment(const Value: TStrings);
|
procedure SetEnvironment(const Value: TStrings);
|
||||||
function PeekExitStatus: Boolean;
|
function PeekExitStatus: Boolean;
|
||||||
procedure CloseProcessHandles;
|
procedure CloseProcessHandles;
|
||||||
Function GetHandle : THandle;
|
|
||||||
Public
|
Public
|
||||||
Constructor Create (AOwner : TComponent);override;
|
Constructor Create (AOwner : TComponent);override;
|
||||||
Destructor Destroy; override;
|
Destructor Destroy; override;
|
||||||
@ -101,7 +99,7 @@ Type
|
|||||||
Function Terminate (AExitCode : Integer): Boolean; virtual;
|
Function Terminate (AExitCode : Integer): Boolean; virtual;
|
||||||
Function WaitOnExit : DWord;
|
Function WaitOnExit : DWord;
|
||||||
Property WindowRect : Trect Read GetWindowRect Write SetWindowRect;
|
Property WindowRect : Trect Read GetWindowRect Write SetWindowRect;
|
||||||
Property Handle : THandle Read GetHandle;
|
Property Handle : THandle Read FProcessHandle;
|
||||||
Property ProcessHandle : THandle Read FProcessHandle;
|
Property ProcessHandle : THandle Read FProcessHandle;
|
||||||
Property ThreadHandle : THandle Read FThreadHandle;
|
Property ThreadHandle : THandle Read FThreadHandle;
|
||||||
Property Input : TOutPutPipeStream Read FInPutStream;
|
Property Input : TOutPutPipeStream Read FInPutStream;
|
||||||
@ -309,7 +307,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.21 2004-08-12 14:33:55 michael
|
Revision 1.22 2004-09-08 18:17:23 michael
|
||||||
|
+ Removed extra handle on process.
|
||||||
|
|
||||||
|
Revision 1.21 2004/08/12 14:33:55 michael
|
||||||
+ New split of process.pp
|
+ New split of process.pp
|
||||||
|
|
||||||
Revision 1.20 2004/07/30 12:55:42 michael
|
Revision 1.20 2004/07/30 12:55:42 michael
|
||||||
|
@ -324,7 +324,6 @@ begin
|
|||||||
FProcessHandle:=PID;
|
FProcessHandle:=PID;
|
||||||
FThreadHandle:=PID;
|
FThreadHandle:=PID;
|
||||||
FProcessId:=PID;
|
FProcessId:=PID;
|
||||||
FHandle:=PID;
|
|
||||||
//FThreadId:=PID;
|
//FThreadId:=PID;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -426,8 +425,3 @@ begin
|
|||||||
FShowWindow:=Value;
|
FShowWindow:=Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TProcess.GetHandle : THandle;
|
|
||||||
|
|
||||||
begin
|
|
||||||
Result:=FHandle;
|
|
||||||
end;
|
|
||||||
|
@ -24,14 +24,6 @@ begin
|
|||||||
Result:=(FExitCode=Still_Active);
|
Result:=(FExitCode=Still_Active);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TProcess.GetHandle : THandle;
|
|
||||||
|
|
||||||
begin
|
|
||||||
If FHandle=0 Then
|
|
||||||
FHandle:=OpenProcess (PROCESS_ALL_ACCESS,True,FProcessId);
|
|
||||||
Result:=FHandle
|
|
||||||
end;
|
|
||||||
|
|
||||||
Function GetStartupFlags (P : TProcess): Cardinal;
|
Function GetStartupFlags (P : TProcess): Cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user