I need to get some information about current Window Processes
We used to call VBScript to get that. After we migrate app to 64-bit it is impossible to call VBScript using MSScriptControl.ScriptControl ActiveX.
We are searching for alternatives. Luckly WbemScripting.SWbemLocator ActiveX is available on 64-bit and we partially can get it to work:
int li_cnt, ret, i
ls_query ="Select ProcessID from Win32_process where name = '" + as_app + "'"
locator = CREATE OleObject
ret = locator.ConnectToNewObject("WbemScripting.SWbemLocator");
service = locator.ConnectServer();
props = service.ExecQuery(ls_query);
li_cnt = props.count();
So far so good. Now we need to iterate through props for details. In VBScript it'd look like
For Each prop In props ... Next
Could someone advise how to iterate through that collection with PowerBuilder?