This CLSID returns the engine’s coolant temperature.
Coolant temperature
Read, shareable or exclusive
| Type: | VT_I2 (signed short integer) |
| Low: | –128 |
| High: | +255 |
None
| Type: | VT_I2 (signed short integer) |
| Measurement: | VIOMEASUREMENT_TEMPERATURE |
| Units: | VIOUNITS_CELSIUS |
API device objects expect the following data types and sizes when sending data to and from the mini-drivers:
None
| Type: | SHORT * |
| Size: | 2 bytes |
| Description: | Coolant temperature in degrees Celsius |
HRESULT hr;
IVIO_Device *pCoolantTemp;
VARIANT vDeviceData;
SHORT sCoolantTemp;
//Create an instance of the coolant temperature device and get its
//IVIO_Device interface.
hr = CoCreateInstance(CLSID_VIO_COOLANT_TEMP, NULL,
CLSCTX_INPROC_SERVER, IID_VIODEVICE,
&pCoolantTemp);
//Ask the device for coolant temperature.
pCoolantTemp->GetData(&vDeviceData, 3000);
//Fetch the coolant temperature, in degrees Celsius, from the VARIANT.
sCoolantTemp = vDeviceData.iVal;
//Release the reference to the interface.
pCoolantTemp->Release();