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
    http://tc-image.3dn.ru/Files/0/TDLGDXIMAGES2.zip
    Benötigen einen Code für die Codierung der binären Ressourcenzeile in die Struktur

    0x545046300D54646C674458496D61676573320C646C674458496D6167657332044C656674030D0203546F7003740105576964746803E700064865696768740369010743617074696F6E0606496D6167657305436F6C6F720709636C42746E466163650C466F6E742E43686172736574070F44454641554C545F434841525345540A466F6E742E436F6C6F72070C636C57696E646F77546578740B466F6E742E48656967687402F509466F6E742E4E616D65060D4D532053616E732053657269660A466F6E742E5374796C650B000E4F6C644372656174654F72646572080D506978656C73506572496E636802600A54657874486569676874020D000C546378496D6167654C6973740663786936323406486569676874021805576964746802180D466F726D617456657273696F6E02010A44657369676E496E666F042800080009496D616765496E666F0E010A496D6167652E446174610A3A

    in

    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
    Sven

  • 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.
    Images

    Example:

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

    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
    Sven

    ---------------------

    💡 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.

  • SOLVE-SMART
    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.

    M

  • 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.