亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tchstub.cpp

?? win ce下的觸摸屏驅動源代碼
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
                begTick-_dwLastSendedTick>dwMinPauseBeforeClick)) ) 
            {  //Yes, it's initial delay
             BOOL bPermition = TRUE;
               if((_iClientFlags&(TABLET_SEND|TABLET_NEED_PERMITION))!=0)
                  bPermition = (BOOL)SendMessage(_hClientWnd, WM_PEGREC_STARTDELAY, (WPARAM)GetForegroundWindow(), MAKELPARAM(_begX, _begY));
               else
                  PostMessage(_hClientWnd, WM_PEGREC_STARTDELAY, (WPARAM)GetForegroundWindow(), MAKELPARAM(_begX, _begY));
               if((_iClientFlags&TABLET_NEED_PERMITION)==0 || bPermition)
                  {
                     _iClientFlags |= TABLET_ALL_TO_SYSTEM;
                     _iClientFlags  &= (~TABLET_SMART_TO_SYSTEM);
                     FlagsToDll = 0x07;
                     bDelay = TRUE;
                  }
               else
                  {
//                   _iClientFlags = 0; //skip this stroke
                     _iClientFlags &= (~TABLET_STARTDELAY_TO_SYSTEM);
                  }

               _dwLastSendedTick = 0;
            }


         // IS SECONDARY DELAY?  (end of a stroke)
         if( !bNear                                      &&
             Flags==0x0f   /*intermediate point*/       &&
             (_iClientFlags&TABLET_INTERDELAY_TO_SYSTEM)!=0)
            if(iLastDelayX-X<iMaxDelayDist && X-iLastDelayX<iMaxDelayDist &&
               iLastDelayY-Y<iMaxDelayDist && Y-iLastDelayY<iMaxDelayDist)
               { //Yes, it is
                  if(dwTick - dwLastDelayTick > dwMinInterDelayTime)
                     {
                      BOOL bPermition = TRUE;
                        if((_iClientFlags&(TABLET_SEND|TABLET_NEED_PERMITION))!=0)
                           bPermition = (BOOL)SendMessage(_hClientWnd, WM_PEGREC_ENDDELAY, (WPARAM)GetForegroundWindow(), MAKELPARAM(_begX, _begY));
                        else
                           PostMessage(_hClientWnd, WM_PEGREC_ENDDELAY, (WPARAM)GetForegroundWindow(), MAKELPARAM(_begX, _begY));

                        if((_iClientFlags&TABLET_NEED_PERMITION)==0 || bPermition)
                           {
                              _iClientFlags |= TABLET_ALL_TO_SYSTEM;
                              _iClientFlags  &= (~TABLET_SMART_TO_SYSTEM);
//                              _iClientFlags  &= (~TABLET_ALL_TO_CLIENT);
                              FlagsToDll = 0x07;
                              X=_begX;
                              Y=_begY;
                              _dwLastSendedTick = 0;
                              bDelay = TRUE;

//                              DeferedDelay = TRUE;
                           }
                        else
                           {
//                           _iClientFlags = 0; //skip this stroke
                              _iClientFlags &= (~TABLET_INTERDELAY_TO_SYSTEM);
                           }

//                        SendMessage(_hClientWnd, WM_PEGREC_CLEARTRACE, 0, 1);
                     }
               }
            else
               { // new delay point
                  iLastDelayX = X;
                  iLastDelayY = Y;
                  dwLastDelayTick = dwTick;
               }

      } // endif "smart"

   // TO ORIGINAL DLL CALLBACK 
   if((_iClientFlags&TABLET_ALL_TO_SYSTEM)!=0)
      {
         (*v_pfnCgrPointCallback)(FlagsToDll, X, Y);
      }

   // TO The Transcriber App window
   if((_iClientFlags&TABLET_ALL_TO_CLIENT)!=0)
      {

         // it should be here because of possible _dwLastSendedTick changing
         if(Flags == 0x0d && !bClick && !bDelay)
            _dwLastSendedTick = dwTick;

#if DISCARD_SIMILAR_POINTS    
		 // Alex says safe to leave out - originally placed here to avoid overloading
		 //  slower processors.
		 // throw away redundant points (pen didn't move far enough within small time)
         if((FlagsToWnd&TouchSampleDownFlag)!=0)
            {
             int X0 = _iLastProceedX, Y0 = _iLastProceedY;
             
			 _iLastProceedX = X;
             _iLastProceedY = Y;
             _iLastProceedFlags = FlagsToWnd;
             
			 if((FlagsToWnd&TouchSamplePreviousDownFlag)!=0)
                  { //only for internal points
                   int iSum;

				   X = X0;
				   Y = Y0;               

				   if(dwTick-_dwLastPostedToClient<1000)
                         {
                            iSum = abs(X - _iLastPostedX)+abs(Y - _iLastPostedY);
                            if(iSum<_iMinDist)
                               goto bypass_sendpoint;
                         }
//                      if(iSum>_iMaxDist)
//                         goto bypass_sendpoint;
                  }
             
			   _iLastPostedX = X;
               _iLastPostedY = Y;
            }
         else
            {
               if((FlagsToWnd&TouchSamplePreviousDownFlag)!=0 &&
                  (_iLastPostedX != _iLastProceedX || _iLastPostedY != _iLastProceedY))
                  {
                     if(abs(X - _iLastPostedX)+abs(Y - _iLastPostedY) < _iMaxDist)
                        {
                           _iLastPostedX = _iLastProceedX;
                           _iLastPostedY = _iLastProceedY;
                           SendPtToWnd(_iLastProceedFlags, _iLastProceedX, _iLastProceedY);
                        }
                  }
            }

#endif // DISCARD_SIMILAR_POINTS

         _dwLastPostedToClient  = dwTick;

         SendPtToWnd(FlagsToWnd, X, Y);

//bypass_sendpoint:
        ;

//       if(Flags == 0x0d && !bClick && !bDelay)
//          _dwLastSendedTick = dwTick;
      }
