Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   [Ayuda] value text edicion de memoria (https://www.clubdelphi.com/foros/showthread.php?t=64874)

danger4 09-11-2009 03:15:05

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". :rolleyes: 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 ;)

rgstuamigo 11-11-2009 14:40:03

Y no te sirve convertir el Valor string a entero usando la funcion StrToInt()?:confused:
Saludos...:)


La franja horaria es GMT +2. Ahora son las 05:11:47.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi