QuestionAnother help request

Posts 1–2 of 2 · Page 1 of 1
Another help request
Hi again everone

i need help in this code i wrote it to get float value it is working good i can read float value converted to string

but i need to reverse this code so i can write as float

Code:
 Public Function Read_Float(ByVal process_handle As Int32, ByVal FloatAddress As Int32, Optional ByVal CharsToRead As Integer = 16) As String

        Dim ReturnValue As String
        Dim StringBuffer() As Byte

        ReDim StringBuffer(CharsToRead - 1)

        RPM(process_handle, FloatAddress, StringBuffer(0), StringBuffer.Length, Nothing)

        ReturnValue = BitConverter.ToSingle(StringBuffer, 0)

        CloseHandle(process_handle)
        Return ReturnValue
    End Function
i tried this code it is writing but not float it is writing as long

how to make reverse code of the above so i can write a string then converted to float

Code:
    Public Function Write_Float(ByVal process_handle As Int32, ByVal FloatAddress As Int32, ByVal ReturnValue As String, Optional ByVal CharsToRead As Integer = 16)

        Dim StringBuffer() As Byte

        ReDim StringBuffer(CharsToRead - 1)

        WPM(process_handle, FloatAddress, StringBuffer(0), StringBuffer.Length, Nothing)

        ReturnValue = BitConverter.ToSingle(StringBuffer, 0)

        CloseHandle(process_handle)

    End Function
Thanks in advance > i hope someone can help me
There is literally a problem with every line of code. Literally. Where should we start? Naming convention or the re-dims, or the data size thing, checking if wpm succeeded or ? idk...

Do you know the sizes of each core data type? Do you know what Function over-loading is? Arrays? API's, anything about virtual memory? etc etc? -Your 2nd function uses a passed-in parameter to return data, but doesn't actually have a Return statement. Huh?

-You need to start learing the vb langauge before you try 'Hacking memory' - it's a complicated subject and you apparently don't know vb well enough to structure the code correctly. Do the basic InputBox("what is your name/age") etc etc type code until you understand the data-type thing a little better?
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?