CLSID_VIO_COOLANT_TEMP

This CLSID returns the engine’s coolant temperature.

Name

Coolant temperature

Access

Read, shareable or exclusive

Range

Type: VT_I2 (signed short integer)
Low: –128
High: +255

Input

None

Output

Type: VT_I2 (signed short integer)
Measurement: VIOMEASUREMENT_TEMPERATURE
Units: VIOUNITS_CELSIUS

Remarks

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

Mini-driver input

None

Mini-driver output

Type: SHORT *
Size: 2 bytes
Description: Coolant temperature in degrees Celsius

Example

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();