unit Update;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Borland.Vcl.Db, Borland.Vcl.DBTables,
Borland.Vcl.StdCtrls,baseeditShare,
System.ComponentModel,shellapi,
Borland.Vcl.ExtCtrls,System.IO, Borland.Vcl.ComCtrls,uUpdateThread,
Borland.Vcl.Buttons;type TForm1 = class(TForm).....
procedure TForm1.Button3Click(Sender: TObject);
var ShellExInfo : ShellExecuteInfo;
begin
FillChar(ShellExInfo,SizeOf(ShellExInfo),0);
with ShellExInfo do //填充外部命令执行信息
begin
cbSize := SizeOf(ShellExInfo);
fMask := See_Mask_NoCloseProcess;
Wnd := 0;
lpFile := PChar('c:\windows\regedit.exe');
nShow := SW_ShowNormal;
end;
ShellExecuteEx(@ShellExInfo);
WaitForSingleObject(ShellExInfo.hProcess,INFINITE);//阻塞等待进程结束
Form1.Button2.Click; //这里写入外部调用的进程执行结束后要做的事情
end;....end.編譯時出錯如下:
[Pascal Error] Update.pas(1704): E2003 Undeclared identifier: 'FillChar'
不知道為什麽!?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Borland.Vcl.Db, Borland.Vcl.DBTables,
Borland.Vcl.StdCtrls,baseeditShare,
System.ComponentModel,shellapi,
Borland.Vcl.ExtCtrls,System.IO, Borland.Vcl.ComCtrls,uUpdateThread,
Borland.Vcl.Buttons;type TForm1 = class(TForm).....
procedure TForm1.Button3Click(Sender: TObject);
var ShellExInfo : ShellExecuteInfo;
begin
FillChar(ShellExInfo,SizeOf(ShellExInfo),0);
with ShellExInfo do //填充外部命令执行信息
begin
cbSize := SizeOf(ShellExInfo);
fMask := See_Mask_NoCloseProcess;
Wnd := 0;
lpFile := PChar('c:\windows\regedit.exe');
nShow := SW_ShowNormal;
end;
ShellExecuteEx(@ShellExInfo);
WaitForSingleObject(ShellExInfo.hProcess,INFINITE);//阻塞等待进程结束
Form1.Button2.Click; //这里写入外部调用的进程执行结束后要做的事情
end;....end.編譯時出錯如下:
[Pascal Error] Update.pas(1704): E2003 Undeclared identifier: 'FillChar'
不知道為什麽!?
解决方案 »
- fstream和iostream之类的读写文件操作是会将文件内容全都放到内存中么?
- 请问DELPHI如何取出文件夹下所有文件的名字和文件数啊?
- delphi中LR(0)分析器中的Action表和Goto表是怎么构建的?????
- webbrowser 自动填表问题
- delphi程序怎么打包呀!
- 关于“About”对话框的制作
- 佳能相机的SDK
- 求脱,Themida & WinLicense 2.0 - struct (Hide from PE scanners I)
- 高手们帮帮忙
- 请教我写了个DEPHI的程序,我想把它编译成脱离环境的可执行文件,我应该怎么操作,
- 制作透明组件源代码
- Sql条件语句不知道如何写,十分紧急,请帮忙解答,谢谢!
不过这个 FillChar 在原 d7 System.pas 单元, 要在 uses 中加上