(Page 15 of 28 in this chapter)


swiGetDriverInfo

Description

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

Prototype

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

swihd Handle returned by swiOpenSwitch.

args Pointer to a SWI_DRIVERINFO_ARGS structure where the information about the device driver will be retrieved. The SWI_DRIVERINFO_ARGS structure is:

typedef struct
{
BYTE description [80];
BYTE revision [16];
BYTE date [12];
BYTE vendor [80];
} SWI_DRIVERINFO_ARGS;

See the Details section for a description of these fields.

size Size, in bytes, of the args buffer.

Return Values

Events

Details

This function retrieves general and vendor-specific information about the device driver. The device driver is associated with the switch block handle opened by the user via 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.

This function is specific to MVIP-95. Calling this function on an MVIP-90 driver will return CTAERR_FUNCTION_NOT_AVAIL.

The SWI_DRIVERINFO_ARGS structure contains the following fields:

Field

Description

description

Text that provides 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 Section 6.3, Board and Driver Configuration for more information.

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

See Also

swiConfigLocalStream, swiConfigLocalTimeslot, swiGetBoardInfo, swiGetLastError, swiGetLocalStreamInfo, swiGetLocalTimeslotInfo, swiOpenSwitch

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);
}


(Page 15 of 28 in this chapter)


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