#ifdef DEBUG2
      else
	  {
         OutputDebugString(L"CgrTouch Point 4\n");
      }
#endif

 	return;
}

void CgrTouchStubInitialize(HANDLE hinstDll) {

	TCHAR		*pOldDriverName = DEFAULT_TOUCH_DRIVER_NAME;
	SECURITY_ATTRIBUTES     SecAttr;
	ULONG		iSize = 0;
	DWORD       dwResult;

   // This code was all written originally with the (bad) assumption that
   //  if two processes load the same DLL, the dll shares global variables.
   //  In Win32, that assumption is not true. So, for the global variables
   //  that must be shared, we enforce the shared memory by using a MemoryMappedFile
   //  Both processes will attempt to create a MMF - whoever gets there first creates,
   //  whoever gets there second will open the existing MMF.
   //  so far, we need to put *_phStubWnd and the outer touch queue into the MMF area.
   //  This is really a bit of a misnomer since we never have a real file, just a memory object.
   //  might have to set SEC_NOCACHE for the ARM if there are cache coherency problems
   iSize = sizeof(HANDLE) + sizeof(HWND) + sizeof(TOUCH_QUEUE);
   _hFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, iSize, 
	                                 TEXT("TranscriberSharedGlobals"));
   dwResult = GetLastError();
   if (NULL == _hFileMapping)
   {
	  MYERRORMSG(1, (__TEXT("Transcriber driver couldn't create shared global memory area.\r\n")));
	  return;
   }

   _pView = MapViewOfFile(_hFileMapping, FILE_MAP_WRITE, 0, 0, 0);
   if (NULL == _pView)
   {
	  MYERRORMSG(1, (__TEXT("Transcriber driver couldn't access shared global memory area.\r\n")));
	  return;
   }

   // once we make it to here, _pView can be used as a base pointer to the global area.


   _hClientWnd=NULL;
   _iClientFlags=TABLET_ALL_TO_SYSTEM;

   SecAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
   SecAttr.lpSecurityDescriptor = NULL;
   SecAttr.bInheritHandle = TRUE;
   g_hTabletEvent = CreateEvent(&SecAttr, TRUE, TRUE, L"CgrTabletEvent");
   g_hInnerEvent  = CreateEvent(&SecAttr, TRUE, TRUE, L"CgrTabletInnerEvent");

   // initialize the thread safety objects
   InitializeCriticalSection(&Q2CritSect);
   hQ1Mutex = CreateMutex(NULL, FALSE, TRANSCRIBER_Q1MUTEX);
#ifdef DEBUGTOUCH
   InitializeCriticalSection(&csErrMsg);
#endif // DEBUGTOUCH

   // get a pointer that we can share out for the shared queue
   //@future - I should have a more elegant way for doing this than byte offset
   //  when I add more elements, go to a struct
   // LAYOUT - the hwnd occupies the low 4 bytes of shared memory.
   //  The touch queue starts after that.
   ptq = (TOUCH_QUEUE*)((BYTE*)_pView + sizeof(HWND) + sizeof(HANDLE));
   _phinstDll = (HANDLE *)((BYTE*)_pView + sizeof(HWND));
   _phStubWnd = (HWND*) _pView;
   if (dwResult != ERROR_ALREADY_EXISTS) {
       ptq->iPut = ptq->iGet = 0;  
       tq2.iPut = tq2.iGet = 0;  
       *_phinstDll = NULL;
   }
   if (*_phinstDll == NULL) *_phinstDll = hinstDll;
     //  if(!FindWindow(TOUCHSTUB_WNDCLASSNAME, NULL))
     {
      DWORD dwIDThread;
        if(CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)TchWindowThread, (LPVOID)hinstDll, 0, &dwIDThread)==NULL )
			 {
            MYERRORMSG(1,
				   (__TEXT("Couldn't create touchstub window thread.\r\n")));
          }
        if(CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)TchInnerThread, (LPVOID)hinstDll, 0, &dwIDThread)==NULL )
			 {
            MYERRORMSG(1,
				   (__TEXT("Couldn't create touchstub inner thread.\r\n")));
          }
     }


}

extern ULONG   culReferenceCount;              //@globalvar ULONG | culReferenceCount | Count of attached threads
extern PFN_TOUCH_PANEL_CALLBACK v_pfnPointCallback;
PFN_TOUCH_PANEL_CALLBACK v_pfnCgrCallback = CgrCallback;

/*++
Autodoc Information:

    @func BOOL | TouchPanelDllEntry |
    Dll entry point.

    @rdesc
    TRUE if the function succeeds. Otherwise, FALSE.

--*/
BOOL
TouchPanelDllEntry(
    HANDLE  hinstDll,    //@parm Process handle.
    DWORD   fdwReason,   //@parm Reason for calling the function.
    LPVOID  lpvReserved  //@parm Reserved, not used.
    )
{

    BOOL ReturnCode = TRUE;

    switch ( fdwReason )
    {
        case DLL_PROCESS_ATTACH:
            DEBUGREGISTER(reinterpret_cast<HINSTANCE>(hinstDll));
            DEBUGMSG( ZONE_FUNCTION, (TEXT("Dll Process Attach\r\n")) );

             //
             // Process is attaching.  We allow only 1 process to be attached.
             // If our global counter (maintained by the PDD) is greater than 0,
             //   error.
             //

            CgrTouchStubInitialize(hinstDll); // init calligrapher's part

            if (_phinstDll != NULL && *_phinstDll != hinstDll) break;
            if ( DdsiTouchPanelAttach() > 1 )
            {
                DEBUGMSG( ZONE_FUNCTION, (TEXT("DdsiTouchPanelAttach > 1\r\n") ) );
                DdsiTouchPanelDetach(); // if a process attach fails, the  detach is
                 // never called. So adjust the count here.
                ReturnCode = FALSE;
            }

            break;

        case DLL_THREAD_ATTACH:
            DEBUGMSG( ZONE_FUNCTION, (TEXT("Dll Thread Attach\r\n")) );

             //
             // Thread is attaching.  We allow only 1 thread to be attached.
             //
            if (_phinstDll != NULL && *_phinstDll != hinstDll) break;
            if ( ++culReferenceCount > 1 )
                ReturnCode = FALSE;
            break;

        case DLL_THREAD_DETACH:
            DEBUGMSG( ZONE_FUNCTION, (TEXT("Dll Thread Detach\r\n")) );

             //
             // Thread is detaching. If the detaching thread is the thread that
             // was allowed to attach, we now have no one to process touch panel
             // points. In this case we clear the callback functions, disable the
             // touch panel hardware, and disconnect from the logical interrupt.
             //

            if (_phinstDll != NULL && *_phinstDll != hinstDll) break;
            if ( --culReferenceCount == 0 )
            {
                v_pfnPointCallback = NULL;
                DdsiTouchPanelDisable();
                InterruptDisable( gIntrTouch );
//				if( SYSINTR_NOP != gIntrTouchChanged )
//               		InterruptDisable( gIntrTouchChanged );
            }
            break;

        case DLL_PROCESS_DETACH:
            DEBUGMSG( ZONE_FUNCTION,
                      (TEXT("Dll Process Detach\r\n")) );

            if (_phinstDll != NULL && *_phinstDll != hinstDll) break;

             //
             // Process is detaching.
             // If the detaching process is the process that was allowed
             // to attach, we reset the callback functions,
             // reference count, disable the touch panel, and disconnect from the
             // logical interrupt.
             //
             //
            DdsiTouchPanelDetach();
            break;
    }
    return ( ReturnCode );
}


