吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1324|回复: 6
收起左侧

[求助] $0000003F是啥?

[复制链接]
冥界3大法王 发表于 2022-6-14 22:58
[Delphi] 纯文本查看 复制代码
unit Unit4;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, StdCtrls;

type
  TForm4 = class(TForm)
    Edit1: TEdit;
    Memo1: TMemo;
    Button1: TButton;
    Label1: TLabel;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
  private
{ Private declarations }
  public
{ Public declarations }
    function FindAllFileInADirectory(Directory: string; RetList: TStringList): TStringList;
  end;

var
  Form4: TForm4;

implementation

{$R *.dfm}

procedure TForm4.Button1Click(Sender: TObject);
var
  TempList: TStringList;
begin
  TempList := TStringList.Create;
  TempList := FindAllFileInADirectory(Edit1.text, TempList);
  memo1.Lines.Clear;
  memo1.Lines.Assign(TempList);
  TempList.clear;
end;

function TForm4.FindAllFileInADirectory(Directory: string; RetList: TStringList): TStringList;
var
  SearchRec: TSearchRec;
begin
  if FindFirst(Directory + '\*.pas', $0000003F, SearchRec) = 0 then
  begin
    repeat
      RetList.Add(Directory + '\' + SearchRec.Name);
    until (FindNext(SearchRec) <> 0);
  end;
  FindClose(SearchRec);
end;

end.

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

苏紫方璇 发表于 2022-6-14 23:11
https://www.cnblogs.com/coorun/p/3566251.html
应该是faAnyFile代表任意文件

免费评分

参与人数 1热心值 +1 收起 理由
冥界3大法王 + 1 感谢国际友人!

查看全部评分

云在天 发表于 2022-6-14 23:54
faReadOnly = $00000001 platform;&#160; &#160;//只读文件
faHidden = $00000002 platform;&#160; //隐藏文件
faSysFile = $00000004 platform;&#160; //系统文件
faVolumeID = $00000008 platform;&#160; &#160;//卷标文件
faDirectory = $00000010;  //目录文件
faArchive = $00000020 platform;&#160; //归档文件
faSymLink = $00000040 platform;&#160; //链接文件
faAnyFile = $0000003F;&#160; //任意文件

免费评分

参与人数 1吾爱币 +1 收起 理由
冥界3大法王 + 1 感谢国际友人!

查看全部评分

4899 发表于 2022-6-15 10:17
LightHouseZ 发表于 2022-6-15 10:39
这是什么语言?bash吗?0.0
 楼主| 冥界3大法王 发表于 2022-6-15 10:57
为什么报错呢?
Project Project5.exe raised exception class $C0000005 with message 'access violation at 0x00408678: read of address 0x003a0028'.


[Delphi] 纯文本查看 复制代码
unit Unit4;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
  Vcl.StdCtrls;

type
  TForm4 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Memo1: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    function FindAllFileInADirectory(Directory: string; RetList: TStringList): TStringList;
  end;

var
  Form4: TForm4;

implementation

{$R *.dfm}


function TForm4.FindAllFileInADirectory(Directory: string; RetList: TStringList): TStringList;
var
  SearchRec: TSearchRec;
begin
  if FindFirst(Directory + '\*.pas', $00000010, SearchRec) = 0 then
  begin
    repeat
      RetList.Add(Directory + '\' + SearchRec.Name);
    until (FindNext(SearchRec) <> 0);
  end;
  FindClose(SearchRec);
end;

procedure TForm4.Button1Click(Sender: TObject);
var
  TempList: TStringList;
begin
  TempList := TStringList.Create;
  TempList := FindAllFileInADirectory(Edit1.text, TempList);
  memo1.Lines.Clear;
  memo1.Lines.Assign(TempList);
  TempList.clear;
end;


end.
manyou 发表于 2022-6-15 11:04

ac错误? 哪行报的错呢?
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-25 10:50

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表