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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tchstub.cpp

?? 觸摸屏驅(qū)動的程序
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
               if((_iClientFlags&TABLET_NEED_PERMITION)==0 || bPermition)
                  {
                     (*v_pfnCgrPointCallback)(0x07, _begX+1, _begY+1);
                     (*v_pfnCgrPointCallback)(0x0f, _begX, _begY);
                     (*v_pfnCgrPointCallback)(0x0f, _begX, _begY);
                     (*v_pfnCgrPointCallback)(0x0f, _begX, _begY);
                     (*v_pfnCgrPointCallback)(0x0D, _begX, _begY);
                  }
               else
			      {
#ifdef DEBUG2
         OutputDebugString(L"CgrTouch Point 3\n");
#endif
                  return;
				  }
            }

		 // we delay points to see if we should either treat this as a selection or see if 
		 //  we should send the point to the application "underneath" Transcriber,
		 //  or tap and hold.

         // IS INITIAL DELAY?
         if( bNear                                      &&
             Flags==0x0f   /*intermediate point*/       &&
             (_iClientFlags&TABLET_STARTDELAY_TO_SYSTEM)!=0  &&
             (dwTick-begTick>1200 ||
               (dwTick-begTick>dwMinStartDelayTime      &&
                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;
	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;

   g_hTabletEvent = CreateEvent(NULL, TRUE, TRUE, L"CgrTabletEvent");
   g_hInnerEvent  = CreateEvent(NULL, TRUE, TRUE, L"CgrTabletInnerEvent");

   DEBUGCHK(g_hTabletEvent != NULL && g_hInnerEvent != NULL);

   // 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;
   // Touch driver is loaded by gwes process and transcriber process.
   // Create the 2 worker threads in gwes process only.
   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;
extern HANDLE hThread;
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")) );
            DisableThreadLibraryCalls((HMODULE) hinstDll);

             //
             // 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_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.
             //
             //
            ASSERT(hThread==NULL);
            DdsiTouchPanelDetach();
            break;
    }
    return ( ReturnCode );
}


#ifdef __cplusplus
   }