#ifdef __cplusplus
   }
#endif //ifdef __cplusplus

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本精品免费观看高清观看| eeuss鲁片一区二区三区在线观看| 亚洲高清免费在线| 亚洲成a天堂v人片| 强制捆绑调教一区二区| 欧美优质美女网站| 欧美精品日韩精品| 国产精品色一区二区三区| 一区二区三区波多野结衣在线观看| 亚洲妇女屁股眼交7| 国产精品一区二区三区乱码| 99久久精品免费观看| 欧美videossexotv100| 亚洲欧美福利一区二区| 久久精品99久久久| 欧美在线制服丝袜| 国产欧美一区二区精品性色超碰| 精品欧美久久久| 亚洲国产精品久久一线不卡| 国产成人av一区二区| 欧美剧情片在线观看| 最新热久久免费视频| 国产91精品免费| 精品久久久久久久久久久院品网 | 久久99国产精品成人| 色婷婷综合中文久久一本| 国产精品国产三级国产aⅴ原创| 美女视频免费一区| 7777精品伊人久久久大香线蕉经典版下载 | 国产一区二区不卡在线 | 午夜精品成人在线视频| www.亚洲激情.com| 国产亚洲欧洲一区高清在线观看| 偷拍一区二区三区| 欧美美女网站色| 日本在线不卡视频一二三区| 91精品国产高清一区二区三区 | fc2成人免费人成在线观看播放| 国产午夜亚洲精品羞羞网站| 国产一区二区h| 国产精品另类一区| 色系网站成人免费| 视频在线观看国产精品| 欧美www视频| 国产电影一区在线| 亚洲桃色在线一区| 制服丝袜日韩国产| 国产在线精品一区二区| 自拍偷拍亚洲激情| 欧美久久久久久久久| 国产精品一区二区免费不卡 | 日韩欧美的一区| 国产成人精品免费视频网站| 中文字幕在线不卡一区二区三区 | 《视频一区视频二区| 欧美日韩成人激情| 蜜桃视频一区二区三区| 一区二区三区在线视频免费观看| 91国偷自产一区二区开放时间| 首页欧美精品中文字幕| 中文av一区特黄| 日韩视频在线观看一区二区| aaa亚洲精品一二三区| 久88久久88久久久| 亚洲一卡二卡三卡四卡无卡久久| www成人在线观看| 欧美色视频在线| 91麻豆国产香蕉久久精品| 国内精品写真在线观看| 人人精品人人爱| 青青草原综合久久大伊人精品优势| 亚洲欧美一区二区不卡| 国产精品久久综合| 亚洲日本成人在线观看| 国产精品电影一区二区| 中文字幕成人网| 亚洲人成影院在线观看| 国产精品久久久久毛片软件| 欧美激情一区二区三区不卡| 欧美激情一区二区三区全黄| 久久亚洲精精品中文字幕早川悠里 | 欧美高清一级片在线| 欧美美女直播网站| 欧美丰满嫩嫩电影| 久久综合九色综合欧美98| 国产精品成人在线观看| 中文字幕第一区二区| 亚洲视频在线一区观看| 亚洲一区在线视频观看| 激情六月婷婷久久| 91久久国产最好的精华液| 欧美吻胸吃奶大尺度电影| 91精品国产91久久久久久一区二区 | 性久久久久久久久| 久久99这里只有精品| 国产成人福利片| 欧美系列日韩一区| 久久综合久久综合亚洲| 久久伊人蜜桃av一区二区| 欧美精品一区二区三区视频| 欧美午夜免费电影| 亚洲成a人片在线不卡一二三区| 亚洲一区在线观看免费观看电影高清| 亚洲电影你懂得| 国产一区二区h| 欧美日韩一区二区三区在线| 5月丁香婷婷综合| 欧美国产精品专区| 亚洲小说春色综合另类电影| 久草在线在线精品观看| 成+人+亚洲+综合天堂| 精品视频色一区| 欧美国产成人在线| 视频一区中文字幕国产| 91性感美女视频| 中文字幕不卡一区| 日本午夜精品视频在线观看| www.性欧美| 国产亚洲精品超碰| 秋霞电影网一区二区| 91香蕉视频在线| 日韩免费观看高清完整版 | 亚洲国产综合人成综合网站| 国产老肥熟一区二区三区| 欧美精品一级二级三级| 亚洲专区一二三| 色女孩综合影院| 亚洲欧洲国产日韩| 成人深夜在线观看| 久久综合国产精品| 久久精品噜噜噜成人av农村| 在线播放日韩导航| 日韩vs国产vs欧美| 日韩一区二区三区免费看| 一区二区三区中文在线| 在线观看视频一区二区欧美日韩| 国产精品久久久久久久久免费樱桃| 精品在线观看视频| 2021国产精品久久精品 | 91农村精品一区二区在线| 国产精品久久夜| 九一久久久久久| 久久免费电影网| 国产91在线观看丝袜| 中文字幕一区在线| 色婷婷精品大视频在线蜜桃视频 | 日韩精品乱码免费| 欧美一区二区三区四区五区 | 色噜噜狠狠一区二区三区果冻| 亚洲女同ⅹxx女同tv| 欧美一级精品大片| 成人国产免费视频| 青青草原综合久久大伊人精品 | 久久久av毛片精品| 欧美亚洲国产一区二区三区va| 国产专区综合网| 蓝色福利精品导航| 亚洲一区二区精品视频| 中文字幕精品在线不卡| 欧美xxxxxxxx| 日韩美女一区二区三区四区| 在线免费精品视频| 不卡的av中国片| 盗摄精品av一区二区三区| 欧美aaaaaa午夜精品| 日韩黄色免费电影| 国产剧情在线观看一区二区| 美女视频黄a大片欧美| 亚洲国产色一区| 亚洲va国产天堂va久久en| 亚洲男人的天堂av| 亚洲综合在线电影| 亚洲高清在线视频| 日韩经典中文字幕一区| 肉色丝袜一区二区| 精品一区二区三区免费观看| 精品亚洲国内自在自线福利| 免费看日韩精品| 国产精品自在欧美一区| 国产高清精品在线| 色综合中文字幕| 欧美久久婷婷综合色| 久久久久久久免费视频了| 国产精品看片你懂得| 一区av在线播放| 婷婷丁香久久五月婷婷| 国产精选一区二区三区| 成人深夜在线观看| 欧美久久免费观看| 国产精品美女久久久久久2018| 亚洲卡通动漫在线| 激情国产一区二区| 欧美熟乱第一页| 国产精品蜜臀av| 视频一区二区不卡| av不卡一区二区三区| www国产成人免费观看视频 深夜成人网| 亚洲欧洲www| 国产一区二区福利| 日韩天堂在线观看|