Raise positive VB style error codes via COM interop from C#
问题 I have a base library created in VB6 that exposes a standard COM interface that is used in a number of applications. This also exposed a number of error code constants, used with Err.Raise to indicate certain conditions. Public Enum IOErrors IOErrorBase = 45000 IOErrorConnectionFailed IOErrorAuthFailed IOErrorNotConnected IOErrorInvalidPortDirection IOErrorGettingValue IOErrorNoValueYet End Enum Come on 10 years and we're creating C# objects implementing the same set of interfaces and want to