Example #1
0
    private void OnTick(object source, EventArgs e)
    {
        // GetData wants a pointer, so we make our struct outselves, and
        // pass it as an out argument to the function.
        VehicleDashboardData dashData = new VehicleDashboardData();

        DashHookDll.DashHook_GetData(out dashData);

        // Now, data can be grabbed. For example, RPM.
        ShowText(0.0f, 0.00f, "DH RPM: " + dashData.RPM);

        // Data can also be set. For example, forcing the indicators to
        // always stay on.
        dashData.indicator_left  = true;
        dashData.indicator_right = true;

        // The modified dashData is written back.
        DashHookDll.DashHook_SetData(dashData);
    }
Example #2
0
 public static extern void DashHook_SetData(VehicleDashboardData data);