计算机二级DELPHI函数:delphi自删除函数DeleteMe计算机二级考试

文章作者 100test 发表时间 2009:05:07 18:06:52
来源 100Test.Com百考试题网


  2009年下半年全国计算机等级考试你准备好了没?考计算机等级考试的朋友,2009年下半年全国计算机等级考试时间是2009年9月19日至23日。更多优质资料尽在百考试题论坛 百考试题在线题库
  delphi 程序自删除函数 DeleteMe
  procedure DeleteMe.
  var
  BatchFile: TextFile.
  BatchFileName: string.
  ProcessInfo: TProcessInformation.
  StartUpInfo: TStartupInfo.
  begin
  BatchFileName := ExtractFilePath(ParamStr(0)) $$del$$.bat.
  AssignFile(BatchFile, BatchFileName).
  Rewrite(BatchFile).
  Writeln(BatchFile, :try).
  Writeln(BatchFile, del " GetShortName(ParamStr(0)) ").
  Writeln(BatchFile, if exist " GetShortName(ParamStr(0)) " goto try).
  Writeln(BatchFile, del %0).
  Writeln(BatchFile, cls).
  Writeln(BatchFile, exit).
  CloseFile(BatchFile).
  FillChar(StartUpInfo, SizeOf(StartUpInfo), $00).
  StartUpInfo.dwFlags := STARTF_USESHOWWINDOW.
  StartUpInfo.wShowWindow := SW_Hide.
  if CreateProcess(nil, PChar(BatchFileName), nil, nil,
  False, IDLE_PRIORITY_CLASS, nil, nil, StartUpInfo,
  ProcessInfo) then
  begin
  CloseHandle(ProcessInfo.hThread).
  CloseHandle(ProcessInfo.hProcess).
  end.
  end.

  2009年上半年全国计算机等级考试参考答案请进入计算机考试论坛

  2009年全国计算机等级考试报名信息汇总

  2009年NCRE考试有新变化

  2009年全国计算机等级考试-大纲

  2009年上半年全国计算机二级考试试题及答案

  2009年上半年全国计算机等级考试试题答案汇总



相关文章


计算机二级DELPHI函数:扩展保护文件夹计算机二级考试
计算机二级DELPHI函数:利用Delphi建立精确计数器计算机二级考试
计算机二级DELPHI函数:Win32API使用特殊情况计算机二级考试
计算机二级DELPHI函数:调用控制面板设置功能计算机二级考试
计算机二级DELPHI函数:delphi自删除函数DeleteMe计算机二级考试
DELPHI函数:Delphi中求两个时间差值代码计算机二级考试
计算机二级DELPHI函数:delphi部分操作文件函数计算机二级考试
计算机二级DELPHI函数:Delphi的四舍五入函数计算机二级考试
计算机二级DELPHI函数:Format的使用方法计算机二级考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