CLSID_VIO_DOOR_SWITCHES

This CLSID retrieves the status of door, liftgate, and trunk lid pin switches.

Name

Door switches

Access

Read, shareable or exclusive

Range

Type: VT_UI4 (unsigned long bitmask)

The following table shows possible door switches and their bitmask values. If a specified bit is set to 1, it indicates that the door associated with the switch is open.

Door switch
Bitmask value
VIODOOR_LEFT_FRONT 0x00000001
VIODOOR_LEFT_REAR 0x00000002
VIODOOR_LEFT_REAR2 0x00000004
VIODOOR_LEFT_REAR3 0x00000008
VIODOOR_LEFT_REAR4 0x00000010
VIODOOR_LEFT_REAR5 0x00000020
VIODOOR_LEFT_REAR6 0x00000040
VIODOOR_LEFT_REAR7 0x00000080
VIODOOR_RIGHT_FRONT 0x00000100
VIODOOR_RIGHT_REAR 0x00000200
VIODOOR_RIGHT_REAR2 0x00000400
VIODOOR_RIGHT_REAR3 0x00000800
VIODOOR_RIGHT_REAR4 0x00001000
VIODOOR_RIGHT_REAR5 0x00002000
VIODOOR_RIGHT_REAR6 0x00004000
VIODOOR_RIGHT_REAR7 0x00008000
VIODOOR_TRUNK 0x00010000
VIODOOR_LIFTGATE 0x00020000
VIODOOR_REAR 0x00040000
VIODOOR_REAR_LEFT 0x00080000
VIODOOR_REAR_RIGHT 0x00100000

Input

None

Output

Type: VT_UI4 (unsigned long bitmask)
Measurement: VIOMEASUREMENT_DISCRETEMASK
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 the status of door switches, as represented by VIODOOR_* values.

Example

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