# swiGetDriverInfo

Retrieves general and vendor-specific information about the device driver.

#### Prototype

DWORD swiGetDriverInfo ( SWIHD swihd, SWI_DRIVERINFO_ARGS *args, unsigned size)

Argument | Description
swihd | Switch handle .
args | Pointer to a SWI_DRIVERINFO_ARGS structure for the information about the device driver: typedef struct { BYTE description [80]; BYTE revision [16]; BYTE date [12]; BYTE vendor [80]; } SWI_DRIVERINFO_ARGS; Refer to the Details section for a description of these fields.
size | Size, in bytes, of the args buffer.

#### Return values

Return value | Description
SUCCESS |
CTAERR_DRIVER_ERROR | Underlying driver retrieved an unrecognized error. Call swiGetLastError to retrieve the MVIP device error code.
CTAERR_FUNCTION_NOT_AVAIL | Underlying driver does not support the configuration of driver-specific characteristics of a local device.
CTAERR_INVALID_HANDLE | swihd is not a valid switch handle.
CTAERR_SVR_COMM | Communication error in the server environment.

#### Details

swiGetDriverInfo is specific to MVIP-95. swiGetDriverInfo retrieves general and vendor-specific information about the device driver. The device driver is associated with the switch block
handle opened by the user through swiOpenSwitch. All BYTE fields are NULL-terminated ASCII strings. With the exception of the date field, there are no restrictions on how ASCII information is represented.

The SWI_DRIVERINFO_ARGS structure contains the following fields:

Field | Description
--- | ---
description | Information about the device driver.
revision | Version number of the device driver in a vendor-specific format.
date | Release date of the device driver. The date format is yyyy/mm/dd.
vendor | Company or organization that created the device driver.

Refer to Configuring boards and drivers for more information.

If CTAERR_DRIVER_ERROR is returned, call swiGetLastError to retrieve the MVIP device error code.

#### See also

swiConfigLocalStream, swiConfigLocalTimeslot, swiGetBoardInfo, swiGetLocalStreamInfo, swiGetLocalTimeslotInfo

#### Example

void myPrintDriverInfo(SWIHD hd)
{
SWI_DRIVERINFO_ARGS args;
unsigned size;
size = sizeof(SWI_DRIVERINFO_ARGS);
swiGetDriverInfo(hd, &args, size);
printf("%s\n", args.description);
printf("Revision %s Date %s\n", args.revision, args.date);
printf("%s\n", args.vendor);
}