This CLSID returns the current transmission gear position.
Gear position
Read, shareable or exclusive
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 |
None
Type: | VT_UI2 (unsigned short integer enumeration) |
Measurement: | VIOMEASUREMENT_ENUM |
Units: | VIOUNITS_ENUM |
API device objects expect the following data types and sizes when sending data to and from the mini-drivers:
None
Type: | USHORT * |
Size: | 2 bytes |
Description: | Transmission gear as indicated by one of the VIOGEAR_* values |
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();