/// <summary> /// Initializes the Telldus library. /// This service needs to be initialized before other methods are called. /// </summary> public void Initialize() { NativeWrapper.tdInit(); deviceEvent = TDDeviceEvent; deviceChangeEvent = TDDeviceChangeEvent; rawDeviceEvent = TDRawDeviceEvent; sensorEvent = TDSensorEvent; controllerEvent = TDControllerEvent; NativeWrapper.tdRegisterDeviceEvent(deviceEvent, IntPtr.Zero); NativeWrapper.tdRegisterDeviceChangeEvent(deviceChangeEvent, IntPtr.Zero); NativeWrapper.tdRegisterRawDeviceEvent(rawDeviceEvent, IntPtr.Zero); NativeWrapper.tdRegisterSensorEvent(sensorEvent, IntPtr.Zero); NativeWrapper.tdRegisterControllerEvent(controllerEvent, IntPtr.Zero); }
public static extern int tdRegisterRawDeviceEvent(NativeWrapper.TDRawDeviceEvent eventFunction, IntPtr context);