Can someone helps me in converting these two CPP functions into Delphi :
Code:
bool StrSearch(byte* mem,char* text,DWORD size){
byte* pchL=mem;
DWORD offset=(DWORD)pchL;
DWORD length=offset+size;
int s=strlen(text);
while(offset<length){
if (!strnicmp((PCSTR)pchL, (PCSTR)text, s)){
return true;
}
offset++;
pch++;
}
return false;
}
Code:
int PEFILE::GetPESectionIndex(char* SectionName){
int j;
int n=image_nt_headers->FileHeader.NumberOfSections;
for(j=0;j<n;j++){
if(!strcmp((const char*)image_section_header[j]->Name,SectionName)) return j;
}
return -1;
}
many thanks