Error codes are unsigned 32-bit values which are private to each
server. You should call the GetLastError method
immediately when a method's return value indicates that an error has
occurred. That is because some methods clear the last error code when
they succeed.
It is important to note that the error codes returned by this
method are different than the command result codes that are defined
in RFC 2616, the standard protocol specification for HTTP. This method
is used to determine reason that an API function has failed, and
should not be used to determine if a command issued by the client was
successful. The SendResponse method is used to send
responses to the client, and the GetCommandResult method
can be used to determine the result of the last command sent by the
client.
Most methods will set the last error code value when they fail;
a few methods set it when they succeed. Failure is
typically indicated by a return value such as FALSE, NULL,
INVALID_SERVER or HTTP_ERROR. Those methods which clear the last
error code when they succeed are noted on their reference page.