# File lib/net/ping/wmi.rb, line 59
      def ping(host = @host, options = {})
         super(host)

         lhost = Socket.gethostname

         cs = "winmgmts:{impersonationLevel=impersonate}!//#{lhost}/root/cimv2"
         wmi = WIN32OLE.connect(cs)

         query = "select * from win32_pingstatus where address = '#{host}'"

         unless options.empty?
            options.each{ |key, value|
               if value.is_a?(String)
                  query << " and #{key} = '#{value}'"
               else
                  query << " and #{key} = #{value}"
               end
            }
         end

         status = Struct::PingStatus.new

         wmi.execquery(query).each{ |obj|
            status.address                           = obj.Address
            status.buffer_size                       = obj.BufferSize
            status.no_fragmentation                  = obj.NoFragmentation
            status.primary_address_resolution_status = obj.PrimaryAddressResolutionStatus
            status.protocol_address                  = obj.ProtocolAddress
            status.protocol_address_resolved         = obj.ProtocolAddressResolved
            status.record_route                      = obj.RecordRoute 
            status.reply_inconsistency               = obj.ReplyInconsistency
            status.reply_size                        = obj.ReplySize
            status.resolve_address_names             = obj.ResolveAddressNames
            status.response_time                     = obj.ResponseTime
            status.response_time_to_live             = obj.ResponseTimeToLive
            status.route_record                      = obj.RouteRecord
            status.route_record_resolved             = obj.RouteRecordResolved
            status.source_route                      = obj.SourceRoute
            status.source_route_type                 = obj.SourceRouteType
            status.status_code                       = obj.StatusCode
            status.timeout                           = obj.Timeout
            status.timestamp_record                  = obj.TimeStampRecord
            status.timestamp_record_address          = obj.TimeStampRecordAddress
            status.timestamp_record_address_resolved = obj.TimeStampRecordAddressResolved
            status.timestamp_route                   = obj.TimeStampRoute
            status.time_to_live                      = obj.TimeToLive
            status.type_of_service                   = obj.TypeOfService
         }

         status.freeze # Read-only data
      end