⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 securitysystem.cpp

📁 网络游戏龙族 完整的登陆器 C++ 源代码
💻 CPP
字号:
// SecuritySystem.cpp: implementation of the CSecuritySystem class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "SecuritySystem.h"

#include "resource.h"
#include <atlbase.h>

#include "Common/Common.h"

#define ONE "0x3e28e1, 0xda26, 0x11e6, 0x1d, 0xd0, 0x1, 0xe0, 0x4c, 0x52, 0xf3, 0xe2"
#define MsgBox(msg) MessageBox(NULL, msg, "Dragonraja", MB_OK)

///////////////////////////////////////////////////////////////////////////////
// Construction/Destruction
///////////////////////////////////////////////////////////////////////////////

CSecuritySystem::CSecuritySystem()
{
	m_hSafeWnd = NULL;
}

CSecuritySystem::~CSecuritySystem()
{
	Disconnect();
}

///////////////////////////////////////////////////////////////////////////////
// Public Methdo
///////////////////////////////////////////////////////////////////////////////

int CSecuritySystem::Connect(HWND hWnd)
{
	HANDLE hObject = ::CreateMutex(NULL, FALSE, ONE);

	if (GetLastError() == ERROR_ALREADY_EXISTS)
	{
		::CloseHandle(hObject);
		return -1;
	}

	TCHAR szTempPath[_MAX_PATH];
    DWORD dwResult = ::GetTempPath(_MAX_PATH, szTempPath);
    Dbg_Assert(dwResult);
	
    UINT nResult = ::GetTempFileName(szTempPath, _T ("~Dr"), 0, m_szTempName);
    Dbg_Assert(nResult);

	::DeleteFile(m_szTempName);	
	
	if (!MakeExeFile(IDR_ETC_DATA1, m_szTempName))
	{	
		MsgBox("Run Error! \nERR.CODE.00-200!");
		return -2;
	}

	char szTemp[24];
	//盢纒壁HWND肚患

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -