>>286
システムエラーコードとアプリケーションエラーコードがごっちゃに書いてあるのが混乱の元な気がしてきた

"In your application, you can define your own error codes in an enumeration, and return the appropriate error code based on the scenario"
canが弱く見えるのでは
「C#はヘッダファイルとかないから各自自分で定義するように!」くらいあると

そっから飛べる先に
https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
とかがあってさも定数があるかのように見えるのも混乱のもとかと

まあ"use a non-zero number to indicate an error"と書くなら最低ゼロくらいは定義しといてくれというのはわからんでもない