Supongamos que ya está todo cargado y tal:
Código Delphi
[-]
var
Buffer: array of byte; Cadena: array of byte; BufSize: integer; CadSize: integer; n, p: integer; Correcto: Boolean;
begin
for n:=0 to BufSize - CadSize do
begin
Correcto:=False;
If Buffer[n]=Cadena[0] then
for p:=0 to CadSize-1 do
if Buffer[n+p]=Cadena[p] then Correcto:=True else
begin
Correcto:=False;
Break;
end;
If correcto then break;
end;
If correcto then ShowMessage(Format('Se encontró en la posición %d', [p]));
end;
Así, de memoria, más o menos
Salu2.