(Page 16 of 28 in this chapter)


swiGetLastError

Description

Gets the last MVIP device error on the switch handle.

Prototype

DWORD swiGetLastError ( SWIHD swihd,
DWORD *errorcode)

swihd Handle returned by swiOpenSwitch.

errorcode Pointer to the code of the device error.

Return Values

Events

Details

This function can be called to get the last error returned by the switching device driver on the specified switch handle.

Use this function if a Switching service function returned CTAERR_DRIVER_ERROR.

For a description of the error codes, refer to the MVIP-95 Device Driver Standard Manual or the MVIP-90 Standard Manual for
MVIP-90.

Example


void myErrorHandler(SWIHD hd, char *text, DWORD status)
{
DWORD errorcode, ret;

fprintf(stderr, "Error (%d): %s", status, text);
ret = swiGetLastError(hd, &errorcode);
if (ret == SUCCESS)
fprintf(stderr, "** MVIP driver error code: %d\n", errorcode);
}


(Page 16 of 28 in this chapter)


tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights reserved.