Ver Mensaje Individual
  #1  
Antiguo 09-11-2009
danger4 danger4 is offline
Registrado
 
Registrado: nov 2009
Posts: 1
Reputación: 0
danger4 Va por buen camino
Question Ayuda con edicion de memoria

buenas soy Nuevo en el foro , tengo el siguiente problema quisiera poner a un address su valor en text cosa que no he logrado hacer ya q sale el error "is Not a valid integer value". esto es para un juego... sinceramente

Normalmente para leer una address en byte uso esta variable:

Código Delphi [-]
Value:=0;
PBYTE($0089DBE8)^:=Value;

he estado averiguando pero no he llegado a saber que variable puedo usar en vez de PBYTE para que el value pueda leer del tipo text.

Código Delphi [-]
Value:=cluBdelphi;
PBYTE($0089DBE8)^:=Value;



en la form de la dll lo tengo asi :

Código Delphi [-]
library Project1;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  SysUtils,
  Classes,
  Windows,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}
var
AtProcessobymr:THandle;
hId:Cardinal;

procedure AbrirTrainerbymr;
begin
Form1:=TForm1.Create(nil);
Form1.ShowModal;
end;

begin
AtProcessobymr:=OpenProcess(PROCESS_ALL_ACCESS,false,GetCurrentProcessID);
CreateRemoteThread(AtProcessobymr,nil,0,@AbrirTrainerbymr,@AbrirTrainerbymr,0,hID);
end.

begin
end.

en el form esta asi:

Código Delphi [-]
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls, WinSkinData , tlhelp32;

type
  TForm1 = class(TForm)
    CheckBox1: TCheckBox;
    Timer1: TTimer;
    CheckBox2: TCheckBox;
    CheckBox3: TCheckBox;
    Edit1: TEdit;
    CheckBox4: TCheckBox;
    CheckBox5: TCheckBox;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    CheckBox6: TCheckBox;
    Edit5: TEdit;
    CheckBox7: TCheckBox;
    SkinData1: TSkinData;
    Edit6: TEdit;
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  Memory: DWORD;
 value: dword;
  j: integer;

number: byte;


implementation

{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);

begin
if Checkbox1.Checked=True then begin
Value:=strtoint(Edit1.text);
PBYTE($0089DBE8)^:=Value;
end;


if Checkbox2.Checked=True then begin
Value:=0;
PINT64($0089F71C)^:=Value;
PINT64($0089F6AC)^:=Value;
end;




end;
end.

este codigo me funciona bien para leer cualquier address en distintos tipos de bytes pero tengo el problema para leer del tipo text gracias por leer mi tema

Última edición por danger4 fecha: 10-11-2009 a las 01:36:32.
Responder Con Cita