你的程序加密过OD MD5值支持二次开发使用 防破解验证也可实现一机一码 VC++ 开发
STARTUPINFO startup;
PROCESS_INFORMATION process;
CString g_strCompanyName1 = "";
CString g_strCompanyName2 = "";
CString g_strCompanyName3 = "";
CString g_strCompanyName = "**";
BOOL CTaiShanApp::InitInstance()
{
AfxEnableControlContainer();
//#ifdef ZJH
m_gMessageID = ::RegisterWindowMessage("WsSendMessageHqData");
CFileFind fnd;
if(S_OK != ::CoInitialize (NULL))
return FALSE;
// ReadDiskIDPartCwd();
// if(!FyRegister::IsValidUser())
// return FALSE;
memset( &startup, 0, sizeof( startup ) );
startup.cb = sizeof( startup );
memset( &process, 0, sizeof( process ) );
if(fnd.FindFile ("WsSendMessageShare.exe"))
{
m_gbUseExe = true;
}
hAppMutex=::CreateMutex(NULL,TRUE,m_pszExeName);
if(GetLastError() == ERROR_ALREADY_EXISTS)
{
CWnd *pPrevWnd = CWnd::GetDesktopWindow()->GetWindow(GW_CHILD);
while(pPrevWnd)
{
if(::GetProp(pPrevWnd->GetSafeHwnd(),m_pszExeName))
{
if(pPrevWnd->IsIconic())
pPrevWnd->ShowWindow(SW_RESTORE);
pPrevWnd->SetForegroundWindow();
pPrevWnd->GetLastActivePopup()->SetForegroundWindow();
return false;
}
pPrevWnd = pPrevWnd->GetWindow(GW_HWNDNEXT);
}
return false;
}
//#endif
#ifndef _NET_AUTHEN
HMODULE hModule;
hModule = LoadLibrary("ide21201.dll");
if (hModule==NULL) {
AfxMessageBox("Can't find ide21201.dll");
return FALSE;
}
char *(WINAPI * GetIdeSerial)();
GetIdeSerial = (char *(WINAPI *)())GetProcAddress(hModule, "GetIdeSerial");
if (GetIdeSerial==NULL) {
AfxMessageBox("Can't find GetIdeSerial in ide21201.dll");
return FALSE;
}
CString strSerialNumber;// = SERIAL_NUMBER;
strSerialNumber = GetIdeSerial();
strSerialNumber.TrimLeft(" ");
if (strSerialNumber.Compare(SERIAL_NUMBER)!=0) {
AfxMessageBox("序列号错误");
return FALSE;
}
#else
CDlgLogin dlgLogin;
int nResponse = dlgLogin.DoModal();
if (nResponse!=1) return FALSE;
#endif
/*
CDialogShowInformation dlg;
dlg.DoModal();*/
int nResult;
m_bApp
1