vBasic (C# conver too) image CON extraction

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
User avatar
Rogue_Modder





Posts: 284
Joined: Sat Mar 29, 2008 5:46 am
Location: London
Contact:

vBasic (C# conver too) image CON extraction

Post by Rogue_Modder »

Hi, i have the offset and length of the CON image, i need to have a picture box on my form to show the image. how would i do this?

My current code is this:

Code: Select all

Imports System
Imports System.IO
Imports DevComponents.DotNetBar
Imports DevComponents.DotNetBar.Office2007RibbonForm
Imports System.Text


Public Class Form1
    Inherits DevComponents.DotNetBar.Office2007RibbonForm

#Region "Hexing info"
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ofd As New OpenFileDialog()
        If ofd.ShowDialog() = DialogResult.OK Then


            Dim fs As New FileStream(ofd.FileName, FileMode.Open)
            Dim br As New BinaryReader(fs)
            Dim length As Long = fs.Length


            br.BaseStream.Position = &H412
            Dim Name As Byte() = br.ReadBytes(57)
            TextBoxX1.Text = UnicodeEncoding.Unicode.GetString(Name)

            br.BaseStream.Position = &H1692
            Dim game As Byte() = br.ReadBytes(12)
            TextBoxX2.Text = UnicodeEncoding.Unicode.GetString(game)

            br.BaseStream.Position = &H171A
            Dim Bio As Byte() = br.ReadBytes(530)
            PictureBox1.Image = 'I want to inject the image here, is this the right place? and what is the code?

            'br.BaseStream.Position = &H"#"
            'Dim Location As Byte() = br.ReadBytes("#")
            'TextBoxX4.Text = BitConverter.ToString(Location)
        End If
    End Sub
#End Region
End Class
Image
{Rules}{Search}{Signature}
"Modding for xbox 1 is over, And modding for the 360 never began, So modding in general doesn't even exist"
Post Reply