CUT_RAS::GetRASErrorString

Dundas

CUT_RAS::GetRASErrorString

Members | Overview

LPCSTR GetRASErrorString(DWORD error)

Parameters

error

DWORD specifying the RAS error code. 

Return Value

LPCSTR 

A string describing the error code.

Remarks

This function returns the appropriate error string corresponding to the passed RAS error code. 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

  Example

//display an errorstring based on an errorcode

int CUT_TestRas::OnError(int nError)

{

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

{

// if the error is a RAS dialing error 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 limits of our errorcodes

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

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

}

}

return nError;

}