CUT_RAS::GetLastRASError
DWORD GetLastRASError()
Return Value
DWORD |
Errorcode of the last RAS operation. |
Remarks
This function returns the errorcode from the last RAS function called. For a complete listing of errorcodes see the RASERROR.H header file of the Windows SDK or the "RAS Error Values" topic in the MSDN library.
Calling this function is useful if extended error information is required.
See also: GetErrorString | GetRASErrorString
Example
// if error is a RAS error display the appropriate error string,
// otherwise use CUT_ERR::GetErrorString.
int CUT_TestRas::OnError(int nError)
{
if (nError != UTE_SUCCESS && nError != UTE_BUFFER_TOO_SHORT)
{
// if the error is a RAS error dial then display the error string
if (nError != UTE_RAS_DIAL_ERROR )
{
MessageBox(NULL,CUT_ERR::GetErrorString (nError),"ON ERROR",MB_OK);
}else
{
// lets make sure that the error is within the limit
if (GetLastRASError() > RASBASE && GetLastRASError() <= ERROR_HANGUP_FAILED)
{
MessageBox(NULL,GetRASErrorString (GetLastRASError()),"ON ERROR",MB_OK);
}
}
}
return nError;
}