PDA

Ver la Versión Completa : [Ayuda] value text edicion de memoria


danger4
09-11-2009, 03:15:05
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". :rolleyes: esto es para un juego... sinceramente

Normalmente para leer una address en byte uso esta variable:

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.

Value:=cluBdelphi;
PBYTE($0089DBE8)^:=Value;



en la form de la dll lo tengo asi :

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:

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 ;)

rgstuamigo
11-11-2009, 14:40:03
Y no te sirve convertir el Valor string a entero usando la funcion StrToInt()?:confused:
Saludos...:)