Hi,
i have a little problem, i am doing a application that takes the username stored as string array in process memory and i have a little problem. This string array contains Environment.Username (windows username) and i can change it, but its also containing few other things but i cant change them.
Well doing it like this:
works, but doing it like this:
(even if Environment.Username is "silentus")
Does completely nothing, when showing the string in a label/msgbox its still the same, with original username.
Why it happens and how can i fix it ? Same happens when i try to do:
This is how iam getting the value from memory:
i have a little problem, i am doing a application that takes the username stored as string array in process memory and i have a little problem. This string array contains Environment.Username (windows username) and i can change it, but its also containing few other things but i cant change them.
Well doing it like this:
Code:
If string.Contains(Environment.Username) Then
string = string.Replace(Environment.Username, "MyText")
End If(even if Environment.Username is "silentus")
Code:
string = string.Replace("silentus", "MyText")Why it happens and how can i fix it ? Same happens when i try to do:
Code:
string = string + "MyText"Code:
Dim byteValue As Byte() = ReadMemory(&HAddy, 150) 'Process name is set in the module, not here
Dim strValue As String = System.Text.ASCIIEncoding.ASCII.GetString(byteValue, 0, byteValue.Length - 1)
System.Text.RegularExpressions.Regex.Replace(strValue, "[^\w\s\p{P}]", "")
Dim final As String = strValue