/// <summary>
        /// Wrap the Touch-Base API for the purpose of raising off-primary-monitor touch events
        /// </summary>
        /// <param name="devNum"></param>
        internal TouchBaseAPI(int devNum)
        {
            if (!APIInitialized)
            {
                // Init/Open the API
                DLL_TBApiInit();
                int result = DLL_TBApiOpen();
                if (result == 0)
                {
                    throw new Exception("Touch-Base API Initialization failed");
                }
                APIInitialized = true;
            }

            // Open device #0
            DLL_TBApiGetRelativeDevice(devNum);

            // Reset error counts
            DLL_TBApiResetErrorCounts();

            // Disable MousePort hook (will keep Windows from pulling focus to the touch monitor)
            MousePort = false;

            // Link the call function back to the delegate pointer
            DataRaisedDelegate = this.DataCallback;

            // Register the data callback to retrieve pointer x/y and press information
            DLL_TBApiRegisterDataCallback(0, 0, 3, DataRaisedDelegate);
        }
 private static extern int DLL_TBApiUnregisterDataCallback(DataRaisedCallback callback);
 private static extern int DLL_TBApiRegisterDataCallback(
     int aDeviceHandle,
     int aContext, int aTypes,
     DataRaisedCallback callback
     );