Sets last chsvlib error code together with win32 error code and C error code. The last two codes are set to ERROR_SUCCESS and 0 respectively.