var
fsTmp : TMemoryStream;
ptr :pointer;
PI: ^longword;
i :integer;
begin
fsTmp := TMemoryStream.Create;
fstmp.LoadFromFile(Edit1.Text);
fstmp.Position :=0;
PI :=fstmp.Memory;
// PI := pointer(integer(pi)+1000000);
// ptr := ptr +10;// edit1.Text := inttostr(PI^);
for i:= 0 to fstmp.size-4 do
begin
if pi^ = 511597066 then memo1.Lines.add('32:'+Inttostr(i)); pi := pointer(integer(pi) +1);
application.ProcessMessages;
end;
memo1.Lines.Add('end');
解决方案 »
- 关于cxGrid的Cell编辑问题
- DBGridEh中字段输入问题
- @@@@@兄弟们,救命!为什么在读取ORACLE表索引时,无论是否为主索引,均显示为否。进来有分。@@@@@
- 谁可以给我一个最简单的Delphi下的DirectX程序~~~~(万分感谢!~~~)
- 大家帮我找回对Delphi的信心
- 关于dbgrid的问题
- 网络图像传输问题,特急!!!高分奉送
- 初级问题-报表分组的问题
- 请教api函数timeGetTime在程序中起何作用?我百思不得其解!
- 求透明Tlistview控件
- MTS怎么只能生成*.pak 和*.dll,却不能生成Clients子目录及在客户端安装的*.exe
- stringgrid中某cells有没有办法放上一个listbox或者richedit?
//By InsideDelphi
var
S:String;
F:FileStream;
KeyWords:String;
int FindPos:Integer;
Begin
F:=TFileStream.Create('你的文件名',fmOpenRead);
SetLength(S,F.Size);//Important
F.Read(PChar(S)^,F.Size);
F.Free;
KeyWords:=Chr($DD)+Chr($EE)+Chr($FF);//or KeyWors:=HexToString(....)
FindPos:=Pos(KeyWords,S);
if FindPos>0 then DoSomething. //Pos>0 means you have found the string
// if you want to find the next keywords,use copy function
// eg:S:=Copy(S,FindPos+Length(KeyWords),Length(S)-FindPos-Length(KeyWords)+1)
// and then the same above
end;
int FindPos:Integer;
--> FindPos:Integer;
我找你,有急事!你在吗