Module: WindowsError::HResult::Facility

Defined in:
lib/windows_error/h_result/facility.rb

Overview

This module provides the namespace for all of the HRESULT Facility Codes. See [HRESULT](learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a) for more details on this particular set of error codes.

Defined Under Namespace

Classes: FacilityCode

Constant Summary collapse

FACILITY_NULL =

(0x0000) The default facility code.

FacilityCode.new('FACILITY_NULL', 0x0000, 'The default facility code.')
FACILITY_RPC =

(0x0001) The source of the error code is an RPC subsystem.

FacilityCode.new('FACILITY_RPC', 0x0001, 'The source of the error code is an RPC subsystem.')
FACILITY_DISPATCH =

(0x0002) The source of the error code is a COM Dispatch.

FacilityCode.new('FACILITY_DISPATCH', 0x0002, 'The source of the error code is a COM Dispatch.')
FACILITY_STORAGE =

(0x0003) The source of the error code is OLE Storage.

FacilityCode.new('FACILITY_STORAGE', 0x0003, 'The source of the error code is OLE Storage.')
FACILITY_ITF =

(0x0004) The source of the error code is COM/OLE Interface management.

FacilityCode.new('FACILITY_ITF', 0x0004, 'The source of the error code is COM/OLE Interface management.')
FACILITY_WIN32 =

(0x0007) This region is reserved to map undecorated error codes into HRESULTs.

FacilityCode.new('FACILITY_WIN32', 0x0007, 'This region is reserved to map undecorated error codes into HRESULTs.')
FACILITY_WINDOWS =

(0x0008) The source of the error code is the Windows subsystem.

FacilityCode.new('FACILITY_WINDOWS', 0x0008, 'The source of the error code is the Windows subsystem.')
FACILITY_SECURITY =

(0x0009) The source of the error code is the Security API layer.

FacilityCode.new('FACILITY_SECURITY', 0x0009, 'The source of the error code is the Security API layer.')
FACILITY_SSPI =

(0x0009) The source of the error code is the Security API layer.

FacilityCode.new('FACILITY_SSPI', 0x0009, 'The source of the error code is the Security API layer.')
FACILITY_CONTROL =

(0x000a) The source of the error code is the control mechanism.

FacilityCode.new('FACILITY_CONTROL', 0x000a, 'The source of the error code is the control mechanism.')
FACILITY_CERT =

(0x000b) The source of the error code is a certificate client or server?

FacilityCode.new('FACILITY_CERT', 0x000b, 'The source of the error code is a certificate client or server?')
FACILITY_INTERNET =

(0x000c) The source of the error code is Wininet related.

FacilityCode.new('FACILITY_INTERNET', 0x000c, 'The source of the error code is Wininet related.')
FACILITY_MEDIASERVER =

(0x000d) The source of the error code is the Windows Media Server.

FacilityCode.new('FACILITY_MEDIASERVER', 0x000d, 'The source of the error code is the Windows Media Server.')
FACILITY_MSMQ =

(0x000e) The source of the error code is the Microsoft Message Queue.

FacilityCode.new('FACILITY_MSMQ', 0x000e, 'The source of the error code is the Microsoft Message Queue.')
FACILITY_SETUPAPI =

(0x000f) The source of the error code is the Setup API.

FacilityCode.new('FACILITY_SETUPAPI', 0x000f, 'The source of the error code is the Setup API.')
FACILITY_SCARD =

(0x0010) The source of the error code is the Smart-card subsystem.

FacilityCode.new('FACILITY_SCARD', 0x0010, 'The source of the error code is the Smart-card subsystem.')
FACILITY_COMPLUS =

(0x0011) The source of the error code is COM+.

FacilityCode.new('FACILITY_COMPLUS', 0x0011, 'The source of the error code is COM+.')
FACILITY_AAF =

(0x0012) The source of the error code is the Microsoft agent.

FacilityCode.new('FACILITY_AAF', 0x0012, 'The source of the error code is the Microsoft agent.')
FACILITY_URT =

(0x0013) The source of the error code is .NET CLR.

FacilityCode.new('FACILITY_URT', 0x0013, 'The source of the error code is .NET CLR.')
FACILITY_ACS =

