Search code examples
.netpinvoke

Is there an enumeration for system error codes in .Net framework?


I have a library function that returns GetLastError codes (things like these). I need to compare them with specific errors, like ERROR_INVALID_HANDLE. However I don't feel comfortable to define the constants myself. So the question is, is there a predefined enumeration for this purpose?


Solution

  • No, you'll have to make your own.