CLSID_VIO_TRANSMISSION_GEAR

This CLSID returns the current transmission gear position.

Name

Gear position

Access

Read, shareable or exclusive

Range

Type: VT_UI2 (unsigned short integer enumeration)

The following table shows possible enumerations.

Gears
Value
Description
VIOGEAR_NEUTRAL 0 Neutral gear
VIOGEAR_FIRST 1 Manual first gear
VIOGEAR_MAX 253 Manual highest gear
VIOGEAR_OVERDRIVE 254 Manual or generic overdrive
VIOGEAR_REVERSE 255 Reverse gear, automatic or manual
VIOGEAR_DRIVE 256 Generic drive gear
VIOGEAR_DRIVE_1 257 Same as VIOGEAR_FIRST + 256
VIOGEAR_DRIVE_MAX 509 Same as VIOGEAR_MAX + 256
VIOGEAR_DRIVE_OVERDRIVE 510 Same as VIOGEAR_OVERDRIVE + 256

Input

None

Output

Type: VT_UI2 (unsigned short integer enumeration)
Measurement: VIOMEASUREMENT_ENUM
Units: VIOUNITS_ENUM

Remarks

API device objects expect the following data types and sizes when sending data to and from the mini-drivers:

Mini-driver input

None

Mini-driver output

Type: USHORT *
Size: 2 bytes
Description: Transmission gear as indicated by one of the VIOGEAR_* values

Example

HRESULT hr;
IVIO_Device *pTransmissionGear;
VARIANT vDeviceData;
USHORT usCurrentGear;
//Create an instance of the gear position device and get its identifier. 
//IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_TRANSMISSION_GEAR, NULL,
                     CLSCTX_INPROC_SERVER, IID_VIODEVICE,
                     &pTransmissionGear);
//Ask the device for the current gear.
//Remove the notification sink.
pTransmissionGear->GetData(&vDeviceData, 3000);
//Fetch the current gear enumeration from the VARIANT.
usCurrentGear = vDeviceData.uiVal;
//Release the reference to the interface.
pTransmissionGear->Release();