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
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
Thanks in advance > i hope someone can help me
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
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