Holen Sie sich aus den Ressourcen der ausführbaren Dateien Daten in Form einer Zeile ab

  • Gibt es Funktionen für die Umwandlung einer binären Linie in eine Struktur...
    Archiv - Es hat 2 Dateien - binäre Zeichenfolge und Struktur
    Benötigen einen Code für die Codierung der binären Ressourcenzeile in die Struktur



    object dlgDXImages2: TdlgDXImages2
     Left = 525
     Top = 372
     Width = 231
     Height = 361
     Caption = 'Images'
     Color = clBtnFace
     Font.Charset = DEFAULT_CHARSET
     Font.Color = clWindowText
     Font.Height = -11
     Font.Name = 'MS Sans Serif'
     Font.Style = []
     OldCreateOrder = False
     PixelsPerInch = 96
     TextHeight = 13
     object cxi624: TcxImageList
       Height = 24
       Width = 24
       FormatVersion = 1
       DesignInfo = 524328

  • Hi Andrey_A ,

    es fällt mir schwer dein Anliegen zu verstehen? Kannst du bitte nochmal versuchem zu beschreiben was du tun willst und warum?
    Falls dir ggf. englisch besser liegen sollte, kannst du auch gern im engli. Forum die Frage posten oder sogar hier und wir übersetzen sie dann ggf. 😇 .

    Ansonsten würde ich gern wissen, für was du das brauchst?
    Um was geht es?

    Viele Grüße

  • To be honest, I see no way to do this properly.

    • You can simply use BinaryToString() to get a readable text out of your line, but several values of the object structure are not readable due to codepage and encoding issues.
    • Another option is to use FileOpen() with binary mode.
      • But these also just lead to the result above => insufficient.


    Func _WriteFile($sFile, $vData)
        Local Const $iBinaryOverwriteCreationMode = 16 + 2 + 8
        Local $hFile = FileOpen($sFile, $iBinaryOverwriteCreationMode)
        FileWrite($hFile, $vData)

    What you try to achieve is reverse engineering of binaries and bring it into a structured form. I doubt it feasable with pure AutoIt (WinAPI'ish) functions and calls.

    ⚖ Again:
    Why do you need this? What do you want by this? I ask because of the forum rules (here and in the engli. forum) => please keep this in mind, thanks.

    Best regards


    💡 Wenn jemand den Bedarf sieht, dass ich dies übersetzen sollte oder die Fragestellung von Andrey_A nochmal (so wie ich sie nun verstanden habe) wiederholen soll, auf deutsch, dann lasst es mich gern wissen 🤝 .

  • Due to you wont answer my question about why (I mentioned the forum rules before), I will no longer provide any help and I guess several other people here too. Sorry, bye.

    ⚖ Again:
    Why do you need this? What do you want by this? I ask because of the forum rules (here and in the engli. forum) => please keep this in mind, thanks.

    The question was simple - how to get a structure from a binary line
    There is no result
    Possible someone on the forum knows the answer
    SOLVE-SMART . Sorry.

  • The problem is:
    - This is impossible as long as noone knows everything about map/struct itself (what exactly is TdlgDXImages2, Font, TcxImageList, etc.). You cannot assemble a mapping without knowing all members.
    - This looks like a "map" from another programming language. If "everything" is known one might construct something with nested maps (in AutoIt) to represent the data but the memory layout will be vastly different. Also AutoIt does not allow to reinterpret_cast<map*>(ptr), so noone will be able to even get a memory dump of a map here (and vice versa) :D. A dedicated function to r/w is needed.
    - Wrapping this into a "struct" requires the knowledge of the whole memory layout. This is impossible, especially for maps with variant datatypes or other "unknown inner workings" like: What exactly is "[]" in memory? This looks like an empty list but only god knows how this is represented in RAM (assuming the shown binary data is a memory dump).
    - etc.

    Most people here are skilled in reading/writing code but I fear your request cannot be fulfilled by anyone without "the whole picture".

    To sum it up:
    - If "everything" about this map is known, it is possible to write a "ReadBinaryToNestedMap/WriteNestedMapToBinary" function.
    - If you find someone who wants to do this (after "everything" is known) is another story.


  • This file is most likely a GUI description of a Delphi or Oracle Forms application.

    If you can find the documentation for the .DFM, .FMX or .XFM format, they can help you accordingly.

    When I look at the format, it requires knowledge of the data types assigned to the attributes in order to interpret it.
    In principle, the format is quite simple, as the values are simply placed one after the other.
    Strings (both keys and values) are preceded by a byte with the length of the string.

    The problem: The first 4 INT16 values (i.e. 2 bytes) are consistently preceded by a byte with the value 03.
    Without knowing that the particular attribute requires a specific data type, it would therefore be assumed that the 03 is followed by a string of length 3.
    In order to be able to distinguish this correctly, prior knowledge is required - namely that the attribute "Top", for example, expects an INT16 type instead of a string.
    You should be able to find this in the format description.

    Einmal editiert, zuletzt von AspirinJunkie (15. April 2024 um 07:23)

  • I realized that there is no answer - thank you all - I will solve the problem myself.
    Moombas, Why write if you don't know the solution?

    Einmal editiert, zuletzt von Andrey_A (15. April 2024 um 10:39)

  • Gun-Food 15. April 2024 um 10:51

    Hat das Thema geschlossen.