#endif //ifdef __cplusplus

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草国产精品97视觉盛宴| 欧美精品一卡两卡| 久久蜜桃av一区二区天堂| 日韩经典中文字幕一区| 69久久99精品久久久久婷婷| 蜜桃av噜噜一区| 精品少妇一区二区三区日产乱码 | www.亚洲色图.com| 亚洲欧洲日产国产综合网| 色综合久久综合网97色综合| 亚洲乱码精品一二三四区日韩在线| 9色porny自拍视频一区二区| 一区二区三区成人| 欧美一级在线观看| 国产大陆a不卡| 亚洲精品国产无天堂网2021| 欧美丰满少妇xxxxx高潮对白| 蜜桃精品视频在线观看| 国产偷国产偷亚洲高清人白洁| 成人美女视频在线观看18| 夜夜精品视频一区二区| 6080日韩午夜伦伦午夜伦| 国产在线一区二区| 亚洲激情图片一区| 日韩美女视频在线| 99久久国产综合精品麻豆| 日韩和欧美的一区| 久久九九久久九九| 欧美日韩一区二区三区四区| 国产真实精品久久二三区| 一区二区三区在线免费视频| 日韩一区二区三区观看| 成人国产精品免费网站| 天堂一区二区在线免费观看| 国产片一区二区三区| 欧美无砖专区一中文字| 高清shemale亚洲人妖| 亚洲成人动漫在线观看| 中文字幕免费观看一区| 欧美一区二区成人6969| 97se狠狠狠综合亚洲狠狠| 奇米影视在线99精品| 综合久久给合久久狠狠狠97色 | 日韩免费视频线观看| 成人的网站免费观看| 日韩国产成人精品| 亚洲综合免费观看高清完整版在线| 精品成人在线观看| 欧美久久久久久久久| 成人免费看黄yyy456| 久久精工是国产品牌吗| 亚洲第一精品在线| 亚洲欧美在线另类| 久久久久国产免费免费| 欧美一级在线视频| 欧美日韩国产不卡| 色国产综合视频| 成人性生交大合| 国产做a爰片久久毛片| 三级在线观看一区二区| 亚洲精品乱码久久久久久久久| 国产夜色精品一区二区av| 欧美一级片在线观看| 欧美日韩一区二区欧美激情 | 亚洲动漫第一页| 国产精品久久久久久久裸模| 久久免费美女视频| 久久亚洲影视婷婷| 欧美不卡一二三| 欧美一级爆毛片| 日韩亚洲国产中文字幕欧美| 欧美日韩亚州综合| 在线播放中文一区| 欧美日本一区二区三区四区| 欧美系列一区二区| 制服丝袜成人动漫| 欧美日韩小视频| 欧美精品在欧美一区二区少妇| 在线观看国产日韩| 欧洲精品一区二区| 欧美日韩国产精品成人| 91麻豆精品国产91久久久 | 欧美午夜不卡视频| 欧美日韩亚洲综合一区| 欧美揉bbbbb揉bbbbb| 777色狠狠一区二区三区| 制服丝袜亚洲色图| www精品美女久久久tv| 精品va天堂亚洲国产| 国产欧美日韩综合| 亚洲色图欧美在线| 亚洲福利国产精品| 毛片一区二区三区| 国产suv精品一区二区6| 99久久777色| 欧美日韩成人激情| 欧美电视剧在线看免费| 国产三级精品三级| 亚洲精品自拍动漫在线| 亚洲电影中文字幕在线观看| 免费在线观看成人| 国产伦精一区二区三区| 成人a免费在线看| 在线观看日韩国产| 欧美va亚洲va香蕉在线| 国产日韩欧美电影| 亚洲高清在线视频| 激情文学综合插| 91香蕉视频污| 日韩欧美国产一二三区| 国产精品嫩草99a| 午夜精品久久久久久久久久久| 久久精品国产精品亚洲综合| 成人福利视频网站| 欧美三级在线播放| 丰满岳乱妇一区二区三区| av成人动漫在线观看| 欧美精品tushy高清| 日本一区免费视频| 日本三级韩国三级欧美三级| 高清在线成人网| 欧美精品一卡两卡| 中文字幕一区av| 免费一级片91| 91国产成人在线| 久久精品一区二区| 日日摸夜夜添夜夜添国产精品| 国产麻豆精品久久一二三| 欧美日韩久久久一区| 国产精品视频一二三| 日韩中文字幕1| 91一区二区在线| 精品福利一二区| 日韩精品国产欧美| 色视频成人在线观看免| 久久久www成人免费无遮挡大片| 视频一区二区国产| 日本精品一级二级| 国产女人aaa级久久久级| 久久99蜜桃精品| 欧美精品 国产精品| 伊人婷婷欧美激情| 大白屁股一区二区视频| 日韩一区二区在线观看视频播放| 亚洲激情男女视频| 97久久超碰国产精品| 中文成人综合网| 韩国三级在线一区| 日韩一区二区三区免费看 | 视频一区二区三区在线| 色婷婷亚洲婷婷| 中文字幕一区二区三区在线播放| 久久99久久久久| 欧美一级在线视频| 日本欧美一区二区| 欧美日韩一区二区在线视频| 一区二区三区欧美日韩| www.亚洲激情.com| 国产精品电影院| 丁香婷婷综合色啪| 日本一区二区三区dvd视频在线| 精品制服美女久久| 欧美一二三区在线| 久久99精品国产.久久久久久| 欧美日本国产视频| 亚洲电影你懂得| 777色狠狠一区二区三区| 日韩 欧美一区二区三区| 宅男噜噜噜66一区二区66| 亚洲电影你懂得| 7799精品视频| 精品中文av资源站在线观看| 久久色在线视频| 国产一区二区在线影院| 国产日韩欧美精品在线| 成人在线视频一区二区| 国产精品美女久久久久久久久久久| k8久久久一区二区三区| 亚洲日穴在线视频| 欧美性猛交一区二区三区精品| 亚洲一级电影视频| 91精品国产全国免费观看| 久久精品久久久精品美女| 欧美精品一区二区三区四区 | 色综合网站在线| 亚洲大片免费看| 日韩美女天天操| 成人美女在线视频| 亚洲成人福利片| 精品国产免费视频| 北条麻妃一区二区三区| 一区二区视频在线看| 欧美一区二区三区四区在线观看| 精品夜夜嗨av一区二区三区| 国产精品天干天干在观线| 欧美亚洲动漫制服丝袜| 久久se这里有精品| 亚洲欧美日韩中文播放| 日韩一级片在线播放| 成人精品视频一区二区三区尤物|