CLSID_VIO_IGNITION_SWITCH

This CLSID returns the status of the ignition switch.

Name

Ignition switch

Access

Read, shareable or exclusive

Range

Type: VT_UI4 (unsigned long)

The following table shows possible bitmask values.

Ignition switch status
Bitmask value
VIOIGNITIONSWITCH_OFF 0x00
VIOIGNITIONSWITCH_RUN 0x01
VIOIGNITIONSWITCH_START 0x02
VIOIGNITIONSWITCH_ACC 0x04

Input

None

Output

Type: VT_UI4 (unsigned long bitmask)
Measurement: VIOMEASUREMENT_DISCRETEMASK (bitmask)
Units: VIOUNITS_BITMASK

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: DWORD *
Size: 4 bytes
Description: Bitmask that contains VIOIGNITIONSWITCH_* values.

Example

HRESULT hr;
IVIO_Device *pIgnitionSwitch;
VARIANT vDeviceData;
ULONG ulSwitchStatus;
//Create an instance of the ignition switch device component and get its //IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_IGNITION_SWITCH, NULL,
                     CLSCTX_INPROC_SERVER, IID_VIODEVICE,
                     &pIgnitionSwitch);
//Ask the device for its current status bits.
pIgnitionSwitch->GetData(&vDeviceData, 1000);
//Fetch the status bits from the VARIANT.
ulSwitchStatus = vDeviceData.ulVal;
//Release the reference to the interface.
pIgnitionSwitch->Release();