There is more variation in how you may identify a Windows error code, but they are ultimately numerical values starting from 1, and (as far as I’m aware) are consistent across versions of Windows. Newer versions of Windows may include error codes that don’t exist in previous versions, but the same error code should have the same meaning across versions.
The prefixes 0x and &H are some ways to indicate the value is in hex, and these prefixes can be discarded. You can also discard all but the last 4 characters (in these examples 0005, 0002 and 0035) and convert them from hex to decimal (in these examples giving 5, 2 and 53 respectively).
- Convert it to hex, giving 80070005
- Discard all but the last 4 characters, giving 0005
- Convert it back to decimal, giving 5
- Run NET HELPMSG 5, and find that I’ve got another ‘Access is denied’ message