Before we jump in and start examining the many features that Microsoft Windows has to offer, you should understand how the various Windows functions perform their error handling.
When you call a Windows function, it validates the parameters that you pass to it and then attempts to perform its duty. If you pass an invalid parameter or if for some other reason the action cannot be performed, the function’s return value indicates that the function failed in some way. Table 1-1 shows the return value data types that most Windows functions use.
Table 1-1. Common Return Types for Windows Functions
Value to Indicate Failure
This function cannot ...