龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 软件开发 > VC开发 >

用vc++穷举windows应用程序密码(下)(3)

时间:2009-12-30 15:42来源:未知 作者:admin 点击:
分享到:
if(this-GetCheckedRadioButton(IDC_RADIO1,IDC_RADIO7)==IDC_RADIO4)lpszTemp="大小写字母组合"; if(this-GetCheckedRadioButton(IDC_RADIO1,IDC_RADIO7)==IDC_RADIO5)lpszTemp="数字字母组合"; if(th

    if(this->GetCheckedRadioButton(IDC_RADIO1,IDC_RADIO7)==IDC_RADIO4)lpszTemp="大小写字母组合";

    if(this->GetCheckedRadioButton(IDC_RADIO1,IDC_RADIO7)==IDC_RADIO5)lpszTemp="数字字母组合";

    if(this->GetCheckedRadioButton(IDC_RADIO1,IDC_RADIO7)==IDC_RADIO6)lpszTemp="所有字符";

    if(this->GetCheckedRadioButton(IDC_RADIO1,IDC_RADIO7)==IDC_RADIO7)lpszTemp="数据字典";

    WritePrivateProfileString("设置","穷举方法",lpszTemp,"Setup.ini");

    //按钮互锁

    m_OK.EnableWindow(FALSE);

    m_Quit.EnableWindow(FALSE);

    m_Pause.EnableWindow(TRUE);

    m_Pause.SetFocus();

    //对话框最小化

    this->PostMessage(WM_SYSCOMMAND,SC_MINIMIZE,0);

    //如果对话框尚未创建线程,创建线程,且允许线程运行结束自动销毁

    if (m_pEnumThread[0].pThread ==NULL)

    {   UINT i;

        for(i=1;i<=this->m_nThreadCount ;i++)

        {//优先级最低可以相应的提高密码应用程序的对话框响应速度

    m_pEnumThread[i].pThread=AfxBeginThread((AFX_THREADPROC)EnumProc,(LPVOID)0,THREAD_PRIORITY_LOWEST,0,0,NULL);

        m_pEnumThread[i].pThread->m_bAutoDelete =true;

        }

    }

    else //如果线程已经创建,唤醒挂起的线程

        {   UINT i;

        for(i=1;i<=this->m_nThreadCount;i++)

        m_pEnumThread[i].pThread->ResumeThread();

        }

}

DWORD WINAPI EnumProc( LPVOID )

精彩图集

赞助商链接