SolvedFallout 4 WriteProcess

Posts 1–4 of 4 · Page 1 of 1
Fallout 4 WriteProcess
I dont see where i have gone wrong any help would be great

I get no errors just wont write to the process

Here is my current code

Code:
Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub
    Public Sub offsets()
        Dim ammo As String

        ammo = My.Settings.Ammo
    End Sub

    Public Sub ammostart()
    End Sub

    Function GetModuleHandle(ByVal Processx As String, ByVal modulex As String) As IntPtr
        Dim prs As Process() = Process.GetProcessesByName(Processx)
        If prs.Length > 0 Then
            On Error Resume Next
            Dim pi As ProcessModuleCollection = prs(0).Modules
            For Each pmod As ProcessModule In pi
                If pmod.ModuleName = (modulex) Then
                    Return pmod.BaseAddress
                Else
                End If
            Next
        End If
    End Function


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Try
            WriteDMAInteger("Fallout4", &H3766838, {&H2E0, 8, 288, 20, 18}, TextBox1.Text, 5)
        Catch
        End Try
    End Sub
End Class
Please post your WriteDMAInteger function code.

And are you sure you have a proper address and offsets?



EDIT: You are using try/catch without exception handling. Try to remove the try/catch block and you will get the error.


Quote Originally Posted by SentryMBA View Post
I
Code:
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Try
            WriteDMAInteger("Fallout4", &H3766838, {&H2E0, 8, 288, 20, 18}, TextBox1.Text, 5)
        Catch
        End Try
    End Sub


You are directly declaring the Base Offset without adding the Game Base Address.
Also, your need to add &H before your offsets.

WriteDMAInteger("Fallout4", &H3766838, {&H2E0, 8, 288, 20, 18}, TextBox1.Text, 5)
should be
WriteDMAInteger("Fallout4", GAME_B_ADDRESS + &H3766838, {&H2E0, &H8, &H288, &H20, &H18}, TextBox1.Text, 5)

I think you could use your GetModuleHandle function to retrieve the base address. But without your memory class, I don't know.

A way to see if your offsets are correct, is to MessageBox.Show(CSTR(ReadDMAInteger(...))) to see if your offsets point to the correct value.
It's been more than a week and OP has not responded.
Assuming solved and also answers seems to be provided above.
If you're back and have not solved it, feel free to let me know to re-open this thread, or make a new one.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us