Based on this :
procedure HookResourceString(rs: PResStringRec; newStr: PChar); var oldprotect: DWORD; begin VirtualProtect(rs, SizeOf(rs^), PAGE_EXECUTE_READWRITE, @oldProtect); rs^.Identifier := Integer(newStr); VirtualProtect(rs, SizeOf(rs^), oldProtect, @oldProtect); end; const SContinue = 'Continue'; SClose = 'Close'; procedure TForm1.Button1Click(Sender: TObject); begin HookResourceString(@SMsgDlgOK, SContinue); HookResourceString(@SMsgDlgCancel, SClose); if MessageDlg('My Message', mtConfirmation, [mbOK, mbCancel], 0) = mrOK then begin
kobik source share