int FenPrincipale::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: choixFichier(); break; case 1: calculerHash(); break; case 2: compareHash((*reinterpret_cast< QString(*)>(_a[1]))); break; default: ; } _id -= 3; } return _id; }
void Authenticate( HWND hwnd, LPSTR passwordhash ) { LPSTR inputpassword = (LPSTR) LocalAlloc(LPTR,256); GetDlgItemText(hwnd,IDPASS,inputpassword,256); if (compareHash(inputpassword, passwordhash) == 0) { EndDialog(hwnd,0); PostQuitMessage(0); } else { MessageBox(hwnd,"Invalid password!","Error",MB_ICONSTOP | MB_SYSTEMMODAL); EndDialog(hwnd,1); } LocalFree(inputpassword); return; }