public void StartReceiver(VmMonitor.ReceiverCallback callback) { this.mReceiverCallback = callback; this.mReceiverWakeup = (EventWaitHandle) new ManualResetEvent(false); this.mReceiverThread = new Thread((ThreadStart)(() => { try { if (HDPlusModule.SensorRecvMsg(this.mReceiverCallback)) { return; } CommonError.ThrowLastWin32Error("Cannot receive monitor message"); } catch (Exception ex) { Logger.Error("Exception, receiver thread died. Err : " + ex.ToString()); } })) { IsBackground = true }; this.mReceiverThread.Start(); }
public static extern bool SensorRecvMsg(VmMonitor.ReceiverCallback callback);
public static extern bool MonitorRecvMesg( SafeFileHandle handle, VmMonitor.ReceiverCallback callback, SafeWaitHandle wakeupEvent);