Пример #1
0
        public void Initialize(IntPtr panlePtr, int high, int wide)
        {
            if (panlePtr == IntPtr.Zero || high == 0 || wide == 0)
            {
                return;
            }

            this.panlePtr = panlePtr;
            this.heigh    = high;
            this.width    = wide;

            bool result = PPL398_InitialDevice(DEVICE_TYPE_ID.PPL398_DEVICE, panlePtr, 0, 0, wide, high);

            if (result == false)
            {
                return;
            }
            CallBackMyFun1 fun = new CallBackMyFun1(PPSignStatusNotify);

            NOTIFYREALTIMESIGNDATA _RealDataCallback = new NOTIFYREALTIMESIGNDATA(RealTimeDataCallback);
            Int32 ret = PPL398_SignatureStatusCallback(DEVICE_TYPE_ID.PPL398_DEVICE, fun);

            long retlong = PPL398_RealTimeSignatureDataCallback(DEVICE_TYPE_ID.PPL398_DEVICE, _RealDataCallback);


            //log.Debug("begin");

            //if (!enabled)
            //{
            //    return;
            //}

            //string dllPath = Path.Combine(Config.PeripheralAbsolutePath, PeripheralManager.Dir, dll);

            //if (!File.Exists(dllPath))
            //{
            //    dllPath = Path.Combine(Config.PeripheralAbsolutePath, PeripheralManager.Dir, "BoardLib", dll);
            //}

            //ptr = Win32ApiInvoker.LoadLibrary(dllPath);
            //log.InfoFormat("LoadLibrary: dllPath = {0}, ptr = {1}", dllPath, ptr);
            //uint idcoed = Win32ApiInvoker.GetLastError();
            //IntPtr api = Win32ApiInvoker.GetProcAddress(ptr, "PPL398_InitialDevice");
            //boardInitialize = (Board_Initialize)Marshal.GetDelegateForFunctionPointer(api, typeof(Board_Initialize));

            //bool re = boardInitialize(DEVICE_TYPE_ID.PPL398_DEVICE, panlePtr, 0, 0, wide, high);
            //log.DebugFormat("GetProcAddress: ptr = {0}, entryPoint = PPL398_InitialDevice", ptr);

            //log.Debug("end");
        }
Пример #2
0
 public static extern Int32 PPL398_SignatureStatusCallback(DEVICE_TYPE_ID deviceID, CallBackMyFun1 myFun);