CLSID_VIO_LOCK_STATE

This CLSID locks and unlocks power locks.

Note This feature is not available on most vehicles initially.

Name

Power lock state

Access

Read or write, shareable or exclusive

Range

Type: VT_UI4 (unsigned long binary value)

The following list provides the lock states and values.

Power lock state
Enumeration
VIOLOCKS_UNLOCKED 0
VIOLOCKS_LOCKED 1

Input

Type: VT_UI4 (unsigned long binary)
Value: One of the defined VIO_LOCKS_* values

Output

Type: VT_UI4 (unsigned long binary)
Value: One of the VIO_LOCKS_* values for current lock status

Remarks

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 lock state in VIOLOCKS_* form.

Mini-driver output

Type: DWORD *
Size: 4 bytes
Description: Bitmask that contains the requested lock state in VIOLOCKS_* form.

Example

HRESULT hr;
IVIO_Device *pLockState;
VARIANT vLockInfo;
//Initialize the VARIANT.
VariantInit(&vLockInfo);
hr = CoCreateInstance(CLSID_VIO_LOCK_STATE, NULL,
                     CLSCTX_INPROC_SERVER, IID_VIODEVICE,
                     &pLockState);
//Set the VARIANT to lock the doors.
vLockInfo.vt = VT_UI4;
vLockInfo.ulVal = VIOLOCKS_LOCKED;
//Send the command to the vehicle.
pLatchControl->SetData(&vLatchState, 3000);
//Release the reference to the interface.
pLockState->Release();