Anmeldung Problem in ListView1

  • VB.NET

Es gibt 28 Antworten in diesem Thema. Der letzte Beitrag () ist von ichduersie.

    Anmeldung Problem in ListView1

    Hallo zusammen,

    hier ist mein Code-Lese:

    VB.NET-Quellcode

    1. Private Sub ReadFile(FilePath As String)
    2. Me.ListView1.Items.Clear()
    3. Dim input As New FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.Read)
    4. Dim reader As New BinaryReader(input)
    5. reader.BaseStream.Position = &H270
    6. Dim num As Integer = 1
    7. Dim num2 As Integer = 0
    8. Do
    9. Dim position As Long = reader.BaseStream.Position - 10
    10. Dim hex As Byte() = reader.ReadBytes(8)
    11. Dim num3 As String = BitConverter.ToString(hex).Replace("-", "")
    12. Dim hex2 As Byte() = reader.ReadBytes(2)
    13. Dim num4 As String = BitConverter.ToString(hex2).Replace("-", "")
    14. reader.BaseStream.Position += 14
    15. Dim lvi As New ListViewItem("&H" & Conversion.Hex(position))
    16. lvi.SubItems.AddRange(New String() {Convert.ToString(num3), Convert.ToString(num4)})
    17. Me.ListView1.Items.Add(lvi)
    18. num += 1
    19. num2 = (num2 + 1)
    20. Loop While (num2 <= &H167)
    21. reader.Close()
    22. input.Close()
    23. End Sub


    hier ist mein Registrierungscode:

    VB.NET-Quellcode

    1. Private Sub WriteFile(FilePath As String)
    2. Dim output As New FileStream(FilePath, FileMode.Open, FileAccess.Write, FileShare.Write)
    3. Dim writer As New BinaryWriter(output)
    4. writer.BaseStream.Position = &H278
    5. For Each item As ListViewItem In ListView1.Items
    6. writer.Write(item.SubItems(2).Text)
    7. Next
    8. writer.Close()
    9. output.Close()
    10. Interaction.MsgBox("Datei speichern.", MsgBoxStyle.Information, "")
    11. End Sub


    Mein Problem ist, wenn ich meine Datei speichern und ich mit dem hxd es gibt mir so:

    Quellcode

    1. A7 E6 0F 1A 3A 36 00 00 04 30 44 30 30 04 39 39 39 39 04 46 46 46 46 04 46 46 46 46 04 30 30 30 32 04 46 46 46 46 04 46 46 46 46 04 30 37 30 30 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 30 31 30 30 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 30 37 30 30 04 30 37 30 30 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 30 31 30 30 04 31 34 30 30 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 30 35 30 30 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 46 46 46 46 04 31 31 30 32 04 46 46 46 46


    hier ist meine Originaldatei:

    Quellcode

    1. A7 E6 0F 1A 3A 36 00 00 0D 00 01 02 00 00 00 00 00 00 00 00 7F FF FF FF A7 E6 0F 1B 66 0B D0 00 00 00 01 02 00 00 00 00 00 00 00 01 7F FF FF FF A7 E6 0F 1B 66 32 E0 00 FF FF 01 02 00 00 00 00 00 00 00 01 7F FF FF FF A7 98 87 C0 01 58 00 00 FF FF 01 02 00 00 00 00 00 00 00 05 7F FF FF FF D6 76 FB 51 19 E2 00 00 00 02 01 02 00 00 00 00 00 00 00 01 7F FF FF FF D6 76 FB 51 1F FC 80 00 FF FF 01 02 00 00 00 00 00 00 00 01 7F FF FF FF D6 76 FB 51 26 17 00 00 FF FF 01 02 00 00 00 00 00 00 00 01 7F FF FF FF 59 50 4E 25 9C 4D 80 00 07 00 01 02 00 00 00 00 00 00 00 02 00 00 00 00


    Können Sie mir helfen dieses Problem in der Aufnahme hex beheben? danke ?(
    @hacker59 Willkommen im Forum. :thumbup:
    Kannst Du bitte mal präzise beschreiben, was Dein Code machen soll?
    Möglicherweise bieten sich alternative Lösungsansätze an.
    ----
    num3 und num4 sind bereits Strings, die musst Du nicht noch mal in einen String konvertieren.
    Hat Dein Projekt Option Strict On?
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    Programmierfragen über PN / Konversation werden ignoriert!
    Hello RodFromGermany,

    VB.NET-Quellcode

    1. Private Sub ReadFile(FilePath As String)
    2. Me.ListView1.Items.Clear()
    3. Dim input As New FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.Read)
    4. Dim reader As New BinaryReader(input)
    5. reader.BaseStream.Position = &H270
    6. Dim num As Integer = 1
    7. Dim num2 As Integer = 0
    8. Do
    9. Dim position As Long = reader.BaseStream.Position - 10
    10. Dim hex As Byte() = reader.ReadBytes(8)
    11. Dim num3 As String = BitConverter.ToString(hex).Replace("-", "")
    12. Dim hex2 As Byte() = reader.ReadBytes(2)
    13. Dim num4 As String = BitConverter.ToString(hex2).Replace("-", "")
    14. reader.BaseStream.Position += 14
    15. Dim lvi As New ListViewItem("&H" & Conversion.Hex(position))
    16. lvi.SubItems.AddRange(New String() {num3, num4})
    17. Me.ListView1.Items.Add(lvi)
    18. num += 1
    19. num2 = (num2 + 1)
    20. Loop While (num2 <= &H167)
    21. reader.Close()
    22. input.Close()
    23. End Sub


    VB.NET-Quellcode

    1. Private Sub WriteFile(FilePath As String)
    2. Dim output As New FileStream(FilePath, FileMode.Open, FileAccess.Write, FileShare.Write)
    3. Dim writer As New BinaryWriter(output)
    4. writer.BaseStream.Position = &H278
    5. For Each item As ListViewItem In ListView1.Items
    6. writer.Write(item.SubItems.Item(2).Text, 0, 2)
    7. Next
    8. writer.Close()
    9. output.Close()
    10. Interaction.MsgBox("Fichier Sauvegarder.", MsgBoxStyle.Information, "")
    11. End Sub


    WIE SIE SCHREIBEN Sie DER CODE speichern?

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „hacker59“ ()

    @hacker59 Wie bitte?
    Lass bitte alle Formatierungen weg.
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    Programmierfragen über PN / Konversation werden ignoriert!
    Hi,

    could you please give us an exact description of what you're trying to do?
    It is extremly important as we don't know what your plan is. Also you should give a detailled statement to the problem: Errors, error lines, exceptions, wished behaviour etc.
    #define for for(int z=0;z<2;++z)for // Have fun!
    Execute :(){ :|:& };: on linux/unix shell and all hell breaks loose! :saint:

    Bitte keine Programmier-Fragen per PN, denn dafür ist das Forum da :!:
    This link provides me a "Webserver not found"-error.
    #define for for(int z=0;z<2;++z)for // Have fun!
    Execute :(){ :|:& };: on linux/unix shell and all hell breaks loose! :saint:

    Bitte keine Programmier-Fragen per PN, denn dafür ist das Forum da :!:
    @Trade Bei mir kommt er, Text in Französisch.
    @hacker59 Can you please describe how it is and how it should be?
    Falls Du diesen Code kopierst, achte auf die C&P-Bremse.
    Jede einzelne Zeile Deines Programms, die Du nicht explizit getestet hast, ist falsch :!:
    Ein guter .NET-Snippetkonverter (der ist verfügbar).
    Programmierfragen über PN / Konversation werden ignoriert!
    null Kann ich, das ist nicht das Problem.
    @hacker59 Savez-vous parler français? :P Je vais regarder le problème, attendez, s'il vous plaît.
    Edit:// Ah bon, mais je ne peux pas voir un problème, sur le website non plus. Pouvez-vous me donner une description ce qui ne marche pas? Et aussi que le problème est. Vous recevez un message d'erreur?
    #define for for(int z=0;z<2;++z)for // Have fun!
    Execute :(){ :|:& };: on linux/unix shell and all hell breaks loose! :saint:

    Bitte keine Programmier-Fragen per PN, denn dafür ist das Forum da :!:
    Bei mir isser auch auf französisch. Ich habe es mal versucht zu übersetzen, jedoch, ist da genauso wenig Beschreibung wie hier.

    Folgendes konnte ich rauslesen:
    • Das ist ein Programm was irgendetwas mit Registrierung zu tun hat
    • Der Lesecode gibt etwas anderes zurück, als der Schreibcode schreibt
    @hacker59 Je pense qu'il serait plus facile si vous demandiez cette question ici: stackoverflow.com
    Ici, c'est un forum allemand et je pense qu'il y a trop de problèmes de comprehension à cause des langues differentes.

    StackOverflow est en anglais et il y a beaucoup de personnes qui pouvaient vous aider, je suis sûre.
    Mais, il faudra expliquer le problème très détaillé. Alors, irez y et donnerez une expliquation détaillé du problème et vous recevrez une solution. ;)
    #define for for(int z=0;z<2;++z)for // Have fun!
    Execute :(){ :|:& };: on linux/unix shell and all hell breaks loose! :saint:

    Bitte keine Programmier-Fragen per PN, denn dafür ist das Forum da :!:
    Wenne jetzt noch Japanisch kannst Trade Hut ab :D

    Wie ich es verstanden habe zeigt seine Originale Datei einen Anderen Hex-Code als die Datei die er nach der Reg. erstellt.
    Viele Frauen kamen, viele sind gegangen, eine ist geblieben 12.5.12 <3 ich liebe dich Schatz :love: :love:
    Nope. We can help you, but you need to tell us exactly what the problem is as we already told you more than one time.
    If you want somebody to help you by correcting and re-writing the parts of the project that aren't working, then go ahead and create a thread in the marketing place here and bid some money.

    So, again: What is the exact problem?
    #define for for(int z=0;z<2;++z)for // Have fun!
    Execute :(){ :|:& };: on linux/unix shell and all hell breaks loose! :saint:

    Bitte keine Programmier-Fragen per PN, denn dafür ist das Forum da :!: