public TXcnConnector() { this.myDelegate = new TXcnConnector.CallBack(this.MyCallBack); this.myDelegateEx = new TXcnConnector.CallBackEx(this.MyCallBackEx); if (Environment.Is64BitProcess) { if (!TXcnConnector.SetCallback64(this.myDelegate)) { throw new Exception("Could not establish a callback function"); } if (!TXcnConnector.SetCallbackEx64(this.myDelegateEx, IntPtr.Zero)) { throw new Exception("Could not establish a callback function"); } } else { if (!TXcnConnector.SetCallback(this.myDelegate)) { throw new Exception("Could not establish a callback function"); } if (!TXcnConnector.SetCallbackEx(this.myDelegateEx, IntPtr.Zero)) { throw new Exception("Could not establish a callback function"); } } TXcnConnector.instance = this; }
public TXcnConnector() { this.myDelegate = new TXcnConnector.CallBack(this.MyCallBack); this.myDelegateEx = new TXcnConnector.CallBackEx(this.MyCallBackEx); if (Environment.Is64BitProcess) { if (!TXcnConnector.SetCallback64(this.myDelegate)) throw new Exception("Could not establish a callback function"); if (!TXcnConnector.SetCallbackEx64(this.myDelegateEx, IntPtr.Zero)) throw new Exception("Could not establish a callback function"); } else { if (!TXcnConnector.SetCallback(this.myDelegate)) throw new Exception("Could not establish a callback function"); if (!TXcnConnector.SetCallbackEx(this.myDelegateEx, IntPtr.Zero)) throw new Exception("Could not establish a callback function"); } TXcnConnector.instance = this; }
private static bool SetCallbackEx64(TXcnConnector.CallBackEx pCallback, IntPtr userData);