CLSID_VIO_HEADLIGHTS

This CLSID returns the status of the headlight switch.

Name

Headlight switch

Access

Read, shareable or exclusive

Range

Type: VT_UI4 (unsigned long bitmask)

The following table shows possible bitmask values.

Headlight switch status
Bitmask value
VIOHEADLIGHTS_OFF 0x00
VIOHEADLIGHTS_PARKINGLIGHTS 0x01
VIOHEADLIGHTS_HEADLIGHTS 0x02
VIOHEADLIGHTS_BRIGHTHEADLIGHTS 0x04

Input

None

Output

Type: VT_UI4 (unsigned long)
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 VIOHEADLIGHTS_* values.

Example

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