我想匹配记事本进程内存中的一些字符串,但没有成功。这是代码:
int bytes_to_read = (int)info.RegionSize;
char *buffer;
buffer = (char*)malloc(bytes_to_read+1);
ReadProcessMemory(hProcess, info.BaseAddress, buffer, bytes_to_read, NULL);
const char *t1re = ";\\d{0,19}";
regex ret1(t1re);
cmatch match;
if(regex_search(buffer, match, ret1))
{
cout << "Found: " << pe32.szExeFile << "\n";
system("pause");
}