본문 바로가기

Hello CE,Mobile

TouchPowerHandler

//--------------------------------------------//

// LoadLibrary , TouchPanelPowerHandler

//--------------------------------------------//

BOOL TouchPowerHandler(BOOL bEnable)

{

        HINSTANCE hTouchDriver = NULL;

        PFN_TOUCH_PANEL_POWER_HANDLER pfnTouchPanelPowerHandler = NULL;

 

        hTouchDriver = LoadLibrary(_T("touch.dll"));

        if(hTouchDriver == NULL) {

               RETAILMSG(1,(L"TouchPowerHandler failed!! \r\n"));

               return FALSE;

        }

 

        pfnTouchPanelPowerHandler = (PFN_TOUCH_PANEL_POWER_HANDLER)GetProcAddress(

               hTouchDriverTEXT("TouchPanelPowerHandler") );

        if(!pfnTouchPanelPowerHandler){

               RETAILMSG(1,(L"pfnTouchPanelPowerHandler failed!! \r\n"));

               return FALSE;

        }

        (*pfnTouchPanelPowerHandler)(bEnable);

        return TRUE;  

}

 

BOOL TouchDisable(void)

{

        HINSTANCE    hTouchDriver      = NULL;

        PFN_TOUCH_PANEL_DISABLE pfnTouchPanelDisable = NULL;

 

        hTouchDriver = LoadLibrary(_T("touch.dll"));

        if(hTouchDriver == NULL) {

               RETAILMSG(1,(L"TouchPowerHandler failed!! \r\n"));

               return FALSE;

        }

 

        pfnTouchPanelDisable = (PFN_TOUCH_PANEL_DISABLE)GetProcAddress(

               hTouchDriverTEXT("TouchPanelDisable") );

 

        if(!pfnTouchPanelDisable){           

               RETAILMSG(1,(L"pfnTouchPanelDisable failed!! \r\n"));

               return FALSE;

        }

        (*pfnTouchPanelDisable)();

        return TRUE;  

}

 

BOOL TouchEnable(void)

{

        HINSTANCE    hTouchDriver      = NULL;

        PFN_TOUCH_PANEL_ENABLE pfnTouchPanelEnableNULL;

        PFN_TOUCH_PANEL_CALLBACK    pfnCallback = NULL;

 

        hTouchDriver = LoadLibrary(_T("touch.dll"));

        if(hTouchDriver == NULL) {

               RETAILMSG(1,(L"TouchPowerHandler failed!! \r\n"));

               return FALSE;

        }

        hTouchDriver = LoadLibrary(_T("touch.dll"));

        if(hTouchDriver == NULL) {

               RETAILMSG(1,(L"TouchPowerHandler failed!! \r\n"));

               return FALSE;

        }

        pfnTouchPanelEnable = (PFN_TOUCH_PANEL_ENABLE)GetProcAddress(

               hTouchDriverTEXT("TouchPanelEnable") );

 

        pfnCallback = (PFN_TOUCH_PANEL_CALLBACK)GetProcAddress(

               hTouchDriverTEXT("WM9713_DdsiTouchPanelGetPoint") );

 

        RETAILMSG(1,(L"pfnCallback (%d)\r\n",pfnCallback));

        if(!pfnTouchPanelEnable){            

               RETAILMSG(1,(L"pfnTouchPanelDisable failed!! \r\n"));

               return FALSE;

        }

        (*pfnTouchPanelEnable)(pfnCallback);

        return TRUE;  

}


'Hello CE,Mobile' 카테고리의 다른 글

CE,Mobile 설치 상대경로  (0) 2012.07.16
COMSTAT  (0) 2012.07.12
Prefast tools 의 유용성  (0) 2010.11.18
Windows Mobile 6 Tips and Tricks in Registry  (0) 2010.11.15
Ctlpnl.exe 매개변수 (cplmain.cpl)  (0) 2010.11.13