Overview of wmi_proc.inc

Public Function Summary

Public functions are intended to be called by the code that imports this library.

Name Summary
wmi_proc_all
wmi_proc_path
wmi_proc_prop

Public Function Details

wmi_proc_all

Named Parameters

handle
procName

Code

function wmi_proc_all(handle, procName)
{
  if(!procName){
    query = "Select Caption from Win32_Process";
  }
  else {
    query = 'Select Caption from Win32_Process Where Name = ' +
             raw_string(0x22) + procName +raw_string(0x22);
  }

  procList = wmi_query(wmi_handle:handle, query:query);

  if(("NTSTATUS" >< procName) || !procList){
    return(0);
  }

  procList = ereg_replace(pattern:"\|[0-9a-zA-Z]+", string:procList, replace:"");
  return procList;
}

function wmi_proc_path(handle, procName)

		
top

wmi_proc_path

Named Parameters

handle
procName

Code

function wmi_proc_path(handle, procName)
{
  if(!procName){
    query = "Select ExecutablePath from Win32_Process";
  }
  else {
    query = 'Select ExecutablePath from Win32_Process Where Name = ' +
             raw_string(0x22) + procName + raw_string(0x22);
  }

  procList = wmi_query(wmi_handle:handle, query:query);

  if(("NTSTATUS" >< procList) || !procList){
    return(0);
  }

  procList = ereg_replace(pattern:"\|[0-9a-zA-Z]+", string:procList, replace:"");
  return procList;
}


		
top

wmi_proc_prop

Named Parameters

handle
procName

Code

function wmi_proc_prop(handle, procName)
{
  if(!procName){
    query = "Select * from Win32_Process";
  }
  else {
    query = 'Select * from Win32_Process Where Name = ' +
             raw_string(0x22) + procName + raw_string(0x22);
  }

  procList = wmi_query(wmi_handle:handle, query:query);

  if(("NTSTATUS" >< procList) || !procList){
    return(0);
  }

  return wmi_misc_split_res(List:procList);
}

function wmi_proc_all(handle, procName)

		
top