WINCE5.0中点击“背景光”中的“持续空闲xx分钟后关闭”之后,再点击“高级选项”串口会打印 Prefetch Abort: Thread=83b4c8d0 Proc=82667bc0 'CTLPNL.EXE'

WINCE5.0中点击“背景光”中的“持续空闲xx分钟后关闭”之后,再点击“高级选项”串口会打印:
Prefetch Abort: Thread=83b4c8d0 Proc=82667bc0 'CTLPNL.EXE'
AKY=00004001 PC=01d3196c(???+0x01d3196c) RA=02f255b0(cplmain.cpl+0x000055b0) BVA=01d3196c FSR=00000005
的问题

WINCE5.0的“背景光”选项卡界面的处理函数在“WINCE500/wceshellfe/oak/ctlpnl/cplmain/screen.cpp”中的
“BacklightDlgProc”函数中
1.的case IDC_BADVANCED:下要加入如下代码,以用来重新加载AdvBacklight.dll
  if (hAdvanced==NULL) {
                        CReg reg1(HKEY_CURRENT_USER, RK_CONTROLPANEL_BACKLIGHT);
   LPCTSTR pszName = reg1.ValueSZ(RV_ADVANCEDCPL);
   hAdvanced = NULL;
   pfnAdvanced = NULL;

   if(pszName && (hAdvanced = LoadLibrary(pszName)))
   {
    pfnAdvanced = (ADVANCEDPROC)GetProcAddress(hAdvanced, FUNCNAME_BACKLIGHTADVAPPLET);
   }
                    }


2.修改WM_DESTROY:在释放掉dll后要设置指针为NULL
 case WM_DESTROY:
  MyFreeLib(hAdvanced);
         hAdvanced = NULL;
  pfnAdvanced = NULL;
  break;
修改好后bulid ctlpnl,sysgen整个工程,OK

 

你可能感兴趣的:(thread,c,user,null,dll,WinCE)