CLSID_VIO_LATCH_CONTROL

This CLSID releases a latch such as a trunk latch, gas cap, or hood.

Name

Latch control

Access

Write, shareable or exclusive

Range

Type: VT_UI4 (unsigned long enumerated)

The following table shows the available latch controls and values to trigger.

Latch control
Enumeration
VIOLATCH_HOOD 0x01
VIOLATCH_TRUNK 0x02
VIOLATCH_GAS_CAP 0x04

Input

Type: VT_UI4 (unsigned long bitmask)

Output

None

Remarks

For safety reasons, there should be an interlock to prevent the opening of the latches while the vehicle is able to be driven (either the parking brake is off or the ignition switch is on).

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

Mini-driver input

Type: DWORD *
Size: 4 bytes
Description: Bitmask that contains the VIOLATCH_* values of latches to operate.

Mini-driver output

None

Example

HRESULT hr;
IVIO_Device *pLatchControl;
VARIANT vLatchState;
//Initialize the VARIANT.
VariantInit(&vLatchState);
hr = CoCreateInstance(CLSID_VIO_LATCH_CONTROL, NULL,
                     CLSCTX_INPROC_SERVER, IID_VIODEVICE,
                     &pLatchControl);
//Set the VARIANT to pop the gas cap switch.
vLatchState.vt = VT_UI4;
vLatchState.ulVal = VIOLATCH_GAS_CAP;
//Send the command to the vehicle.
pLatchControl->SetData(&vLatchState, 3000);
//Release the reference to the interface.
pLatchControl->Release();