Esempio n. 1
0
        public TrackIRDll(string path, Action<string> logger = null)
        {
            this.logger = logger ?? (str => {});

            dll = new NativeDll(path);
            getSignature = dll.GetDelegateFromFunction<NpGetSignature>(GetSignatureName);
            getPosition = dll.GetDelegateFromFunction<GetHeadposePosition>(GetDataName);
            queryVersion = dll.GetDelegateFromFunction<NpQueryVersion>(QueryVersionName);
            registerWindowHandle = dll.GetDelegateFromFunction<NpRegisterWindowHandle>(RegisterWindowHandleName);
            unregisterWindowHandle = dll.GetDelegateFromFunction<NpUnregisterWindowHandle>(UnregisterWindowHandleName);
            registerProgramProfileId = dll.GetDelegateFromFunction<NpRegisterProgramProfileId>(RegisterProgramProfileIdName);
            requestData = dll.GetDelegateFromFunction<NpRequestData>(RequestDataName);
            startDataTransmission = dll.GetDelegateFromFunction<NpStartDataTransmission>(StartDataTransmissionName);
            stopDataTransmission = dll.GetDelegateFromFunction<NpStopDataTransmission>(StopDataTransmissionName);
            startCursor = dll.GetDelegateFromFunction<NpStartCursor>(StartCursorName);
            stopCursor = dll.GetDelegateFromFunction<NpStopCursor>(StopCursorName);
            reCenter = dll.GetDelegateFromFunction<NpReCenter>(ReCenterName);
        }
Esempio n. 2
0
        public TrackIRDll(string path, Action <string> logger = null)
        {
            this.logger = logger ?? (str => {});

            dll                      = new NativeDll(path);
            getSignature             = dll.GetDelegateFromFunction <NpGetSignature>(GetSignatureName);
            getPosition              = dll.GetDelegateFromFunction <GetHeadposePosition>(GetDataName);
            queryVersion             = dll.GetDelegateFromFunction <NpQueryVersion>(QueryVersionName);
            registerWindowHandle     = dll.GetDelegateFromFunction <NpRegisterWindowHandle>(RegisterWindowHandleName);
            unregisterWindowHandle   = dll.GetDelegateFromFunction <NpUnregisterWindowHandle>(UnregisterWindowHandleName);
            registerProgramProfileId = dll.GetDelegateFromFunction <NpRegisterProgramProfileId>(RegisterProgramProfileIdName);
            requestData              = dll.GetDelegateFromFunction <NpRequestData>(RequestDataName);
            startDataTransmission    = dll.GetDelegateFromFunction <NpStartDataTransmission>(StartDataTransmissionName);
            stopDataTransmission     = dll.GetDelegateFromFunction <NpStopDataTransmission>(StopDataTransmissionName);
            startCursor              = dll.GetDelegateFromFunction <NpStartCursor>(StartCursorName);
            stopCursor               = dll.GetDelegateFromFunction <NpStopCursor>(StopCursorName);
            reCenter                 = dll.GetDelegateFromFunction <NpReCenter>(ReCenterName);
        }