News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Was tlhelp32.inc/lib excluded from Windows 10?

Started by xandaz, January 11, 2021, 05:13:59 AM

Previous topic - Next topic

xandaz

    I was going to work on a simple program that i made a few years ago that envolved Process32First, etc and noticed that both the lib as the include tlhelp32 weren't available. Is there another way to Enum processes or im looking into the wrong library and include files? Thanks

Vortex

Hello,

EnumProcesses function (psapi.h) :

https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumprocesses

EnumProcessModules function (psapi.h) :

https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumprocessmodules

Process32First function (tlhelp32.h) :

https://docs.microsoft.com/en-us/windows/win32/api/tlhelp32/nf-tlhelp32-process32first

xandaz

   Thanks. the Process32FirstW is include in kernel32.inc/lib. There's nomore the tlhelp library and header. Thanks

jj2007

include \masm32\MasmBasic\MasmBasic.inc
Init
Print "ct", Tb$, "ID", Tb$, "path"
For_ ecx=0 To GetProcessArray(?)-1
Print Str$("\n%i\t", ecx), Str$(MbProcID(ecx)), Tb$, MbProc$(ecx)
Next
Inkey CrLf$, "--- hit any key ---"
EndOfCode

ct      ID      path
0       2288    C:\Windows\System32\taskhost.exe
1       2444    C:\Windows\System32\dwm.exe
2       2476    C:\Windows\explorer.exe
...
37      6028    C:\Windows\System32\conhost.exe
--- hit any key ---