A
A
armadillo-cld2020-09-09 17:29:23
assembler
armadillo-cld, 2020-09-09 17:29:23

How to get a list of processes on FASM?


I know how to get it on WinApi , but I have been struggling with the declaration of the pe32 (PROCESSENTRY32) variable for a very long time And one more thing: I write with manual import of functions from libraries:

section '.idata' import readable writable
  library kernel, 'KERNEL32.DLL'
  import kernel,\
             CreateToolhelp32Snapshot, 'CreateToolhelp32Snapshot'
             ; И т.п

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
armadillo-cld, 2020-09-09
@armadillo-cld

Actually, we take and announce.
Something I'm dumb.
Here is the solution:

...
struct PROCESSENTRY32
dwSize dd ?
cntUsage dd ?
th32ProcessID dd ?
th32DefaultHeapID dd ?
th32ModuleID dd ?
cntThreads dd ?
th32ParentProcessID dd ?
pcPriClassBase dd ?
dwFlags dd ?
szExeFile rb 1024
ends
...
; IN section '.data'
pe32 PROCESSENTRY32 ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question