# File lib/chef/win32/process.rb, line 51 def self.get_current_process Process.new(Handle.new(GetCurrentProcess())) end
# File lib/chef/win32/process.rb, line 55 def self.get_process_handle_count(handle) handle_count = FFI::MemoryPointer.new :uint32 unless GetProcessHandleCount(handle.handle, handle_count) Chef::ReservedNames::Win32::Error.raise! end handle_count.read_uint32 end
# File lib/chef/win32/process.rb, line 63 def self.get_process_id(handle) # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights result = GetProcessId(handle.handle) if result == 0 Chef::ReservedNames::Win32::Error.raise! end result end
Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights, AND the PROCESS_VM_READ right
# File lib/chef/win32/process.rb, line 74 def self.get_process_memory_info(handle) memory_info = PROCESS_MEMORY_COUNTERS.new unless GetProcessMemoryInfo(handle.handle, memory_info, memory_info.size) Chef::ReservedNames::Win32::Error.raise! end memory_info end
Generated with the Darkfish Rdoc Generator 2.