(0x0014) The source of the error code is the audit collection service.

FacilityCode.new('FACILITY_ACS', 0x0014, 'The source of the error code is the audit collection service.')
FACILITY_DPLAY =

(0x0015) The source of the error code is Direct Play.

FacilityCode.new('FACILITY_DPLAY', 0x0015, 'The source of the error code is Direct Play.')
FACILITY_UMI =

(0x0016) The source of the error code is the ubiquitous memoryintrospection service.

FacilityCode.new('FACILITY_UMI', 0x0016, 'The source of the error code is the ubiquitous memoryintrospection service.')
FACILITY_SXS =

(0x0017) The source of the error code is Side-by-side servicing.

FacilityCode.new('FACILITY_SXS', 0x0017, 'The source of the error code is Side-by-side servicing.')
FACILITY_WINDOWS_CE =

(0x0018) The error code is specific to Windows CE.

FacilityCode.new('FACILITY_WINDOWS_CE', 0x0018, 'The error code is specific to Windows CE.')
FACILITY_HTTP =

(0x0019) The source of the error code is HTTP support.

FacilityCode.new('FACILITY_HTTP', 0x0019, 'The source of the error code is HTTP support.')
FACILITY_USERMODE_COMMONLOG =

(0x001a) The source of the error code is common Logging support.

FacilityCode.new('FACILITY_USERMODE_COMMONLOG', 0x001a, 'The source of the error code is common Logging support.')
FACILITY_USERMODE_FILTER_MANAGER =

(0x001f) The source of the error code is the user mode filter manager.

FacilityCode.new('FACILITY_USERMODE_FILTER_MANAGER', 0x001f, 'The source of the error code is the user mode filter manager.')
FACILITY_BACKGROUNDCOPY =

(0x0020) The source of the error code is background copy control

FacilityCode.new('FACILITY_BACKGROUNDCOPY', 0x0020, 'The source of the error code is background copy control')
FACILITY_CONFIGURATION =

(0x0021) The source of the error code is configuration services.

FacilityCode.new('FACILITY_CONFIGURATION', 0x0021, 'The source of the error code is configuration services.')
FACILITY_STATE_MANAGEMENT =

(0x0022) The source of the error code is state management services.

FacilityCode.new('FACILITY_STATE_MANAGEMENT', 0x0022, 'The source of the error code is state management services.')
FACILITY_METADIRECTORY =

(0x0023) The source of the error code is the Microsoft Identity Server.

FacilityCode.new('FACILITY_METADIRECTORY', 0x0023, 'The source of the error code is the Microsoft Identity Server.')
FACILITY_WINDOWSUPDATE =

(0x0024) The source of the error code is a Windows update.

FacilityCode.new('FACILITY_WINDOWSUPDATE', 0x0024, 'The source of the error code is a Windows update.')
FACILITY_DIRECTORYSERVICE =

(0x0025) The source of the error code is Active Directory.

FacilityCode.new('FACILITY_DIRECTORYSERVICE', 0x0025, 'The source of the error code is Active Directory.')
FACILITY_GRAPHICS =

(0x0026) The source of the error code is the graphics drivers.

FacilityCode.new('FACILITY_GRAPHICS', 0x0026, 'The source of the error code is the graphics drivers.')
FACILITY_SHELL =

(0x0027) The source of the error code is the user Shell.

FacilityCode.new('FACILITY_SHELL', 0x0027, 'The source of the error code is the user Shell.')
FACILITY_TPM_SERVICES =

(0x0028) The source of the error code is the Trusted Platform Module services.

FacilityCode.new('FACILITY_TPM_SERVICES', 0x0028, 'The source of the error code is the Trusted Platform Module services.')
FACILITY_TPM_SOFTWARE =

(0x0029) The source of the error code is the Trusted Platform Module applications.

FacilityCode.new('FACILITY_TPM_SOFTWARE', 0x0029, 'The source of the error code is the Trusted Platform Module applications.')
FACILITY_PLA =

(0x0030) The source of the error code is Performance Logs and Alerts

FacilityCode.new('FACILITY_PLA', 0x0030, 'The source of the error code is Performance Logs and Alerts')
FACILITY_FVE =

(0x0031) The source of the error code is Full volume encryption.

FacilityCode.new('FACILITY_FVE', 0x0031, 'The source of the error code is Full volume encryption.')
FACILITY_FWP =

(0x0032) The source of the error code is the Firewall Platform.

FacilityCode.new('FACILITY_FWP', 0x0032, 'The source of the error code is the Firewall Platform.')
FACILITY_WINRM =

(0x0033) The source of the error code is the Windows Resource Manager.

FacilityCode.new('FACILITY_WINRM', 0x0033, 'The source of the error code is the Windows Resource Manager.')
FACILITY_NDIS =

(0x00000034) The source of the error code is the Network Driver Interface.

FacilityCode.new('FACILITY_NDIS', 0x00000034, 'The source of the error code is the Network Driver Interface.')
FACILITY_USERMODE_HYPERVISOR =

(0x00000035) The source of the error code is the Usermode Hypervisor components.

FacilityCode.new('FACILITY_USERMODE_HYPERVISOR', 0x00000035, 'The source of the error code is the Usermode Hypervisor components.')
FACILITY_CMI =

(0x00000036) The source of the error code is the Configuration Management Infrastructure.

FacilityCode.new('FACILITY_CMI', 0x00000036, 'The source of the error code is the Configuration Management Infrastructure.')
FACILITY_USERMODE_VIRTUALIZATION =

(0x00000037) The source of the error code is the user mode virtualization subsystem.

FacilityCode.new('FACILITY_USERMODE_VIRTUALIZATION', 0x00000037, 'The source of the error code is the user mode virtualization subsystem.')
FACILITY_USERMODE_VOLMGR =

(0x00000038) The source of the error code is  the user mode volume manager

FacilityCode.new('FACILITY_USERMODE_VOLMGR', 0x00000038, 'The source of the error code is  the user mode volume manager')
FACILITY_BCD =

(0x00000039) The source of the error code is the Boot Configuration Database.

FacilityCode.new('FACILITY_BCD', 0x00000039, 'The source of the error code is the Boot Configuration Database.')
FACILITY_USERMODE_VHD =

(0x0000003a) The source of the error code is user mode virtual hard disk support.

FacilityCode.new('FACILITY_USERMODE_VHD', 0x0000003a, 'The source of the error code is user mode virtual hard disk support.')
FACILITY_SDIAG =

(0x0000003c) The source of the error code is System Diagnostics.

FacilityCode.new('FACILITY_SDIAG', 0x0000003c, 'The source of the error code is System Diagnostics.')
FACILITY_WEBSERVICES =

(0x0000003d) The source of the error code is the Web Services.

FacilityCode.new('FACILITY_WEBSERVICES', 0x0000003d, 'The source of the error code is the Web Services.')
FACILITY_WINDOWS_DEFENDER =

(0x00000050) The source of the error code is a Windows Defender component.

FacilityCode.new('FACILITY_WINDOWS_DEFENDER', 0x00000050, 'The source of the error code is a Windows Defender component.')
FACILITY_OPC =

(0x00000051) The source of the error code is the open connectivity service.

FacilityCode.new('FACILITY_OPC', 0x00000051, 'The source of the error code is the open connectivity service.')

Class Method Summary collapse

Class Method Details

.find_by_code(retval) ⇒ WindowsError::HResult::FacilityCode, Nil

Return the WindowsError::HResult::FacilityCode object that matches the value supplied.

Parameters:

  • retval (Integer)

    the return value you want the facility code for

Returns:

  • (WindowsError::HResult::FacilityCode, Nil)

    the FacilityCode that matched

Raises:

  • (ArgumentError)

    if something other than a Integer is supplied



34
35
36
37
38
39
40
41
42
43
# File 'lib/windows_error/h_result/facility.rb', line 34

def self.find_by_code(retval)
  raise ArgumentError, "Invalid value!" unless retval.kind_of? Integer

  self.constants.sort.each do |constant_name|
    facility_code = self.const_get(constant_name)
    if facility_code.value == retval
      return facility_code
    end
  end
end