Autor Beitrag
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 02.12.04 10:42 
Moin Forum,

habe folgendes Problem:
Ich habe vor ein paar Jahren bei einem Projekt eine DLL beigestellt. Jetzt wünscht der Kunde eine Änderung, allerdings habe ich den Quellcode nicht mehr(jedenfalls nicht mehr den letzten Stand). Ein Kollege erzählte mir dann was von einem Disassembler, wie das funktioniert weiß er allerdings auch nicht. Also habe ich mal im Web geforscht und ein Programm namens "PE Explorer" gefunden.
Zum testen habe ich mir dann einfach mal eine DLL (hallo.dll) erstellt, die nur eine Meldung ausgibt.
"PE Explorer" erstellt mir aus meiner DLL ein File mit der Endung asm(hallo.asm). Aber da hängts jetzt...
Wie bekomme ich aus diesem File wieder meine DLL?

Dank Euch, jjturbo

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 02.12.04 11:06 
Das höchste aller Gefühle, was du wieder zurück bekommst, sind die Ressourcen, wenn sie mit Delphi geschrieben wurde, die Formulare, wenn du DeDe benutzt und hoch optimierten Assembler Code. Deinen Delphi Code wirst du nicht wieder bekommen. Und die ziehst doch nicht ernsthaft in Erwägung an dem ASM Code Änderungen vorzunehmen und das wieder zu kompilieren? :shock:

Zu einer DLL kannst du das wieder mit einem Assembler machen.
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 02.12.04 11:22 
Ich muß eigentlich nur ein paar Texte ändern. Habe ich Chancen, daß das nachher wieder funktioniert?

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 02.12.04 11:28 
Die geänderten Texte dürfen nicht länger sein, als die alten und wenn sie kürzer sind musst du sie auffüllen bis zur ursprünglichen Länge.

Aus diesem Grund benutze ich keine hardgecodeten Strings, sondern nur Resourcenstrings (resourcestring). Die werden in einem Stringtable in die Ressource kompiliert und können mit einem Ressourcen-Editor leicht geändert werden. So habe ich es auch mit meinen XP Usermanager gemacht. So war es mir sehr leicht möglich eine englische Version des Programmes zu erstellen. Öffne einfach mal beide Exedateien mit einem Ressourcen-Editor und vergleiche sie.

Zitat:

Resource strings are stored as resources and linked into the executable or library so that they can be modified without recompiling the program. For more information, see Internationalization and localization and the topics that follow it.
Resource strings are declared like other true constants, except that the word const is replaced by resourcestring. The expression to the right of the = symbol must be a constant expression and must return a string value. For example,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
resourcestring

  CreateError = 'Cannot create file %s';        {  for explanations of format specifiers, }
  OpenError = 'Cannot open file %s';            { see 'Format strings' in the online Help }
  LineTooLong = 'Line too long';
  ProductName = 'Borland Rocks\000\000';
  SomeResourceString = SomeTrueConstant;

The compiler automatically resolves naming conflicts among resource strings in different libraries.


Zuletzt bearbeitet von Luckie am Do 02.12.04 11:56, insgesamt 1-mal bearbeitet
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 02.12.04 11:48 
Ich werd dann mal versuche, die Texte so zu verfassen, daß sich die Länge nicht ändert.
Danke erst mal.

Übrigens: Dein XP UserManager ist ein wirklich gelungenes Programm!!!

Gruß, jjturbo

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...