Hello guys, I'm having troubles following a code example I found at:
http://www.purebasic.fr/english/viewtopic.php?t=8086
So the thing is that as you can see in the picture, it seems that the returned names are not correctly displayed in the ascii format... maybe non-utf?
I don't know, so I was hoping that I could get some help, this is the procedure that I need, but that's the only caveat, the names...
[Windows] How to list Running Processes/Problem with Func
Re: [Windows] How to list Running Processes/Problem with Fun
Hi NOP = 0x90
Welcome to PB Forum
Welcome to PB Forum
Code: Select all
Macro DebugStringType(pStr)
CompilerIf #PB_Compiler_Unicode
Debug PeekS(pStr)
CompilerElse
Debug PeekS(pStr,-1,#PB_Ascii)
CompilerEndIf
EndMacro
snap = CreateToolhelp32Snapshot_(#TH32CS_SNAPPROCESS, 0)
If snap
Proc32.PROCESSENTRY32\dwSize = SizeOf(PROCESSENTRY32)
If Process32First_(snap, @Proc32)
DebugStringType(@Proc32\szExeFile)
While Process32Next_(snap, @Proc32)
DebugStringType(@Proc32\szExeFile)
Wend
EndIf
CloseHandle_ (snap)
EndIf
interested in Cybersecurity..
Re: [Windows] How to list Running Processes/Problem with Fun
Very good code, CELTIC88. Intelligent and simple. Just what the doctor ordered.
Thank you.
I'm trying to write code to close a bunch of windowed apps I open as small separate processes.
Some other code offered on the forum shows how, but its process listing fails to list names that include spaces.
Yours does this perfectly.
Now if I could just combine those two, i'd be a happy camper again.
Thank you.
I'm trying to write code to close a bunch of windowed apps I open as small separate processes.
Some other code offered on the forum shows how, but its process listing fails to list names that include spaces.
Yours does this perfectly.
Now if I could just combine those two, i'd be a happy camper again.
"That's not a bug..." said the programmer. "it's a feature! "
"Oh! I see..." replied the blind man.
"Oh! I see..." replied the blind man.