Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 10 Monaten, 3 Wochen
Letzter Beitrag:
vor 10 Monaten, 2 Wochen
Beteiligte Autoren:
Bob Roos, Arie, Fabrice Harari

Update ASCIIZ string given its address

Startbeitrag von Bob Roos am 07.07.2017 20: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.


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


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

von Fabrice Harari - am 07.07.2017 20:13
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.


von Bob Roos - am 07.07.2017 20:47
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")

von Arie - am 09.07.2017 09:32
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.