Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Problem mit FillChar (https://www.delphipraxis.net/55116-problem-mit-fillchar.html)

Newhack 17. Okt 2005 00:11


Problem mit FillChar
 
Hallo.
Hab seit kurzen ein Problem bie Delphi.
Habe Delphi2005.

Ich wollte mit dieser Prozedure arbeiten:
SQL-Code:
procedure ShellExecute_AndWait(FileName: string; Params: string);
var
 exInfo: TShellExecuteInfo;
 Ph: DWORD;
begin
 FillChar(exInfo, SizeOf(exInfo), 0);
 with exInfo do
 begin
   cbSize := SizeOf(exInfo);
   fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_FLAG_DDEWAIT;
   Wnd := GetActiveWindow();
   ExInfo.lpVerb := 'open';
   ExInfo.lpParameters := PChar(Params);
   lpFile := PChar(FileName);
   nShow := SW_SHOWNORMAL;
 end;
 if ShellExecuteEx(@exInfo) then
   Ph := exInfo.HProcess
 else
 begin
   ShowMessage(SysErrorMessage(GetLastError));
   Exit;
 end;
 while WaitForSingleObject(ExInfo.hProcess, 50) <> WAIT_OBJECT_0 do
   Application.ProcessMessages;
 CloseHandle(Ph);
end;
Also einfach 2 Dateien kopieren. Dennoch hat Delphi ein Problem mit FillChar(exInfo, SizeOf(exInfo), 0);.
Die uses ShellApi ist auch drinne.

Kann da jemand helfen?

Danke
Newhack ;)

Luckie 17. Okt 2005 00:24

Re: Problem mit FillChar
 
Warum ist das in der OpenSource-Sparte?
Warum wurde der Delphi Quellecode in SQL-Code-Tags eingefasst?
Warum wurde gleichzeitig in einem anderen Forum fünf Minuten später ein identisches Thema aufgemacht ohne dort hinzuverlinken?

Verschoben und Code-Tags korrigiert.

Zitat:

Dennoch hat Delphi ein Problem mit FillChar(exInfo, SizeOf(exInfo), 0);.
Sehr schön. Und welches Problem hat dein Delphi mit der Funktion?


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:24 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz