Error Code Interface
Error handling in Programming is a fundamental aspect of programming that addresses the inevitable challenges associated with unexpected issues during code execution.
The Output Manager COM interface also returns Win32 error codes using the facility group value of FACILITY_WIN32 7. This facility group is used to provide a means of mapping an error code from a function in the Win32 API into an HRESULT.
The problem is that you are trying to define variables and methods on an interface, which is not allowed. Below I copied the explanation on classes and interfaces from Microsoft docs.
The following table provides a list of error codes used by COM-based APIs. COM Error Codes Generic Winerror.h
However, new failure codes can be written. Microsoft reserves the right to define new failure codes but not success codes for the interfaces described in FACILITY_ITF or in new facilities.
When I try to delete them, I get an error called Error 0x80004002 No Such Interface Supported. I have tried to delete them in safe mode, but the files still get the same error message.
In many cases fmt.Errorf is good enough, but since error is an interface, you can use arbitrary data structures as error values, to allow callers to inspect the details of the error.
Each stderror_code object holds an error code value originating from the operating system or some low-level interface and a pointer to an object of type stderror_category, which corresponds to the said interface. The error code values are not required to be unique across different error categories.
Errors Go programs express error state with error values. The error type is a built-in interface similar to fmt.Stringer type error interface Error string As with fmt.Stringer, the fmt package looks for the error interface when printing values.
Describes error codes 1300-1699 defined in the WinError.h header file and is intended for developers.