aboutsummaryrefslogtreecommitdiffstats
path: root/test/win32ole/available_ole.rb
blob: e697092032676a4b62059477f8047604360dea5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
begin
  require 'win32ole'
rescue LoadError
end

if defined?(WIN32OLE)
  module AvailableOLE
    module_function

    def sysmon_available?
      WIN32OLE_TYPE.new('System Monitor Control', 'SystemMonitor')
      true
    rescue
      false
    end
  end
end