Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 09-11-2009
danger4 danger4 is offline
Registrado
 
Registrado: nov 2009
Posts: 1
Poder: 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
  #2  
Antiguo 11-11-2009
Avatar de rgstuamigo
rgstuamigo rgstuamigo is offline
Miembro
 
Registrado: jul 2008
Ubicación: Santa Cruz de la Sierra-Bolivia
Posts: 1.646
Poder: 17
rgstuamigo Va por buen camino
Arrow

Y no te sirve convertir el Valor string a entero usando la funcion StrToInt()?
Saludos...
__________________
"Pedid, y se os dará; buscad, y hallaréis; llamad, y se os abrirá." Mt.7:7
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Ayuda en Text Scroll ColdFusion Varios 2 07-04-2009 14:26:11
Necesito ayuda para cargar varios sonidos en memoria Loreiev Varios 7 21-11-2008 00:00:29
Ayuda sobre crear puntero a memoria Lambda Varios 1 30-03-2007 18:20:30
Guardar lo que tengo en un Edit1.text y edit2.text en una base de datos firebird jorgeluisc Conexión con bases de datos 1 23-04-2006 18:29:28
Como puedo cambiar la propiedad de edicion y no edicion a un StringGrid1 ctronx Varios 2 25-06-2004 23:10:19


La franja horaria es GMT +2. Ahora son las 15:53:29.


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
Copyright 1996-2007 Club Delphi