--- In [email protected], "brucexs" <bruc...@...> wrote:
>
> Thanks, I'll publish a new version of pwrpro49.zip in the next week or so.

Hi Bruce,

Oops. got another problem.  Either yours or mine, not sure which.

using the com.dll in comPlugin0.73_100426RefCounting.zip in
http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/

and comPluginDemoScriptWMIprocessRAMusageQuitProb.powerpro in same folder,if I 
quit inside a for each....endfor loop, handle count goes up by one every time I 
run the script, so a handle isn't getting released every time quit's hit

local sWMIservice = ?"winmgmts:{impersonationLevel=Impersonate}!\\" ++ 
strComputer ++ ?"\root\cimv2"
local objWMIService = com.get_object(sWMIservice)

local colProcessMem = com.method(objWMIService, "ExecQuery", ;;+
  "SELECT name, processid, workingsetsize from Win32_Process where name=\x22" 
++ sProcessName ++ "\x22")

win.debug(colProcessMem)
  
local processinfo, nWorkingSetSize
for each processinfo in colProcessMem
  win.debug(processinfo)
 nWorkingSetSize = (processinfo.WorkingSetSize / 1024)
; break  ;; all okay if break instead of quitting
  quit   ;; results in one unrleased handle per run of script
endfor

I put trace code in, haven't tested yet, will do.




Reply via email to