This CLSID returns an odometer reading.
Odometer
Read, shareable or exclusive
Type: | VT_UI4 (unsigned long) |
Low: | 0 |
High: | 16,777,216 (2^24) |
None
Type: | VT_UI4 (unsigned long) |
Measurement: | VIOMEASUREMENT_DISTANCE |
Units: | VIOUNITS_KILOMETERS |
This CLSID should be used for taking readings between two points in time. Do not assume it returns total mileage on the vehicle.
API device objects expect the following data types and sizes when sending data to and from the mini-drivers:
None
Type: | ULONG * |
Size: | 4 bytes |
Description: | Odometer reading in 1 kilometer increments |
HRESULT hr;
IVIO_Device *pOdometer;
//Create an event sink object; iOdometerSink is derived from //IVIO_EventSink.
IVIO_EventSink *iOdometerSink = new COdometerSink;
//Create an instance of the odometer device and get its
//IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_ODOMETER, NULL,
CLSCTX_INPROC_SERVER, IID_VIODEVICE,
&pOdometer);
//Set the notification sink to notify every five seconds.
pOdometer->SetNotify(NULL, iOdometerSink, 5000);
. . .
//Remove the notification sink.
pOdometer->SetNotify(NULL, NULL, 0);
//Release the reference to the interface.
pOdometer->Release();
//Release the event sink object.
iOdometerSink->Release();