Autor Beitrag
CloudStrife
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Fr 10.10.03 16:02 
Hallo Leute,

Ich frage mich schon lange ob man in Delphi Hex werte an bestimmten stellen überschreiben kann.

Zum Beispiel --Stelle Hex: 25A: 7E 19 zu 7F 19 umschreiben. Hat jemand eine Lösung ??--

MfG Cloud[/u]

_________________
Tötet keine Vögel, denn wir Vögeln auch keine Toten.
opfer.der.genauigkeit
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754
Erhaltene Danke: 1



BeitragVerfasst: Fr 10.10.03 16:11 
An welchen Stellen meinst du?

_________________
Stellen Sie sich bitte Zirkusmusik vor.
CloudStrife Threadstarter
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Fr 10.10.03 16:15 
Sagen wir an der Stell 25A Den Wert 7E zu 7F umwandeln. Geht das ohne Probleme, wenn ja wie ??

_________________
Tötet keine Vögel, denn wir Vögeln auch keine Toten.
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Fr 10.10.03 19:17 
sofern du im Speicher direkt rumschreiben willst, no chance.
grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
CenBells
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1547

Win 7
Delphi XE5 Pro
BeitragVerfasst: Fr 10.10.03 23:40 
hallo,

willst du in einer datei die änderung vornehmen?

Wenn ja, ist das möglich. Schau dir mal streams dazu an. Kannst es aber auch mit ner stringlist machen...

Gruß
ken

_________________
Eine Klasse beschreibt die Struktur und das Verhalten einer Menge gleichartiger Objekte.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Sa 11.10.03 13:05 
MSCH hat folgendes geschrieben:
sofern du im Speicher direkt rumschreiben willst, no chance.

Wieso nicht? -> WriteProcessMemory()

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Sa 11.10.03 17:09 
ja, aber nur im eigenen.
grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Sa 11.10.03 18:29 
Ähm.. mit OpenProcess und WriteProcessMemory kannst du dich in jedem Prozess für den du ein gültiges Handle bekommst austoben..! :roll:

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Sa 11.10.03 20:18 
oder auch nicht: :-)
Zitat:
WriteProcessMemory copies the data from the specified buffer in the current process to the address range of the specified process. Any process that has a handle with PROCESS_VM_WRITE and PROCESS_VM_OPERATION access to the process to be written to can call the function. The process whose address space is being written to is typically, but not necessarily, being debugged.
The entire area to be written to must be accessible. If it is not, the function fails as noted previously.


grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
MrSaint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1033
Erhaltene Danke: 1

WinXP Pro SP2
Delphi 6 Prof.
BeitragVerfasst: So 12.10.03 11:25 
früher zu Turbo-Pascal Zeiten konnte man noch direkt in den Speicher schreiben (damals war das ein zweidimensionals array namens "mem"). mit Delphi (Version 2 glaub) is das aber verschwunden.

ne idee wär vielleicht (kommt mir nur grad so), dass man nen pointer macht, den auf diese stelle ($25 oder was auch immer) zeigen läßt und dann den wert des pointers ändert? keine ahnung ob das geht, aber vielleicht tuts ja.. bin grad net so fit ;) zu wenig geschlafen ;)



MrSaint

_________________
"people knew how to write small, efficient programs [...], a skill that has subsequently been lost"
Andrew S. Tanenbaum - Modern Operating Systems
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: So 12.10.03 11:44 
MSCH hat folgendes geschrieben:
oder auch nicht: :-)

Und wieso nicht? :?

Zitat:
Any process that has a handle with PROCESS_VM_WRITE and PROCESS_VM_OPERATION access to the process to be written to can call the function.

Wenn ich mit OpenProcess mit PROCESS_VM_WRITE und PROCESS_VM_OPERATION ein gültiges Process-Handle bekomm kann ich mich im Adressraum des jeweiligen Prozessraums austoben:
Zitat:
WriteProcessMemory copies the data from the specified buffer in the current process to the address range of the specified process.

Man übergibt einfach einen Pointer in den eigenen Adressraum an dem die Daten liegen die man in den fremden Prozessraum schreiben will.
Zitat:
The entire area to be written to must be accessible. If it is not, the function fails as noted previously.

Da gibt es 2 Möglichkeiten... entweder man reserviert sich per VirtualAllocEx Speicher im fremden Prozessraum oder aber die Adresse auf die man schreiben will ist bereits "accessible" (möglicherweise braucht man auch erst VirtualProtectEx).

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!