The first two bits indicate severity, the next bit identifies if it was OS generated or not, then there's an indicator to see if it can be turned into a HRESULT or not, then a bunch of bits indicating the source of the error, and lastly the error code relevant given the previously set bits.
The Windows status codes could be converted, but the status codes generated by other drivers can't be. Even then the conversion would be far from free, you'd need to keep a close eye on your optimisations with every compiler version to keep them free.
That also ignores the possibility programs have to classify their own status codes, so you'd need some kind of "unconvertible" object to indicate that you can't reliably parse the faculty ID, and that you have to treat it like a simple integer.
The first two bits indicate severity, the next bit identifies if it was OS generated or not, then there's an indicator to see if it can be turned into a HRESULT or not, then a bunch of bits indicating the source of the error, and lastly the error code relevant given the previously set bits.
The Windows status codes could be converted, but the status codes generated by other drivers can't be. Even then the conversion would be far from free, you'd need to keep a close eye on your optimisations with every compiler version to keep them free.
That also ignores the possibility programs have to classify their own status codes, so you'd need some kind of "unconvertible" object to indicate that you can't reliably parse the faculty ID, and that you have to treat it like a simple integer.