c# - How do I look up the proper Windows System Error Code to use in my application? -
i writing c# .net 2.0 application wherein when message expected received via serialport
. if frame not received (i.e. times out) or determined invalid, need set error code using setlasterror
. windows has plethora of error codes. there simple tool or reference narrow down proper error code use?
additional info
while throwing exception , handling higher stack preference, not option in case because application updating not designed take advantage of such useful feature.
in "good old days" (c , c++), list of possible windows errors defined in winerror.h
update: link below dead. not sure if file still available download, windows system error code definitions can found @ link.
this file can found on microsoft's site (although surprises me little dated far 2003 - might worth hunting more recent version).
but if you're getting (or wanting set) win32 error codes, this'll definition found.
Comments
Post a Comment