This CLSID returns the status of the parking brake.
Parking brake
Read, shareable or exclusive
Type: | VT_UI4 (unsigned long bitmask) |
The following table shows possible bitmask values.
Parking brake status |
Bitmask value |
VIOPARKINGBRAKE_OFF | 0 |
VIOPARKINGBRAKE_ON | 1 |
None
Type: | VT_UI4 (unsigned long bitmask) |
Measurement: | VIOMEASUREMENT_DISCRETEMASK (bitmask) |
Units: | VIOUNITS_BITMASK |
API device objects expect the following data types and sizes when sending data to and from the mini-drivers:
None
Type: | DWORD * |
Size: | 4 bytes |
Description: | Bitmask that contains VIOPARKINGBRAKE_* values. |
HRESULT hr;
IVIO_Device *pParkingBrake;
VARIANT vDeviceData;
BOOL bBrakeOn;
//Create an instance of the parking brake device component and get
//its IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_PARKING_BRAKE, NULL,
CLSCTX_INPROC_SERVER, IID_VIODEVICE,
&pParkingBrake);
//Ask the device for its current status bits.
pParkingBrake->GetData(&vDeviceData, 1000);
//Fetch the status bits from the VARIANT.
bBrakeOn = (vDeviceData.ulVal != VIO_PARKINGBRAKE_OFF);
//Release the reference to the interface.
pParkingBrake->Release();