Class: Win32::ProcessInfo
- Inherits:
-
Object
- Object
- Win32::ProcessInfo
- Defined in:
- lib/Win32/Process.rb
Overview
This class contains the process info created by Win32::Process
Instance Attribute Summary collapse
-
#hProcess ⇒ Object
—————————————————————————————– attributesFor: “process handles”.
-
#hThread ⇒ Object
—————————————————————————————– attributesFor: “process handles”.
-
#pid ⇒ Object
—————————————————————————————– attributesFor: “process handles”.
-
#tid ⇒ Object
—————————————————————————————– attributesFor: “process handles”.
Class Method Summary collapse
-
.sizeof ⇒ Object
—————————————————————————————– class methodsFor: “Data sizing”.
-
.unpack(p_pData) ⇒ Object
—————————————————————————————– class methodsFor: “unpacking data”.
Instance Method Summary collapse
-
#initialize(p_hProcess = nil, p_hThread = nil, p_pid = nil, p_tid = nil) ⇒ ProcessInfo
constructor
—————————————————————————————– class methodsFor: “initialization”.
-
#pack ⇒ Object
—————————————————————————————– methodsFor: “packing data”.
-
#to_s ⇒ Object
—————————————————————————————– methodsFor: “printing”.
Constructor Details
#initialize(p_hProcess = nil, p_hThread = nil, p_pid = nil, p_tid = nil) ⇒ ProcessInfo
class methodsFor: “initialization”
31 32 33 34 35 36 |
# File 'lib/Win32/Process.rb', line 31 def initialize(p_hProcess = nil, p_hThread = nil, p_pid = nil, p_tid = nil) @hProcess = p_hProcess @hThread = p_hThread @pid = p_pid @tid = p_tid end |
Instance Attribute Details
#hProcess ⇒ Object
attributesFor: “process handles”
20 21 22 |
# File 'lib/Win32/Process.rb', line 20 def hProcess @hProcess end |
#hThread ⇒ Object
attributesFor: “process handles”
20 21 22 |
# File 'lib/Win32/Process.rb', line 20 def hThread @hThread end |
#pid ⇒ Object
attributesFor: “process handles”
20 21 22 |
# File 'lib/Win32/Process.rb', line 20 def pid @pid end |
#tid ⇒ Object
attributesFor: “process handles”
20 21 22 |
# File 'lib/Win32/Process.rb', line 20 def tid @tid end |
Class Method Details
.sizeof ⇒ Object
class methodsFor: “Data sizing”
25 26 27 |
# File 'lib/Win32/Process.rb', line 25 def ProcessInfo.sizeof return 16 # 4 longs end |
.unpack(p_pData) ⇒ Object
class methodsFor: “unpacking data”
40 41 42 43 |
# File 'lib/Win32/Process.rb', line 40 def ProcessInfo.unpack(p_pData) pData = p_pData.unpack("L4") return ProcessInfo.new(pData[0], pData[1], pData[2], pData[3]) end |
Instance Method Details
#pack ⇒ Object
methodsFor: “packing data”
47 48 49 |
# File 'lib/Win32/Process.rb', line 47 def pack return [@hProcess, @hThread, @pid, @tid].pack("L*") end |
#to_s ⇒ Object
methodsFor: “printing”
53 54 55 |
# File 'lib/Win32/Process.rb', line 53 def to_s return "hProcess: #{@hProcess}, hThread: #{@hThread}, pid: #{@pid}, thread id: #{@tid}" end |