Sha256: 53b1a0509a0efa3aa59b61e44ff167d5eb2b6845fc5c50603e9ec9dc50a6c970
Contents?: true
Size: 818 Bytes
Versions: 35
Compression:
Stored size: 818 Bytes
Contents
require 'windows_error/nt_status' module RubySMB module Field # Represents an NTStatus code as defined in # [2.3.1 NTSTATUS values](https://msdn.microsoft.com/en-us/library/cc704588.aspx) class NtStatus < BinData::Primitive endian :little uint32 :val def get val.to_i end def set(value) case value when WindowsError::ErrorCode set(value.value) when Integer self.val = value else self.val = value.to_i end val end # Returns a meaningful error code parsed from the numeric value # # @return [WindowsError::ErrorCode] the ErrorCode object for this code def to_nt_status WindowsError::NTStatus.find_by_retval(value).first end end end end
Version data entries
35 entries across 35 versions & 1 rubygems