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');

解决方案 »

  1.   

    hehe,Look here:
    //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;
      

  2.   

    //Sorry,declareation Error Below,using C SDK too long
    int FindPos:Integer;
    --> FindPos:Integer;
      

  3.   

    to Jera(天...塌下来我也不怕) :
    我找你,有急事!你在吗