PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Update ASCIIZ string given its address
Update ASCIIZ string given its address
Iniciado por guest, 07,jul. 2017 22:02 - 3 respuestas
Publicado el 07,julio 2017 - 22:02
I am trying to find something that is the opposite of StringRetrieve. I have the address of an ASCIIZ string and would like to replace the value in that string, but I cannot figure out how.

OR

Some way to collect the titles of all the windows in the system using ENUMWINDOWS API. I found an example in French that uses a file to collect all the names and I would prefer to not use a file if possible.

Thanks, Bob Roos
Publicado el 07,julio 2017 - 22:13
Hi Bob

the regular way would be MyVarAscciZ=NewValue
otherwise, you can use the "Transfer" function, but be careful with the size, as there is no control and you can easily crash the memory.

Best regards
Publicado el 07,julio 2017 - 22:47
Thank you very much. That is exactly waht I was looking for.

I just put the 1st 5 chars as the size of the string and make sure I don't write more than that.

Bob
Publicado el 09,julio 2017 - 11:32
Hi Bob, try this

first include system.dll as .NET assembly into your project. Can be done in the project explorer using a right-click on the .NET Assemblies line. If you are new to .NET, is will not affect your current code what so ever.

pr is System.Diagnostics.Process
p is array of System.Diagnostics.Process
p = System.Diagnostics.Process.GetProcessesByName("WinWord")
FOR EACH pr OF p
Trace(pr.MainWindowTitle,pr.MainWindowHandle)
END