CUT_RAS::OnError

Dundas

CUT_RAS::OnError

Members | Overview

virtual int OnError(int nError)

Parameters

nError

The errorcode of the error that occurred.

Return Value

UTE_SUCCESS

Operation completed successfully.

UTE_ERROR

Operation failed.

Remarks

All functions which have return error codes call this function. Override OnError to provide extended error handling and debugging capabilities.

See also:  GetLastRASError | GetRASErrorString 

  Example

//display an errorstring via the OnError callback

int CUT_TestRas::OnError(int nError)

{

if (nError != UTE_SUCCESS && nError != UTE_BUFFER_TOO_SHORT)

{

if (nError != UTE_RAS_DIAL_ERROR )

{

MessageBox(NULL,CUT_ERR::GetErrorString (nError),"ON ERROR",MB_OK);

}else

{

if (GetLastRASError() > RASBASE && GetLastRASError() <= ERROR_HANGUP_FAILED)

MessageBox(NULL,GetRASErrorString (GetLastRASError()),"ON ERROR",MB_OK);

}

}

return nError;

}