| if(i==16){//写入注册码 for(i=0;i<16;i++) sImeG.ImeKey[i]=0x0; j=GetSystemDirectory(FileName,80); if((j==0)||(j>64)){ wsprintf((LPSTR)sImeG.ImeBuff,(LPSTR)"系统路径非法!"); ErrMessageBox((LPSTR)sImeG.ImeBuff); for(i=0;i<16;i++) lpImeL->ZcMyOk[i]=0x0; ShowMessTs(8); } else { lstrcat(FileName,(LPSTR)"\\"); lstrcat(FileName,(LPSTR)"WBCOOL.IME"); if((hTmp=_lopen(FileName,READ_WRITE))==-1){ wsprintf((LPSTR)sImeG.ImeBuff,(LPSTR)"程序打开出错!"); ErrMessageBox((LPSTR)sImeG.ImeBuff); for(i=0;i<16;i++) lpImeL->ZcMyOk[i]=0x0; ShowMessTs(8); } else { _llseek(hTmp,0x12345L,SEEK_SET);//12345为注册码地址 _lwrite(hTmp,lpImeL->ZcMyOk,16); _lclose(hTmp); ShowMessTs(7); } } } else { for(i=0;i<16;i++){ sImeG.ImeKey[i]=0x0; lpImeL->ZcMyOk[i]=0x0; } ShowMessTs(8); } } else MessageBeep(-1); } else if ((cCharCode>=0x30)&&(cCharCode<='~')){ if(sImeG.ZcCount<16){ if((cCharCode>='A')&&(cCharCode<='Z')) cCharCode^=0x20; lpImeL->ZcMyOk[sImeG.ZcCount]=cCharCode; sImeG.szSel[0][sImeG.ZcCount+6]=cCharCode; sImeG.ZcCount++; sImeG.szSel[0][sImeG.ZcCount+6]=0x11; sImeG.iSel = 0x1; sImeG.FScrCz = TRUE; UpdateInList(); } else MessageBeep(-1); } else MessageBeep(-1); return(iRet); } |