-1

All exes compiled can be decompiled (but with some hardship ) but delphi application forms are saved as dfms inside exe which can be seen easily (with reshacker) (soooo easily ) can i overcome these problems ,first i thought of copying dfm data to oncreate procedure so i can hide my form information .

tell me a good solution for this ,

i do not like to use compressors

and my application is bit large so i cant port resourese one by one to a dll. i need an effective solution.

Vibeeshan Mahadeva
  • 7,147
  • 8
  • 52
  • 102
  • 2
    -1. The premise of this question (that images are stored as hexadecimal text) is wrong. – Rob Kennedy Nov 01 '10 at 17:00
  • So why title your question as "Delphi dfm bad compiler"? Delphi DFM files are not compiled; they are linked without modification as binary resources in your EXE; the binary format is completely equivalent to the text format (since old Delphi versions used that binary format to store DFM files, and like Allen Bauer mentions: you can still store your DFM file as binary files.). – Jeroen Wiert Pluimers Nov 01 '10 at 21:23

2 Answers2

10

.dfm files are not stored as txt when they're linked into the final PE file. They are converted to a tagged binary format that is placed into an RCDATA Windows resource. For the images, they are stored as the raw binary. While building your application, the .dfm files can be stored as text or binary (right click the form designer and there is a selection for choosing one or the other). This only affects the format of the .dfm file itself. It has zero affect on its format once it is linked into your final binary.

You can try to convert the images to constant arrays (there are many tools that will read a binary and write out an array decl in various language formats) and use it as an include file. Another thing is to encrypt the images using a one-way algorithm like RSA or PGP. This won't keep someone from decrypting the image, but it will keep someone from replacing it since they won't have the private key.

Allen Bauer
  • 16,657
  • 2
  • 56
  • 74
1

If this is about protecting your applications images you are already on the losing side:

https://stackoverflow.com/questions/455623/how-can-i-prevent-users-from-taking-screenshots-of-my-application-window

It is always possible to make screenshots of a running application.

Community
  • 1
  • 1
Jens Mühlenhoff
  • 14,565
  • 6
  • 56
  • 113