Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Processing processes
#6
For records and fellows interested

Function ProcessusEnfants
Code:
Copy      Help
function ARRAY(str)&a str'&b
str name
int pidParent=ProcessNameToId(b)

__Handle hs=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS 0)
PROCESSENTRY32 p.dwSize=sizeof(p)
Process32First(hs &p)
rep
,if p.th32ParentProcessID=pidParent
,,
,,name=F"{&p.szExeFile%%s}"
,,a[]=name
,if(!Process32Next(hs &p)) break

called by this


Macro Macro12
Code:
Copy      Help
str g="listary"
ARRAY(str) t
ProcessusEnfants(&t &g)


Maybe a native function in next QM version....


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)