init
This commit is contained in:
2488
Servers/服务器组件/登录服务器/AttemperEngineSink.cpp
Normal file
2488
Servers/服务器组件/登录服务器/AttemperEngineSink.cpp
Normal file
File diff suppressed because it is too large
Load Diff
235
Servers/服务器组件/登录服务器/AttemperEngineSink.h
Normal file
235
Servers/服务器组件/登录服务器/AttemperEngineSink.h
Normal file
@@ -0,0 +1,235 @@
|
||||
#ifndef ATTEMPER_ENGINE_SINK_HEAD_FILE
|
||||
#define ATTEMPER_ENGINE_SINK_HEAD_FILE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Stdafx.h"
|
||||
#include "InitParameter.h"
|
||||
#include "ServerListManager.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//数据定义
|
||||
|
||||
//连接类型
|
||||
#define CLIENT_KIND_FALSH 1 //网页类型
|
||||
#define CLIENT_KIND_MOBILE 2 //手机类型
|
||||
#define CLIENT_KIND_COMPUTER 3 //电脑类型
|
||||
|
||||
//绑定参数
|
||||
struct tagBindParameter
|
||||
{
|
||||
//网络参数
|
||||
DWORD dwSocketID; //网络标识
|
||||
DWORD dwClientAddr; //连接地址
|
||||
DWORD dwActiveTime; //激活时间
|
||||
|
||||
//连接信息
|
||||
WORD wModuleID; //模块标识
|
||||
BYTE cbClientKind; //连接类型
|
||||
DWORD dwPlazaVersion; //大厅版本
|
||||
};
|
||||
|
||||
//低保参数
|
||||
struct tagBaseEnsureParameter
|
||||
{
|
||||
SCORE lScoreCondition; //游戏币条件
|
||||
SCORE lScoreAmount; //游戏币数量
|
||||
BYTE cbTakeTimes; //领取次数
|
||||
};
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//调度钩子
|
||||
class CAttemperEngineSink : public IAttemperEngineSink
|
||||
{
|
||||
//友元定义
|
||||
friend class CServiceUnits;
|
||||
|
||||
//状态变量
|
||||
protected:
|
||||
bool m_bNeekCorrespond; //协调标志
|
||||
bool m_bShowServerStatus; //显示服务器状态
|
||||
|
||||
//变量定义
|
||||
protected:
|
||||
CInitParameter * m_pInitParameter; //配置参数
|
||||
tagBindParameter * m_pBindParameter; //辅助数组
|
||||
|
||||
//组件变量
|
||||
protected:
|
||||
CServerListManager m_ServerListManager; //列表管理
|
||||
CMD_GP_CheckInInfo m_kCheckInInfo; //签到奖励
|
||||
CMD_GP_BeginnerInfo m_kBeginnerInfo; //新手活动
|
||||
CMD_GP_BackAddBankAwardInfo m_BackAddBankAwardInfo; //赚金榜奖励
|
||||
tagBaseEnsureParameter m_BaseEnsureParameter; //低保参数
|
||||
//组件接口
|
||||
protected:
|
||||
ITimerEngine * m_pITimerEngine; //时间引擎
|
||||
IDataBaseEngine * m_pIDataBaseEngine; //数据引擎
|
||||
ITCPNetworkEngine * m_pITCPNetworkEngine; //网络引擎
|
||||
ITCPSocketService * m_pITCPSocketService; //协调服务
|
||||
|
||||
//视频配置
|
||||
protected:
|
||||
WORD m_wAVServerPort; //视频端口
|
||||
DWORD m_dwAVServerAddr; //视频地址
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CAttemperEngineSink();
|
||||
//析构函数
|
||||
virtual ~CAttemperEngineSink();
|
||||
|
||||
//基础接口
|
||||
public:
|
||||
//释放对象
|
||||
virtual VOID Release() { return; }
|
||||
//接口查询
|
||||
virtual VOID * QueryInterface(REFGUID Guid, DWORD dwQueryVer);
|
||||
|
||||
//异步接口
|
||||
public:
|
||||
//启动事件
|
||||
virtual bool OnAttemperEngineStart(IUnknownEx * pIUnknownEx);
|
||||
//停止事件
|
||||
virtual bool OnAttemperEngineConclude(IUnknownEx * pIUnknownEx);
|
||||
|
||||
//事件接口
|
||||
public:
|
||||
//控制事件
|
||||
virtual bool OnEventControl(WORD wIdentifier, VOID * pData, WORD wDataSize);
|
||||
//自定事件
|
||||
virtual bool OnEventAttemperData(WORD wRequestID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//内核事件
|
||||
public:
|
||||
//时间事件
|
||||
virtual bool OnEventTimer(DWORD dwTimerID, WPARAM wBindParam);
|
||||
//数据库事件
|
||||
virtual bool OnEventDataBase(WORD wRequestID, DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//连接事件
|
||||
public:
|
||||
//连接事件
|
||||
virtual bool OnEventTCPSocketLink(WORD wServiceID, INT nErrorCode);
|
||||
//关闭事件
|
||||
virtual bool OnEventTCPSocketShut(WORD wServiceID, BYTE cbShutReason);
|
||||
//读取事件
|
||||
virtual bool OnEventTCPSocketRead(WORD wServiceID, TCP_Command Command, VOID * pData, WORD wDataSize);
|
||||
|
||||
//网络事件
|
||||
public:
|
||||
//应答事件
|
||||
virtual bool OnEventTCPNetworkBind(DWORD dwClientAddr, DWORD dwSocketID);
|
||||
//关闭事件
|
||||
virtual bool OnEventTCPNetworkShut(DWORD dwClientAddr, DWORD dwActiveTime, DWORD dwSocketID);
|
||||
//读取事件
|
||||
virtual bool OnEventTCPNetworkRead(TCP_Command Command, VOID * pData, WORD wDataSize, DWORD dwSocketID);
|
||||
|
||||
//连接处理
|
||||
protected:
|
||||
//注册事件
|
||||
bool OnTCPSocketMainRegister(WORD wSubCmdID, VOID * pData, WORD wDataSize);
|
||||
//服务信息
|
||||
bool OnTCPSocketMainServiceInfo(WORD wSubCmdID, VOID * pData, WORD wDataSize);
|
||||
//远程服务
|
||||
bool OnTCPSocketMainRemoteService(WORD wSubCmdID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//网络事件
|
||||
protected:
|
||||
//登录处理
|
||||
bool OnTCPNetworkMainPCLogon(WORD wSubCmdID, VOID * pData, WORD wDataSize, DWORD dwSocketID);
|
||||
//列表处理
|
||||
bool OnTCPNetworkMainPCServerList(WORD wSubCmdID, VOID * pData, WORD wDataSize, DWORD dwSocketID);
|
||||
//服务处理
|
||||
bool OnTCPNetworkMainPCUserService(WORD wSubCmdID, VOID * pData, WORD wDataSize, DWORD dwSocketID);
|
||||
//远程处理
|
||||
bool OnTCPNetworkMainPCRemoteService(WORD wSubCmdID, VOID * pData, WORD wDataSize, DWORD dwSocketID);
|
||||
|
||||
//网络事件
|
||||
protected:
|
||||
//帐号登录
|
||||
bool OnTCPNetworkSubPCLogonAccounts(VOID * pData, WORD wDataSize, DWORD dwSocketID);
|
||||
//帐号注册
|
||||
bool OnTCPNetworkSubPCRegisterAccounts(VOID * pData, WORD wDataSize, DWORD dwSocketID);
|
||||
|
||||
//游戏事件
|
||||
protected:
|
||||
//登录成功
|
||||
bool OnDBPCLogonSuccess(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//登录失败
|
||||
bool OnDBPCLogonFailure(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//用户信息
|
||||
bool OnDBPCUserIndividual(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//用户个人信息
|
||||
bool OnDBPCUserAccountInfo(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//游戏状态
|
||||
bool OnDBPCInGameSevrerID(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//微信分享成功
|
||||
bool OnDBPCUserWXShareReward(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//操作成功
|
||||
bool OnDBPCOperateSuccess(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//操作失败
|
||||
bool OnDBPCOperateFailure(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
VOID SendOperateFailure(DWORD dwContextID, LONG lResultCode, LPCTSTR pszDescribe);
|
||||
|
||||
//列表事件
|
||||
protected:
|
||||
//游戏种类
|
||||
bool OnDBPCGameTypeItem(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//游戏类型
|
||||
bool OnDBPCGameKindItem(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//游戏节点
|
||||
bool OnDBPCGameNodeItem(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//游戏定制
|
||||
bool OnDBPCGamePageItem(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//游戏列表
|
||||
bool OnDBPCGameListResult(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//游戏记录
|
||||
bool OnDBPCGameRecordList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//游戏记录
|
||||
bool OnDBPCGameRecordTotal(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//分享回放
|
||||
bool OnDBPCGameRecordChild(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//在那些比赛中;
|
||||
bool OnDBPCQueryInMatch(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//在工会中;
|
||||
bool OnDBPCQueryInUnion(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//所在工会列表;
|
||||
bool OnDBPCUnionList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//工会开放游戏列表;
|
||||
bool OnDBPCUnionGameList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//工会房间列表;
|
||||
bool OnDBPCUnionRoomList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//自动创建房间列表;
|
||||
bool OnDBPCAutoRoomList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//辅助函数
|
||||
protected:
|
||||
//版本检测
|
||||
bool CheckPlazaVersion(BYTE cbDeviceType, DWORD dwPlazaVersion, DWORD dwSocketID, bool bCheckLowVer=true);
|
||||
//发送请求
|
||||
bool SendUIControlPacket(WORD wRequestID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//发送列表
|
||||
protected:
|
||||
//发送类型
|
||||
VOID SendGameTypeInfo(DWORD dwSocketID);
|
||||
//发送种类
|
||||
VOID SendGameKindInfo(DWORD dwSocketID);
|
||||
//发送节点
|
||||
VOID SendGameNodeInfo(DWORD dwSocketID, WORD wKindID);
|
||||
//发送定制
|
||||
VOID SendGamePageInfo(DWORD dwSocketID, WORD wKindID);
|
||||
//发送房间
|
||||
VOID SendGameServerInfo(DWORD dwSocketID, WORD wKindID);
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
32
Servers/服务器组件/登录服务器/ControlPacket.h
Normal file
32
Servers/服务器组件/登录服务器/ControlPacket.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef CONTROL_PACKET_HEAD_FILE
|
||||
#define CONTROL_PACKET_HEAD_FILE
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//事件结果
|
||||
#define ER_FAILURE 0 //失败标志
|
||||
#define ER_SUCCESS 1 //成功标志
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//界面数据包
|
||||
|
||||
#define UI_CORRESPOND_RESULT 1 //登录结果
|
||||
#define UI_LOAD_DB_LIST_RESULT 2 //列表成功
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//控制数据包
|
||||
|
||||
#define CT_CONNECT_CORRESPOND 100 //连接登录
|
||||
#define CT_LOAD_DB_GAME_LIST 101 //加载列表
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//控制结果
|
||||
struct CP_ControlResult
|
||||
{
|
||||
BYTE cbSuccess; //成功标志
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
1735
Servers/服务器组件/登录服务器/DataBaseEngineSink.cpp
Normal file
1735
Servers/服务器组件/登录服务器/DataBaseEngineSink.cpp
Normal file
File diff suppressed because it is too large
Load Diff
131
Servers/服务器组件/登录服务器/DataBaseEngineSink.h
Normal file
131
Servers/服务器组件/登录服务器/DataBaseEngineSink.h
Normal file
@@ -0,0 +1,131 @@
|
||||
#ifndef DATABASE_ENGINE_SINK_HEAD_FILE
|
||||
#define DATABASE_ENGINE_SINK_HEAD_FILE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Stdafx.h"
|
||||
#include "InitParameter.h"
|
||||
#include "DataBasePacket.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//数据库类
|
||||
class CDataBaseEngineSink : public IDataBaseEngineSink
|
||||
{
|
||||
//友元定义
|
||||
friend class CServiceUnits;
|
||||
|
||||
//用户数据库
|
||||
protected:
|
||||
CDataBaseAide m_AccountsDBAide; //用户数据库
|
||||
CDataBaseHelper m_AccountsDBModule; //用户数据库
|
||||
|
||||
//游戏币数据库
|
||||
protected:
|
||||
CDataBaseAide m_TreasureDBAide; //游戏币数据库
|
||||
CDataBaseHelper m_TreasureDBModule; //游戏币数据库
|
||||
|
||||
//平台数据库
|
||||
protected:
|
||||
CDataBaseAide m_PlatformDBAide; //平台数据库
|
||||
CDataBaseHelper m_PlatformDBModule; //平台数据库
|
||||
|
||||
//组件变量
|
||||
protected:
|
||||
CInitParameter * m_pInitParameter; //配置参数
|
||||
IDataBaseEngineEvent * m_pIDataBaseEngineEvent; //数据事件
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CDataBaseEngineSink();
|
||||
//析构函数
|
||||
virtual ~CDataBaseEngineSink();
|
||||
|
||||
//基础接口
|
||||
public:
|
||||
//释放对象
|
||||
virtual VOID Release() { return; }
|
||||
//接口查询
|
||||
virtual VOID * QueryInterface(REFGUID Guid, DWORD dwQueryVer);
|
||||
|
||||
//系统事件
|
||||
public:
|
||||
//启动事件
|
||||
virtual bool OnDataBaseEngineStart(IUnknownEx * pIUnknownEx);
|
||||
//停止事件
|
||||
virtual bool OnDataBaseEngineConclude(IUnknownEx * pIUnknownEx);
|
||||
|
||||
//内核事件
|
||||
public:
|
||||
//时间事件
|
||||
virtual bool OnDataBaseEngineTimer(DWORD dwTimerID, WPARAM dwBindParameter);
|
||||
//控制事件
|
||||
virtual bool OnDataBaseEngineControl(WORD wControlID, VOID * pData, WORD wDataSize);
|
||||
//请求事件
|
||||
virtual bool OnDataBaseEngineRequest(WORD wRequestID, DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//登录服务
|
||||
protected:
|
||||
//帐号登录
|
||||
bool OnRequestLogonAccounts(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//帐号注册
|
||||
bool OnRequestRegisterAccounts(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//账号服务
|
||||
protected:
|
||||
//修改机器
|
||||
bool OnRequestModifyMachine(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//修改密码
|
||||
bool OnRequestModifyLogonPass(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//修改资料
|
||||
bool OnRequestModifyIndividual(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//获得游戏状态
|
||||
bool OnRequestUserInGameServerID(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//微信分享成功
|
||||
bool OnRequestUserWXShareSuccess(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//信息查询
|
||||
protected:
|
||||
//查询个人信息
|
||||
bool OnRequestQueryAccountInfo(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//查询资料
|
||||
bool OnRequestQueryIndividual(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//系统功能
|
||||
protected:
|
||||
//加载列表
|
||||
bool OnRequestLoadGameList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//在线信息
|
||||
bool OnRequestOnLineCountInfo(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//玩家在比赛中的信息;
|
||||
bool OnRequestQueryInMatch(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//玩家在工会中的信息;
|
||||
bool OnRequestQueryInUnion(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//获取工会列表;
|
||||
bool OnRequestGetUnionList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//获取工会房间列表;
|
||||
bool OnRequestGetUnionRoomList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//获取自动开房列表;
|
||||
bool OnRequestGetAutoRoomList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//游戏记录
|
||||
protected:
|
||||
//游戏记录
|
||||
bool OnRequestGameRecordList(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//游戏回放
|
||||
bool OnRequestGameTotalRecord(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
//分享码查询
|
||||
bool OnRequestGameChildRecord(DWORD dwContextID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//结果处理
|
||||
protected:
|
||||
//登录结果
|
||||
VOID OnLogonDisposeResult(DWORD dwContextID, DWORD dwErrorCode, LPCTSTR pszErrorString, bool bMobileClient);
|
||||
//操作结果
|
||||
VOID OnOperateDisposeResult(DWORD dwContextID, DWORD dwErrorCode, LPCTSTR pszErrorString, bool bMobileClient);
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
104
Servers/服务器组件/登录服务器/DataBasePacket.h
Normal file
104
Servers/服务器组件/登录服务器/DataBasePacket.h
Normal file
@@ -0,0 +1,104 @@
|
||||
#ifndef DATA_BASE_PACKET_HEAD_FILE
|
||||
#define DATA_BASE_PACKET_HEAD_FILE
|
||||
|
||||
#include "DataBasePacketIn.h"
|
||||
#include "DataBasePacketInOut.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//手机数据包
|
||||
|
||||
//登录命令
|
||||
#define DBR_MB_LOGON_GAMEID 500 //I D 登录
|
||||
#define DBR_MB_LOGON_ACCOUNTS 501 //帐号登录
|
||||
#define DBR_MB_REGISTER_ACCOUNTS 502 //注册帐号
|
||||
#define DBR_GP_VISITOR_ACCOUNTS 503 //游客登录
|
||||
|
||||
//登录结果
|
||||
#define DBO_MB_LOGON_SUCCESS 600 //登录成功
|
||||
#define DBO_MB_LOGON_FAILURE 601 //登录失败
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//ID 登录
|
||||
struct DBR_MB_LogonGameID
|
||||
{
|
||||
//登录信息
|
||||
DWORD dwGameID; //用户 I D
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
TCHAR szMobilePhone[LEN_MOBILE_PHONE]; //电话号码
|
||||
|
||||
//连接信息
|
||||
LPVOID pBindParameter; //绑定参数
|
||||
};
|
||||
|
||||
//帐号登录
|
||||
struct DBR_MB_LogonAccounts
|
||||
{
|
||||
//登录信息
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
TCHAR szAccounts[LEN_ACCOUNTS]; //登录帐号
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
TCHAR szMobilePhone[LEN_MOBILE_PHONE]; //电话号码
|
||||
|
||||
//连接信息
|
||||
LPVOID pBindParameter; //绑定参数
|
||||
};
|
||||
|
||||
//帐号注册
|
||||
struct DBR_MB_RegisterAccounts
|
||||
{
|
||||
//注册信息
|
||||
WORD wFaceID; //头像标识
|
||||
BYTE cbGender; //用户性别
|
||||
TCHAR szAccounts[LEN_ACCOUNTS]; //登录帐号
|
||||
TCHAR szNickName[LEN_ACCOUNTS]; //用户昵称
|
||||
|
||||
//密码变量
|
||||
TCHAR szLogonPass[LEN_MD5]; //登录密码
|
||||
TCHAR szInsurePass[LEN_MD5]; //银行密码
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
TCHAR szMobilePhone[LEN_MOBILE_PHONE]; //电话号码
|
||||
|
||||
//连接信息
|
||||
LPVOID pBindParameter; //绑定参数
|
||||
};
|
||||
|
||||
//登录成功
|
||||
struct DBO_MB_LogonSuccess
|
||||
{
|
||||
//用户属性
|
||||
WORD wFaceID; //头像标识
|
||||
BYTE cbGender; //用户性别
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwGameID; //游戏 I D
|
||||
DWORD dwExperience; //经验数值
|
||||
DWORD dwLoveLiness; //用户魅力
|
||||
TCHAR szNickName[LEN_ACCOUNTS]; //用户昵称
|
||||
|
||||
//描述信息
|
||||
TCHAR szDescribeString[128]; //描述消息
|
||||
};
|
||||
|
||||
|
||||
//登录失败
|
||||
struct DBO_MB_LogonFailure
|
||||
{
|
||||
LONG lResultCode; //错误代码
|
||||
TCHAR szDescribeString[128]; //描述消息
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
570
Servers/服务器组件/登录服务器/DataBasePacketIn.h
Normal file
570
Servers/服务器组件/登录服务器/DataBasePacketIn.h
Normal file
@@ -0,0 +1,570 @@
|
||||
#ifndef DATA_BASE_PACKETIN_HEAD_FILE
|
||||
#define DATA_BASE_PACKETIN_HEAD_FILE
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//请求数据包
|
||||
|
||||
//登录命令
|
||||
#define DBR_GP_LOGON_GAMEID 1 //I D 登录
|
||||
#define DBR_GP_LOGON_ACCOUNTS 2 //帐号登录
|
||||
#define DBR_GP_REGISTER_ACCOUNTS 3 //注册帐号
|
||||
|
||||
//账号服务
|
||||
#define DBR_GP_MODIFY_MACHINE 10 //修改机器
|
||||
#define DBR_GP_MODIFY_LOGON_PASS 11 //修改密码
|
||||
#define DBR_GP_MODIFY_INSURE_PASS 12 //修改密码
|
||||
#define DBR_GP_MODIFY_UNDER_WRITE 13 //修改签名
|
||||
#define DBR_GP_MODIFY_INDIVIDUAL 14 //修改资料
|
||||
#define DBR_GP_MODIFY_ACCOUNTS 15 //修改帐号
|
||||
#define DBR_GP_MODIFY_SPREADER 16 //修改推荐人
|
||||
#define DBR_GP_QUERY_SPREADER 17 //查询推荐人昵称
|
||||
#define DBR_GP_ADD_SPREADER 18 //添加推荐人
|
||||
//头像命令
|
||||
#define DBR_GP_MODIFY_SYSTEM_FACE 20 //修改头像
|
||||
#define DBR_GP_MODIFY_CUSTOM_FACE 21 //修改头像
|
||||
|
||||
//银行命令
|
||||
#define DBR_GP_USER_SAVE_SCORE 30 //存入游戏币
|
||||
#define DBR_GP_USER_TAKE_SCORE 31 //提取游戏币
|
||||
#define DBR_GP_USER_TRANSFER_SCORE 32 //转账游戏币
|
||||
|
||||
//查询命令
|
||||
#define DBR_GP_QUERY_INDIVIDUAL 40 //查询资料
|
||||
#define DBR_GP_QUERY_INSURE_INFO 41 //查询银行
|
||||
#define DBR_GP_QUERY_USER_INFO 42 //查询用户
|
||||
#define DBR_GP_QUERY_ACCOUNTINFO 44 //查询资料
|
||||
#define DBR_GP_USER_INGAME_SERVERID 45 //游戏状态
|
||||
#define DBR_GP_USER_WXSHARE_SUCCESS 46 //微信分享成功
|
||||
|
||||
//系统命令
|
||||
#define DBR_GP_LOAD_GAME_LIST 50 //加载列表
|
||||
#define DBR_GP_ONLINE_COUNT_INFO 51 //在线信息
|
||||
|
||||
//比赛命令
|
||||
#define DBR_GP_MATCH_SIGNUP 55 //比赛报名
|
||||
#define DBR_GP_MATCH_UNSIGNUP 56 //取消报名
|
||||
#define DBR_GP_MATCH_AWARD 57 //比赛奖励
|
||||
#define DBR_GP_QUERY_IN_MATCH 58 //是否在比赛中
|
||||
|
||||
//签到命令
|
||||
#define DBR_GP_LOAD_CHECKIN_REWARD 60 //签到奖励
|
||||
#define DBR_GP_CHECKIN_DONE 61 //执行签到
|
||||
#define DBR_GP_CHECKIN_QUERY_INFO 62 //查询信息
|
||||
#define DBR_GP_CHECKIN_AWARD 64 //查询信息
|
||||
|
||||
#define DBR_GP_LOAD_BASEENSURE 70 //加载低保
|
||||
|
||||
#define DBR_GP_LOAD_BEGINNER 80 //加载新手引导
|
||||
#define DBR_GP_BEGINNER_QUERY_INFO 81 //查询新手引导
|
||||
#define DBR_GP_BEGINNER_DONE 82 //领取新手引导
|
||||
|
||||
//工会开房
|
||||
#define DBR_GP_QUERY_IN_UNION 90 //是否在工会
|
||||
#define DBR_GP_GET_UNION_LIST 91 //获取工会列表
|
||||
#define DBR_GP_GET_UNION_ROOM_LIST 92 //获取工会列表
|
||||
#define DBR_GP_GET_AUTO_ROOM_LIST 93 //获取工会列表
|
||||
|
||||
//低保命令
|
||||
#define DBR_GP_BASEENSURE_TAKE 100 //领取低保
|
||||
|
||||
//赚金排行
|
||||
#define DBR_GP_LOAD_ADDRANK_CONFIG 110 //更新
|
||||
#define DBO_GP_ADDRANK_UP_AWARD 111 //是否领取排行奖励
|
||||
#define DBR_GP_GET_ADDRANK 112 //获得排行
|
||||
|
||||
//游戏记录
|
||||
#define DBR_GP_GAME_RECORD_LIST 120 //游戏记录
|
||||
#define DBR_GP_GAME_TOTAL_RECORD 121 //游戏回放
|
||||
#define DBR_GP_GAME_CHILD_RECORD 122 //分享码查询
|
||||
|
||||
//兑换话费
|
||||
#define DBR_GP_GET_EXCHANGE_HUAFEI 130 //获得兑换话费列表
|
||||
|
||||
//商城
|
||||
#define DBR_GP_GET_SHOPINFO 140 //获得商城列表
|
||||
|
||||
//自定义字段查询
|
||||
#define DBR_GP_PUBLIC_NOTIC 200 //自定义字段查询
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//ID 登录
|
||||
struct DBR_GP_LogonGameID
|
||||
{
|
||||
//登录信息
|
||||
DWORD dwGameID; //用户 I D
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
BYTE cbNeeValidateMBCard; //密保校验
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
|
||||
//连接信息
|
||||
LPVOID pBindParameter; //绑定参数
|
||||
};
|
||||
|
||||
//帐号登录
|
||||
struct DBR_GP_LogonAccounts
|
||||
{
|
||||
//登录信息
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
TCHAR szAccounts[LEN_ACCOUNTS]; //登录帐号
|
||||
BYTE cbNeeValidateMBCard; //密保校验
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
TCHAR szOpenId[LEN_OPENID]; //
|
||||
TCHAR szUnionid[LEN_UNIONID];
|
||||
|
||||
//连接信息
|
||||
LPVOID pBindParameter; //绑定参数
|
||||
};
|
||||
|
||||
//游客登录
|
||||
struct DBR_GP_LogonVisitor
|
||||
{
|
||||
DWORD dwClientIP; //连接地址
|
||||
TCHAR szComputerID[LEN_MACHINE_ID]; //机器序列
|
||||
TCHAR szNickName[LEN_ACCOUNTS]; //人名
|
||||
TCHAR szPassWord[LEN_MD5]; //登录密码
|
||||
TCHAR szPassWordBank[LEN_MD5]; //登录密码
|
||||
TCHAR szSpreader[LEN_ACCOUNTS]; //推荐帐号
|
||||
WORD wFaceID; //注册头像
|
||||
BYTE cbGender; //用户性别
|
||||
LPVOID pBindParameter; //绑定参数
|
||||
};
|
||||
|
||||
//帐号注册
|
||||
struct DBR_GP_RegisterAccounts
|
||||
{
|
||||
//注册信息
|
||||
WORD wFaceID; //头像标识
|
||||
BYTE cbGender; //用户性别
|
||||
TCHAR szOpenId[LEN_OPENID]; //
|
||||
TCHAR szUnionid[LEN_UNIONID];
|
||||
TCHAR szAccounts[LEN_ACCOUNTS]; //登录帐号
|
||||
TCHAR szNickName[LEN_ACCOUNTS]; //用户昵称
|
||||
TCHAR szSpreader[LEN_ACCOUNTS]; //推荐帐号
|
||||
TCHAR szPassPortID[LEN_PASS_PORT_ID]; //证件号码
|
||||
TCHAR szCompellation[LEN_COMPELLATION]; //真实名字
|
||||
|
||||
//密码变量
|
||||
TCHAR szLogonPass[LEN_MD5]; //登录密码
|
||||
TCHAR szInsurePass[LEN_MD5]; //银行密码
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
|
||||
//连接信息
|
||||
LPVOID pBindParameter; //绑定参数
|
||||
};
|
||||
|
||||
//修改机器
|
||||
struct DBR_GP_ModifyMachine
|
||||
{
|
||||
BYTE cbBind; //绑定标志
|
||||
DWORD dwUserID; //用户标识
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szPassword[LEN_PASSWORD]; //用户密码
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
//修改密码
|
||||
struct DBR_GP_ModifyLogonPass
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szDesPassword[LEN_PASSWORD]; //用户密码
|
||||
TCHAR szScrPassword[LEN_PASSWORD]; //用户密码
|
||||
};
|
||||
|
||||
//修改密码
|
||||
struct DBR_GP_ModifyInsurePass
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szDesPassword[LEN_PASSWORD]; //用户密码
|
||||
TCHAR szScrPassword[LEN_PASSWORD]; //用户密码
|
||||
};
|
||||
|
||||
//修改密码
|
||||
struct DBR_GP_ModifyAccounts
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szScrPassword[LEN_PASSWORD]; //用户密码
|
||||
TCHAR szDesAccount[LEN_ACCOUNTS]; //用户帐号
|
||||
};
|
||||
|
||||
//修改推荐人
|
||||
struct DBR_GP_ModifySpreader
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szPassword[LEN_PASSWORD]; //用户密码
|
||||
TCHAR szSpreader[LEN_ACCOUNTS]; //用户帐号
|
||||
};
|
||||
|
||||
//修改签名
|
||||
struct DBR_GP_ModifyUnderWrite
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szPassword[LEN_PASSWORD]; //用户密码
|
||||
TCHAR szUnderWrite[LEN_UNDER_WRITE]; //个性签名
|
||||
};
|
||||
|
||||
//修改头像
|
||||
struct DBR_GP_ModifySystemFace
|
||||
{
|
||||
//用户信息
|
||||
WORD wFaceID; //头像标识
|
||||
DWORD dwUserID; //用户 I D
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
|
||||
//机器信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
//修改头像
|
||||
struct DBR_GP_ModifyCustomFace
|
||||
{
|
||||
//用户信息
|
||||
DWORD dwUserID; //用户 I D
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
DWORD dwCustomFace[FACE_CX*FACE_CY]; //图片信息
|
||||
|
||||
//机器信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
//修改资料
|
||||
struct DBR_GP_ModifyIndividual
|
||||
{
|
||||
//验证资料
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szPassword[LEN_PASSWORD]; //用户密码
|
||||
|
||||
//帐号资料
|
||||
BYTE cbGender; //用户性别
|
||||
TCHAR szNickName[LEN_NICKNAME]; //用户昵称
|
||||
TCHAR szUnderWrite[LEN_UNDER_WRITE]; //个性签名
|
||||
|
||||
//用户信息
|
||||
TCHAR szUserNote[LEN_USER_NOTE]; //用户说明
|
||||
TCHAR szCompellation[LEN_COMPELLATION]; //真实名字
|
||||
|
||||
//电话号码
|
||||
TCHAR szSeatPhone[LEN_SEAT_PHONE]; //固定电话
|
||||
TCHAR szMobilePhone[LEN_MOBILE_PHONE]; //移动电话
|
||||
|
||||
//联系资料
|
||||
TCHAR szQQ[LEN_QQ]; //Q Q 号码
|
||||
TCHAR szEMail[LEN_EMAIL]; //电子邮件
|
||||
TCHAR szDwellingPlace[LEN_DWELLING_PLACE];//联系地址
|
||||
|
||||
TCHAR szHeadHttp[LEN_USER_NOTE]; //头像HTTP
|
||||
TCHAR szUserChannel[LEN_NICKNAME]; //渠道号
|
||||
};
|
||||
|
||||
//查询用户游戏状态
|
||||
struct DBR_GP_QueryUserInGameServerID
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
};
|
||||
|
||||
//微信分享成功
|
||||
struct DBR_GP_WXShareSuccess
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
TCHAR szPassword[LEN_PASSWORD]; //用户密码
|
||||
};
|
||||
|
||||
//查询资料
|
||||
struct DBR_GP_QueryIndividual
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
};
|
||||
|
||||
//查询个人信息
|
||||
struct DBR_GP_QueryAccountInfo
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
};
|
||||
|
||||
//存入游戏币
|
||||
struct DBR_GP_UserSaveScore
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
SCORE lSaveScore; //存入游戏币
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
//取出游戏币
|
||||
struct DBR_GP_UserTakeScore
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
SCORE lTakeScore; //提取游戏币
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szPassword[LEN_PASSWORD]; //银行密码
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
//转账游戏币
|
||||
struct DBR_GP_UserTransferScore
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
BYTE cbByNickName; //昵称赠送
|
||||
SCORE lTransferScore; //转账游戏币
|
||||
TCHAR szNickName[LEN_NICKNAME]; //用户昵称
|
||||
TCHAR szPassword[LEN_PASSWORD]; //银行密码
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
//查询银行
|
||||
struct DBR_GP_QueryInsureInfo
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwClientAddr; //连接地址
|
||||
};
|
||||
|
||||
//查询用户
|
||||
struct DBR_GP_QueryInsureUserInfo
|
||||
{
|
||||
BYTE cbByNickName; //昵称赠送
|
||||
TCHAR szNickName[LEN_NICKNAME]; //目标用户
|
||||
};
|
||||
|
||||
//用户资料
|
||||
struct DBO_GP_UserTransferUserInfo
|
||||
{
|
||||
DWORD dwGameID; //用户 I D
|
||||
TCHAR szNickName[LEN_NICKNAME]; //帐号昵称
|
||||
};
|
||||
|
||||
//在线信息
|
||||
struct DBR_GP_OnLineCountInfo
|
||||
{
|
||||
WORD wKindCount; //类型数目
|
||||
DWORD dwOnLineCountSum; //总在线数
|
||||
tagOnLineInfoKind OnLineCountKind[MAX_KIND]; //类型在线
|
||||
};
|
||||
|
||||
//查询签到
|
||||
struct DBR_GP_CheckInQueryInfo
|
||||
{
|
||||
DWORD dwUserID; //用户标识
|
||||
TCHAR szPassword[LEN_PASSWORD]; //登录密码
|
||||
};
|
||||
|
||||
//执行签到
|
||||
struct DBR_GP_CheckInDone
|
||||
{
|
||||
//用户信息
|
||||
DWORD dwUserID; //用户标识
|
||||
TCHAR szPassword[LEN_PASSWORD]; //登录密码
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//新手引导查询
|
||||
struct DBR_GP_BeginnerQueryInfo
|
||||
{
|
||||
DWORD dwUserID; //用户标识
|
||||
TCHAR szPassword[LEN_PASSWORD]; //登录密码
|
||||
};
|
||||
struct DBR_GP_BeginnerDone
|
||||
{
|
||||
//用户信息
|
||||
DWORD dwUserID; //用户标识
|
||||
TCHAR szPassword[LEN_PASSWORD]; //登录密码
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//低保参数
|
||||
struct DBO_GP_BaseEnsureParameter
|
||||
{
|
||||
SCORE lScoreCondition; //游戏币条件
|
||||
SCORE lScoreAmount; //游戏币数量
|
||||
BYTE cbTakeTimes; //领取次数
|
||||
};
|
||||
|
||||
//低保结果
|
||||
struct DBO_GP_BaseEnsureResult
|
||||
{
|
||||
bool bSuccessed; //成功标识
|
||||
SCORE lGameScore; //当前游戏币
|
||||
TCHAR szNotifyContent[128]; //提示内容
|
||||
};
|
||||
|
||||
//领取低保
|
||||
struct DBR_GP_TakeBaseEnsure
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
TCHAR szPassword[LEN_PASSWORD]; //登录密码
|
||||
|
||||
//附加信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
//报名结果
|
||||
struct DBO_GP_MatchSignupResult
|
||||
{
|
||||
bool bSignup; //报名标识
|
||||
bool bSuccessed; //成功标识
|
||||
TCHAR szDescribeString[128]; //描述信息
|
||||
};
|
||||
|
||||
|
||||
//加载奖励
|
||||
struct DBR_GR_LoadMatchReward
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwMatchID; //比赛标识
|
||||
DWORD dwMatchNO; //比赛场次
|
||||
};
|
||||
|
||||
//修改机器
|
||||
struct DBR_GP_PublicNotic
|
||||
{
|
||||
TCHAR szKeyName[LEN_NICKNAME]; //关键字
|
||||
};
|
||||
|
||||
/////////////////////////////////////
|
||||
//赚金榜
|
||||
struct DBR_GP_GetAddBankConfig
|
||||
{
|
||||
INT iIdex;
|
||||
};
|
||||
//获得排行榜
|
||||
struct DBR_GP_GetAddBank
|
||||
{
|
||||
//登录信息
|
||||
DWORD dwUserID; //用户 I D
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
INT iIdex;
|
||||
};
|
||||
|
||||
|
||||
//比赛报名
|
||||
struct DBR_GP_MatchSignup
|
||||
{
|
||||
//比赛信息
|
||||
WORD wServerID; //房间标识
|
||||
DWORD dwMatchID; //比赛标识
|
||||
DWORD dwMatchNO; //比赛场次
|
||||
|
||||
//用户信息
|
||||
DWORD dwUserID; //用户标识
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
|
||||
//机器信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
//比赛报名
|
||||
struct DBR_GP_MatchUnSignup
|
||||
{
|
||||
//比赛信息
|
||||
WORD wServerID; //房间标识
|
||||
DWORD dwMatchID; //比赛标识
|
||||
DWORD dwMatchNO; //比赛场次
|
||||
|
||||
//用户信息
|
||||
DWORD dwUserID; //用户标识
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
|
||||
//机器信息
|
||||
DWORD dwClientAddr; //连接地址
|
||||
TCHAR szMachineID[LEN_MACHINE_ID]; //机器序列
|
||||
};
|
||||
|
||||
|
||||
//游戏记录
|
||||
struct DBR_GP_GameRecordList
|
||||
{
|
||||
DWORD dwUserID;
|
||||
WORD wKindID;
|
||||
};
|
||||
|
||||
|
||||
//游戏回放
|
||||
struct DBR_GP_GetGameTotalRecord
|
||||
{
|
||||
DWORD dwUserID;
|
||||
DWORD dwRecordID;
|
||||
};
|
||||
|
||||
//话费兑换
|
||||
struct DBR_GP_GetExchangeHuaFei
|
||||
{
|
||||
//登录信息
|
||||
DWORD dwUserID; //用户 I D
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
};
|
||||
|
||||
//话费兑换
|
||||
struct DBR_GP_GetShopInfo
|
||||
{
|
||||
//登录信息
|
||||
DWORD dwUserID; //用户 I D
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
};
|
||||
|
||||
//玩家在比赛中报名信息;
|
||||
struct DBR_GP_QueryInMatch
|
||||
{
|
||||
DWORD dwUserID;
|
||||
};
|
||||
|
||||
//游戏状态
|
||||
struct DBR_GP_UserInUnion
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwUnionCode; //用户 I D
|
||||
};
|
||||
|
||||
//游戏状态
|
||||
struct DBR_GP_GetUnionList
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
};
|
||||
|
||||
struct DBR_GP_GetUnionRoomList
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
DWORD dwUnionCode; //工会ID;
|
||||
};
|
||||
|
||||
struct DBR_GP_GetAutoRoomList
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
};
|
||||
|
||||
//删除代开信息
|
||||
struct DBR_GP_DelAutoRoomInfo
|
||||
{
|
||||
DWORD dwIndex; //用户 I D
|
||||
};
|
||||
|
||||
#endif
|
||||
509
Servers/服务器组件/登录服务器/DataBasePacketInOut.h
Normal file
509
Servers/服务器组件/登录服务器/DataBasePacketInOut.h
Normal file
@@ -0,0 +1,509 @@
|
||||
#ifndef DATA_BASE_PACKETOUT_HEAD_FILE
|
||||
#define DATA_BASE_PACKETOUT_HEAD_FILE
|
||||
|
||||
#include "..\..\全局定义\datastream.h"
|
||||
|
||||
#pragma pack(1)
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//输出信息
|
||||
|
||||
//登录结果
|
||||
#define DBO_GP_LOGON_SUCCESS 100 //登录成功
|
||||
#define DBO_GP_LOGON_FAILURE 101 //登录失败
|
||||
#define DBR_GP_VALIDATE_MBCARD 102 //登录失败
|
||||
|
||||
//操作结果
|
||||
#define DBO_GP_USER_FACE_INFO 110 //用户头像
|
||||
#define DBO_GP_USER_INDIVIDUAL 111 //用户资料
|
||||
#define DBO_GP_USER_ACCOUNTINFO 112 //用户信息
|
||||
|
||||
//银行命令
|
||||
#define DBO_GP_USER_INSURE_INFO 120 //银行资料
|
||||
#define DBO_GP_USER_INSURE_SUCCESS 121 //银行成功
|
||||
#define DBO_GP_USER_INSURE_FAILURE 122 //银行失败
|
||||
#define DBO_GP_USER_INSURE_USER_INFO 123 //用户资料
|
||||
#define DBO_GP_USER_INGAME_SERVER_ID 124 //用户游戏状态
|
||||
#define DBO_GP_USER_WXSHARE_REWARD 125 //微信分享成功奖励
|
||||
|
||||
//列表结果
|
||||
#define DBO_GP_GAME_TYPE_ITEM 130 //种类信息
|
||||
#define DBO_GP_GAME_KIND_ITEM 131 //类型信息
|
||||
#define DBO_GP_GAME_NODE_ITEM 132 //节点信息
|
||||
#define DBO_GP_GAME_PAGE_ITEM 133 //定制信息
|
||||
#define DBO_GP_GAME_LIST_RESULT 134 //加载结果
|
||||
|
||||
//签到命令
|
||||
#define DBO_GP_CHECKIN_REWARD 160 //签到奖励
|
||||
#define DBO_GP_CHECKIN_INFO 161 //签到信息
|
||||
#define DBO_GP_CHECKIN_RESULT 162 //签到结果
|
||||
|
||||
|
||||
#define DBO_GP_BASEENSURE_PARAMETER 180 //低保参数
|
||||
#define DBO_GP_BASEENSURE_RESULT 181 //领取结果
|
||||
//报名结果
|
||||
#define DBO_GP_MATCH_SIGNUP_RESULT 190 //报名结果
|
||||
#define DBO_GP_MATCH_AWARD 191 //比赛奖励
|
||||
#define DBO_GP_QueryInMatch 192 //在那些比赛中;
|
||||
#define DBO_GP_QueryInUnion 193 //在不在工会;
|
||||
#define DBO_GP_UnionList 194 //所在工会列表;
|
||||
#define DBO_GP_UnionGameList 195 //工会欢乐场游戏列表;
|
||||
#define DBO_GP_UnionRoomList 196 //所在工会列表;
|
||||
#define DBO_GP_AutoRoomList 197 //所在工会列表;
|
||||
|
||||
//服务结果
|
||||
#define DBO_GP_PUBLIC_NOTICE 200 //操作成功
|
||||
|
||||
//新手活动命令
|
||||
#define DBO_GP_BEGINNER_CONFIG 210 //新手活动奖励
|
||||
#define DBO_GP_BEGINNER_INFO 211 //新手活动信息
|
||||
#define DBO_GP_BEGINNER_RESULT 212 //新手活动结果
|
||||
|
||||
//设置推荐人结果
|
||||
#define DBO_GP_SPREADER_RESOULT 220 //设置推荐人结果
|
||||
|
||||
//赚金榜
|
||||
#define DBO_GP_ADDRANK_AWARD_CONFIG 240 //配置
|
||||
#define DBO_GP_ADDRANK_RANK_BACK 241 //排行结果
|
||||
|
||||
//游戏记录
|
||||
#define DBO_GP_GAME_RECORD_LIST 250 //记录列表
|
||||
#define DBO_GP_GAME_RECORD_TOTAL 251 //排行结果
|
||||
#define DBO_GP_GAME_RECORD_CHILD 252 //分享回放
|
||||
|
||||
//兑换话费
|
||||
#define DBO_GP_EXCHAGE_HUAFEI_BACK 260 //兑换话费列表
|
||||
|
||||
//商城信息
|
||||
#define DBO_GP_SHOPINFO_BACK 270 //商城列表
|
||||
|
||||
//服务结果
|
||||
#define DBO_GP_OPERATE_SUCCESS 500 //操作成功
|
||||
#define DBO_GP_OPERATE_FAILURE 501 //操作失败
|
||||
|
||||
|
||||
|
||||
//登录成功
|
||||
struct DBO_GP_LogonSuccess
|
||||
{
|
||||
//属性资料
|
||||
WORD wFaceID; //头像标识
|
||||
DWORD dwUserID; //用户标识
|
||||
DWORD dwGameID; //游戏标识
|
||||
DWORD dwGroupID; //社团标识
|
||||
DWORD dwCustomID; //自定索引
|
||||
DWORD dwUserMedal; //用户奖牌
|
||||
DWORD dwExperience; //经验数值
|
||||
DWORD dwLoveLiness; //用户魅力
|
||||
DWORD dwSpreaderID; //推广ID
|
||||
BYTE cbInsureEnabled; //银行使能
|
||||
BYTE cbWXShareTimes; //微信分享次数
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
TCHAR szAccounts[LEN_ACCOUNTS]; //登录帐号
|
||||
TCHAR szNickName[LEN_NICKNAME]; //用户昵称
|
||||
TCHAR szGroupName[LEN_GROUP_NAME]; //社团名字
|
||||
|
||||
//用户成绩
|
||||
SCORE lUserScore; //用户游戏币
|
||||
SCORE lUserInsure; //用户银行
|
||||
SCORE lGrade; //私人场经验
|
||||
bool isLottery; //今天是否参与摇奖;
|
||||
|
||||
//用户资料
|
||||
BYTE cbGender; //用户性别
|
||||
BYTE cbMoorMachine; //锁定机器
|
||||
TCHAR szUnderWrite[LEN_UNDER_WRITE]; //个性签名
|
||||
|
||||
//会员资料
|
||||
BYTE cbMemberOrder; //会员等级
|
||||
SYSTEMTIME MemberOverDate; //到期时间
|
||||
|
||||
//报名信息
|
||||
WORD wSignupCount; //报名数量
|
||||
tagSignupMatchInfo SignupMatchInfo[32]; //报名列表
|
||||
|
||||
//描述信息
|
||||
TCHAR szDescribeString[128]; //描述消息
|
||||
|
||||
|
||||
};
|
||||
|
||||
//登录失败
|
||||
struct DBO_GP_LogonFailure
|
||||
{
|
||||
LONG lResultCode; //错误代码
|
||||
TCHAR szDescribeString[128]; //描述消息
|
||||
};
|
||||
|
||||
//登录失败
|
||||
struct DBR_GP_ValidateMBCard
|
||||
{
|
||||
UINT uMBCardID; //机器序列
|
||||
};
|
||||
|
||||
//头像信息
|
||||
struct DBO_GP_UserFaceInfo
|
||||
{
|
||||
WORD wFaceID; //头像标识
|
||||
DWORD dwCustomID; //自定索引
|
||||
};
|
||||
|
||||
//个人资料
|
||||
struct DBO_GP_UserIndividual
|
||||
{
|
||||
//用户信息
|
||||
DWORD dwUserID; //用户 I D
|
||||
TCHAR szUserNote[LEN_USER_NOTE]; //用户说明
|
||||
TCHAR szCompellation[LEN_COMPELLATION]; //真实名字
|
||||
|
||||
//电话号码
|
||||
TCHAR szSeatPhone[LEN_SEAT_PHONE]; //固定电话
|
||||
TCHAR szMobilePhone[LEN_MOBILE_PHONE]; //移动电话
|
||||
|
||||
//联系资料
|
||||
TCHAR szQQ[LEN_QQ]; //Q Q 号码
|
||||
TCHAR szEMail[LEN_EMAIL]; //电子邮件
|
||||
TCHAR szDwellingPlace[LEN_DWELLING_PLACE];//联系地址
|
||||
TCHAR szHeadHttp[LEN_USER_NOTE]; //头像
|
||||
TCHAR szLogonIP[LEN_NICKNAME]; //IP
|
||||
TCHAR szUserChannel[LEN_NICKNAME]; //渠道号
|
||||
};
|
||||
|
||||
|
||||
//个人信息
|
||||
struct DBO_GP_UserAccountInfo
|
||||
{
|
||||
//属性资料
|
||||
WORD wFaceID; //头像标识
|
||||
DWORD dwUserID; //用户标识
|
||||
DWORD dwGameID; //游戏标识
|
||||
DWORD dwGroupID; //社团标识
|
||||
DWORD dwCustomID; //自定索引
|
||||
DWORD dwUserMedal; //用户奖牌
|
||||
DWORD dwExperience; //经验数值
|
||||
DWORD dwLoveLiness; //用户魅力
|
||||
DWORD dwSpreaderID; //推广ID
|
||||
TCHAR szPassword[LEN_MD5]; //登录密码
|
||||
TCHAR szAccounts[LEN_ACCOUNTS]; //登录帐号
|
||||
TCHAR szNickName[LEN_NICKNAME]; //用户昵称
|
||||
TCHAR szGroupName[LEN_GROUP_NAME]; //社团名字
|
||||
TCHAR szLogonIp[LEN_ACCOUNTS]; //登录IP
|
||||
|
||||
//用户成绩
|
||||
SCORE lUserScore; //用户游戏币
|
||||
SCORE lUserInsure; //用户银行
|
||||
SCORE lGrade; //私人场经验
|
||||
|
||||
//用户资料
|
||||
BYTE cbGender; //用户性别
|
||||
BYTE cbMoorMachine; //锁定机器
|
||||
TCHAR szUnderWrite[LEN_UNDER_WRITE]; //个性签名
|
||||
|
||||
//会员资料
|
||||
BYTE cbMemberOrder; //会员等级
|
||||
SYSTEMTIME MemberOverDate; //到期时间
|
||||
};
|
||||
//银行资料
|
||||
struct DBO_GP_UserInsureInfo
|
||||
{
|
||||
WORD wRevenueTake; //税收比例
|
||||
WORD wRevenueTransfer; //税收比例
|
||||
WORD wServerID; //房间标识
|
||||
SCORE lUserScore; //用户游戏币
|
||||
SCORE lUserInsure; //银行游戏币
|
||||
SCORE lTransferPrerequisite; //转账条件
|
||||
};
|
||||
|
||||
//银行成功
|
||||
struct DBO_GP_UserInsureSuccess
|
||||
{
|
||||
DWORD dwUserID; //用户 I D
|
||||
SCORE lSourceScore; //原来游戏币
|
||||
SCORE lSourceInsure; //原来游戏币
|
||||
SCORE lInsureRevenue; //银行税收
|
||||
SCORE lDestScore; //游戏币变化
|
||||
SCORE lDestInsure; //银行变化
|
||||
TCHAR szDescribeString[128]; //描述消息
|
||||
};
|
||||
|
||||
//银行失败
|
||||
struct DBO_GP_UserInsureFailure
|
||||
{
|
||||
LONG lResultCode; //操作代码
|
||||
TCHAR szDescribeString[128]; //描述消息
|
||||
};
|
||||
|
||||
//设置推荐人结果
|
||||
struct DBO_GP_SpreaderResoult
|
||||
{
|
||||
LONG lResultCode; //操作代码
|
||||
SCORE lScore; //操作代码
|
||||
TCHAR szDescribeString[128]; //成功消息
|
||||
};
|
||||
|
||||
//操作失败
|
||||
struct DBO_GP_OperateFailure
|
||||
{
|
||||
LONG lResultCode; //操作代码
|
||||
TCHAR szDescribeString[128]; //描述消息
|
||||
};
|
||||
|
||||
//操作成功
|
||||
struct DBO_GP_OperateSuccess
|
||||
{
|
||||
LONG lResultCode; //操作代码
|
||||
TCHAR szDescribeString[128]; //成功消息
|
||||
};
|
||||
|
||||
|
||||
//操作成功
|
||||
struct DBO_GP_InUnion
|
||||
{
|
||||
BYTE cbResultCode;
|
||||
DWORD dwUnionCode;
|
||||
TCHAR szDescribeString[128]; //错误消息
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//游戏类型
|
||||
struct DBO_GP_GameType
|
||||
{
|
||||
WORD wJoinID; //挂接索引
|
||||
WORD wSortID; //排序索引
|
||||
WORD wTypeID; //类型索引
|
||||
TCHAR szTypeName[LEN_TYPE]; //种类名字
|
||||
};
|
||||
|
||||
//游戏种类
|
||||
struct DBO_GP_GameKind
|
||||
{
|
||||
WORD wTypeID; //类型索引
|
||||
WORD wJoinID; //挂接索引
|
||||
WORD wSortID; //排序索引
|
||||
WORD wKindID; //类型索引
|
||||
WORD wGameID; //模块索引
|
||||
TCHAR szKindName[LEN_KIND]; //游戏名字
|
||||
TCHAR szProcessName[LEN_PROCESS]; //进程名字
|
||||
};
|
||||
|
||||
//游戏节点
|
||||
struct DBO_GP_GameNode
|
||||
{
|
||||
WORD wKindID; //名称索引
|
||||
WORD wJoinID; //挂接索引
|
||||
WORD wSortID; //排序索引
|
||||
WORD wNodeID; //节点索引
|
||||
TCHAR szNodeName[LEN_NODE]; //节点名称
|
||||
};
|
||||
|
||||
//定制类型
|
||||
struct DBO_GP_GamePage
|
||||
{
|
||||
WORD wKindID; //名称索引
|
||||
WORD wNodeID; //节点索引
|
||||
WORD wSortID; //排序索引
|
||||
WORD wPageID; //定制索引
|
||||
WORD wOperateType; //控制类型
|
||||
TCHAR szDisplayName[LEN_PAGE]; //显示名称
|
||||
};
|
||||
|
||||
//加载结果
|
||||
struct DBO_GP_GameListResult
|
||||
{
|
||||
BYTE cbSuccess; //成功标志
|
||||
};
|
||||
|
||||
//签到奖励
|
||||
struct DBO_GP_CheckInReward
|
||||
{
|
||||
SCORE lRewardGold[LEN_SIGIN]; //奖励金额
|
||||
BYTE lRewardType[LEN_SIGIN]; //奖励类型 1金币 2道具
|
||||
BYTE lRewardDay[LEN_SIGIN]; //奖励天数
|
||||
};
|
||||
|
||||
//签到信息
|
||||
struct DBO_GP_CheckInInfo
|
||||
{
|
||||
WORD wSeriesDate; //连续日期
|
||||
WORD wAwardDate; //物品日期
|
||||
bool bTodayChecked; //签到标识
|
||||
};
|
||||
|
||||
//签到结果
|
||||
struct DBO_GP_CheckInResult
|
||||
{
|
||||
bool bType; //是否是达到天数领取物品
|
||||
bool bSuccessed; //成功标识
|
||||
SCORE lScore; //当前分数
|
||||
TCHAR szNotifyContent[128]; //提示内容
|
||||
};
|
||||
|
||||
//新手引导信息
|
||||
struct DBO_GP_BeginnerInfo
|
||||
{
|
||||
WORD wSeriesDate; //连续日期
|
||||
bool bTodayChecked; //签到标识
|
||||
bool bLastCheckIned; //签到标识
|
||||
};
|
||||
|
||||
//查询结果
|
||||
struct DBO_GP_UserInGameServerID
|
||||
{
|
||||
DWORD LockKindID;
|
||||
DWORD LockServerID;
|
||||
};
|
||||
|
||||
//查询结果
|
||||
struct DBO_GP_PublicNotice
|
||||
{
|
||||
LONG lResultCode; //操作代码
|
||||
TCHAR szDescribeString[512]; //成功消息
|
||||
};
|
||||
|
||||
//微信分享奖励
|
||||
struct DBO_GP_WXShareReward
|
||||
{
|
||||
DWORD dwUserID; //用户ID
|
||||
BYTE cbFKCount; //奖励房卡数量
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//新手活动配置
|
||||
struct DBO_GP_BeginnerCofig
|
||||
{
|
||||
SCORE lRewardGold[LEN_BEGINNER]; //奖励金额
|
||||
BYTE lRewardType[LEN_BEGINNER]; //奖励类型 1金币 2道具
|
||||
};
|
||||
//新手活动结果
|
||||
struct DBO_GP_BeginnerResult
|
||||
{
|
||||
bool bSuccessed; //成功标识
|
||||
SCORE lAwardCout; //奖励数量
|
||||
SCORE lAwardType; //奖励类型
|
||||
TCHAR szNotifyContent[128]; //提示内容
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//赚金榜
|
||||
struct DBO_GP_AddRankAwardConfig
|
||||
{
|
||||
INT iIdex;
|
||||
INT kRewardGold[LEN_ADDRANK];
|
||||
INT kRewardType[LEN_ADDRANK];
|
||||
};
|
||||
|
||||
struct DBO_GP_BackAddBank
|
||||
{
|
||||
int iRankIdex;
|
||||
std::vector<std::string> kNickName;
|
||||
std::vector<int> kUserID;
|
||||
std::vector<int> kFaceID;
|
||||
std::vector<int> kCustomID;
|
||||
std::vector<int> kUserPoint;
|
||||
|
||||
void StreamValue(DataStream& kData,bool bSend)
|
||||
{
|
||||
Stream_VALUE(iRankIdex);
|
||||
Stream_VALUE(kNickName);
|
||||
Stream_VALUE(kUserID);
|
||||
Stream_VALUE(kFaceID);
|
||||
Stream_VALUE(kCustomID);
|
||||
Stream_VALUE(kUserPoint);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
//兑换话费
|
||||
struct DBO_GP_BackExchangeHuaFei
|
||||
{
|
||||
std::vector<int> kExchangeID; //兑换id
|
||||
std::vector<int> kUseType; //兑换道具类型
|
||||
std::vector<int> kUseNum; //兑换道具个数
|
||||
std::vector<int> kGetType; //兑换商品类型
|
||||
std::vector<int> kGetNum; //兑换商品个数
|
||||
std::vector<std::string> kGoodsName; //兑换商品名称
|
||||
std::vector<std::string> kExchangeDesc; //兑换描述
|
||||
std::vector<std::string> kImgIcon; //图标名称
|
||||
std::vector<int> kFlag; //标记
|
||||
|
||||
void StreamValue(DataStream& kData,bool bSend)
|
||||
{
|
||||
Stream_VALUE(kExchangeID);
|
||||
Stream_VALUE(kUseType);
|
||||
Stream_VALUE(kUseNum);
|
||||
Stream_VALUE(kGetType);
|
||||
Stream_VALUE(kGetNum);
|
||||
Stream_VALUE(kGoodsName);
|
||||
Stream_VALUE(kExchangeDesc);
|
||||
Stream_VALUE(kImgIcon);
|
||||
Stream_VALUE(kFlag);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//商城列表
|
||||
struct DBO_GP_BackShopInfo
|
||||
{
|
||||
std::vector<int> kItemID; //商品id
|
||||
std::vector<int> kItemType; //商品类型
|
||||
std::vector<int> kOrderID_IOS; //商品订单号 苹果
|
||||
std::vector<int> kOrderID_Android; //商品订单号 安卓
|
||||
std::vector<int> kPrice; //商品价格
|
||||
std::vector<int> kGoodsNum; //商品数量
|
||||
std::vector<std::string> kItemTitle; //标题
|
||||
std::vector<std::string> kItemDesc; //描述
|
||||
std::vector<std::string> kItemIcon; //图标名称
|
||||
std::vector<std::string> kItemName; //商品名称
|
||||
|
||||
void StreamValue(DataStream& kData,bool bSend)
|
||||
{
|
||||
Stream_VALUE(kItemID);
|
||||
Stream_VALUE(kItemType);
|
||||
Stream_VALUE(kOrderID_IOS);
|
||||
Stream_VALUE(kOrderID_Android);
|
||||
Stream_VALUE(kPrice);
|
||||
Stream_VALUE(kGoodsNum);
|
||||
Stream_VALUE(kItemTitle);
|
||||
Stream_VALUE(kItemDesc);
|
||||
Stream_VALUE(kItemIcon);
|
||||
Stream_VALUE(kItemName);
|
||||
}
|
||||
};
|
||||
|
||||
//排行信息
|
||||
struct tagDBMatchAwardkInfo
|
||||
{
|
||||
WORD MatchRank; //比赛名次
|
||||
SCORE RewardGold; //奖励金币
|
||||
DWORD RewardMedal; //奖励元宝
|
||||
DWORD RewardExperience; //奖励经验
|
||||
void StreamValue(DataStream& kData,bool bSend)
|
||||
{
|
||||
Stream_VALUE(MatchRank);
|
||||
Stream_VALUE(RewardGold);
|
||||
Stream_VALUE(RewardMedal);
|
||||
Stream_VALUE(RewardExperience);
|
||||
}
|
||||
};
|
||||
|
||||
//比赛奖励
|
||||
struct DBO_GR_MatchAwardList
|
||||
{
|
||||
DWORD dwMatchID; //比赛标识
|
||||
DWORD dwMatchNO; //比赛场次
|
||||
std::vector<tagDBMatchAwardkInfo> kAwards;
|
||||
|
||||
void StreamValue(DataStream& kData,bool bSend)
|
||||
{
|
||||
Stream_VALUE(dwMatchID);
|
||||
Stream_VALUE(dwMatchNO);
|
||||
StructVecotrMember(tagDBMatchAwardkInfo,kAwards);
|
||||
}
|
||||
};
|
||||
#pragma pack()
|
||||
#endif
|
||||
26
Servers/服务器组件/登录服务器/Debug/LogonServer.Build.CppClean.log
Normal file
26
Servers/服务器组件/登录服务器/Debug/LogonServer.Build.CppClean.log
Normal file
@@ -0,0 +1,26 @@
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\logonserver.pch
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\vc120.pdb
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\vc120.idb
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\stdafx.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\attemperenginesink.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\databaseenginesink.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\initparameter.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\logonserver.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\logonserverdlg.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\serverlistmanager.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\serviceunits.obj
|
||||
h:\git\wnmj\wnmj\运行\debug\ansi\logonserver.ilk
|
||||
h:\git\wnmj\wnmj\运行\debug\ansi\logonserver.exe
|
||||
h:\git\wnmj\wnmj\运行\debug\ansi\logonserver.pdb
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\logonserver.res
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\msado15.tli
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\msado15.tlh
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\cl.command.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\cl.read.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\cl.write.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\link.command.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\link.read.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\link.write.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\rc.command.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\rc.read.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\debug\登录服务器.tlog\rc.write.1.tlog
|
||||
43
Servers/服务器组件/登录服务器/Debug/LogonServer.log
Normal file
43
Servers/服务器组件/登录服务器/Debug/LogonServer.log
Normal file
@@ -0,0 +1,43 @@
|
||||
生成启动时间为 2020-03-30 20:01:17。
|
||||
1>项目“H:\git\wnmj\wnmj\Servers\服务器组件\登录服务器\LogonServer.vcxproj”在节点 3 上(Build 个目标)。
|
||||
1>ClCompile:
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D _MBCS /D _AFXDLL /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"stdafx.h" /Fp"Debug\LogonServer.pch" /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt Stdafx.cpp
|
||||
Stdafx.cpp
|
||||
1>c:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\afx.h(38): warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC.
|
||||
c:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D _MBCS /D _AFXDLL /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"stdafx.h" /Fp"Debug\LogonServer.pch" /Fo"Debug\\" /Fd"Debug\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt AttemperEngineSink.cpp DataBaseEngineSink.cpp InitParameter.cpp LogonServer.cpp LogonServerDlg.cpp ServerListManager.cpp ServiceUnits.cpp
|
||||
ServiceUnits.cpp
|
||||
ServerListManager.cpp
|
||||
LogonServerDlg.cpp
|
||||
LogonServer.cpp
|
||||
InitParameter.cpp
|
||||
DataBaseEngineSink.cpp
|
||||
1>h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\databaseenginesink.cpp(1510): warning C4244: “=”: 从“LONG”转换到“BYTE”,可能丢失数据
|
||||
AttemperEngineSink.cpp
|
||||
1>h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\attemperenginesink.cpp(36): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
c:\program files (x86)\microsoft visual studio 12.0\vc\include\string.h(195) : 参见“strncpy”的声明
|
||||
正在生成代码...
|
||||
Link:
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"../../../运行/Debug/Ansi/LogonServer.exe" /INCREMENTAL /NOLOGO /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /manifestinput:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Include\Manifest\dpiaware.manifest" /DEBUG /PDB:"../../../运行/Debug/Ansi/LogonServer.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"../../../运行/Debug/Ansi/LogonServer.lib" /MACHINE:X86 /SAFESEH Debug\LogonServer.res
|
||||
Debug\AttemperEngineSink.obj
|
||||
Debug\DataBaseEngineSink.obj
|
||||
Debug\InitParameter.obj
|
||||
Debug\LogonServer.obj
|
||||
Debug\LogonServerDlg.obj
|
||||
Debug\ServerListManager.obj
|
||||
Debug\ServiceUnits.obj
|
||||
Debug\Stdafx.obj
|
||||
1>AttemperEngineSink.obj : warning LNK4075: 忽略“/EDITANDCONTINUE”(由于“/SAFESEH”规范)
|
||||
LogonServer.vcxproj -> H:\git\wnmj\wnmj\Servers\服务器组件\登录服务器\../../../运行/Debug/Ansi/LogonServer.exe
|
||||
PostBuildEvent:
|
||||
mkdir ..\..\..\发布组件\服务器组件\Debug\Ansi
|
||||
copy /y ..\..\..\运行\Debug\Ansi\LogonServer.exe ..\..\..\发布组件\服务器组件\Debug\Ansi\LogonServer.exe
|
||||
|
||||
:VCEnd
|
||||
子目录或文件 ..\..\..\发布组件\服务器组件\Debug\Ansi 已经存在。
|
||||
已复制 1 个文件。
|
||||
1>已完成生成项目“H:\git\wnmj\wnmj\Servers\服务器组件\登录服务器\LogonServer.vcxproj”(Build 个目标)的操作。
|
||||
|
||||
生成成功。
|
||||
|
||||
已用时间 00:00:25.69
|
||||
BIN
Servers/服务器组件/登录服务器/Debug/LogonServer.res
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/LogonServer.res
Normal file
Binary file not shown.
3140
Servers/服务器组件/登录服务器/Debug/msado15.tlh
Normal file
3140
Servers/服务器组件/登录服务器/Debug/msado15.tlh
Normal file
File diff suppressed because it is too large
Load Diff
2126
Servers/服务器组件/登录服务器/Debug/msado15.tli
Normal file
2126
Servers/服务器组件/登录服务器/Debug/msado15.tli
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/CL.read.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/CL.write.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/CL.write.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/cl.command.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/cl.command.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/link.command.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/link.command.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/link.read.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/link.read.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/link.write.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/link.write.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/rc.command.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/rc.command.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/rc.read.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/rc.read.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/rc.write.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Debug/登录服务器.tlog/rc.write.1.tlog
Normal file
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
|
||||
Debug|Win32|H:\git\wnmj\wnmj\Servers\|
|
||||
131
Servers/服务器组件/登录服务器/InitParameter.cpp
Normal file
131
Servers/服务器组件/登录服务器/InitParameter.cpp
Normal file
@@ -0,0 +1,131 @@
|
||||
#include "StdAfx.h"
|
||||
#include "InitParameter.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//服务时间
|
||||
#define TIME_CONNECT 30 //重连时间
|
||||
#define TIME_COLLECT 300 //统计时间
|
||||
#define TIME_LOAD_LIST 120 //加载列表
|
||||
#define TIME_RELOAD_LIST 600 //加载列表
|
||||
|
||||
//客户时间
|
||||
#define TIME_INTERMIT 0 //中断时间
|
||||
#define TIME_ONLINE_COUNT 600 //人数时间
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CInitParameter::CInitParameter()
|
||||
{
|
||||
InitParameter();
|
||||
}
|
||||
|
||||
//析构函数
|
||||
CInitParameter::~CInitParameter()
|
||||
{
|
||||
}
|
||||
|
||||
//初始化
|
||||
VOID CInitParameter::InitParameter()
|
||||
{
|
||||
//时间定义
|
||||
m_wConnectTime=TIME_CONNECT;
|
||||
m_wCollectTime=TIME_COLLECT;
|
||||
m_wLoadListTime=TIME_LOAD_LIST;
|
||||
m_wReLoadListTime=TIME_RELOAD_LIST;
|
||||
|
||||
//客户时间
|
||||
m_wIntermitTime=TIME_INTERMIT;
|
||||
m_wOnLineCountTime=TIME_ONLINE_COUNT;
|
||||
|
||||
//系统配置
|
||||
m_cbDelayList=TRUE;
|
||||
m_wMaxConnect=MAX_CONTENT;
|
||||
m_wServicePort=PORT_LOGON;
|
||||
ZeroMemory(m_szServerName,sizeof(m_szServerName));
|
||||
|
||||
//协调信息
|
||||
m_wCorrespondPort=PORT_CENTER;
|
||||
ZeroMemory(&m_CorrespondAddress,sizeof(m_CorrespondAddress));
|
||||
|
||||
//连接信息
|
||||
ZeroMemory(&m_ServiceAddress,sizeof(m_ServiceAddress));
|
||||
ZeroMemory(&m_AccountsDBParameter,sizeof(m_AccountsDBParameter));
|
||||
ZeroMemory(&m_TreasureDBParameter,sizeof(m_TreasureDBParameter));
|
||||
ZeroMemory(&m_PlatformDBParameter,sizeof(m_PlatformDBParameter));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//加载配置
|
||||
VOID CInitParameter::LoadInitParameter()
|
||||
{
|
||||
//重置参数
|
||||
InitParameter();
|
||||
|
||||
//获取路径
|
||||
TCHAR szWorkDir[MAX_PATH]=TEXT("");
|
||||
CWHService::GetWorkDirectory(szWorkDir,CountArray(szWorkDir));
|
||||
|
||||
//构造路径
|
||||
TCHAR szIniFile[MAX_PATH]=TEXT("");
|
||||
_sntprintf_s(szIniFile,CountArray(szIniFile),TEXT("%s\\ServerParameter.ini"),szWorkDir);
|
||||
|
||||
//读取配置
|
||||
CWHIniData IniData;
|
||||
IniData.SetIniFilePath(szIniFile);
|
||||
|
||||
//读取配置
|
||||
m_cbDelayList=IniData.ReadInt(TEXT("LogonServer"),TEXT("DelayList"),m_cbDelayList);
|
||||
m_wMaxConnect=IniData.ReadInt(TEXT("LogonServer"),TEXT("ConnectMax"),m_wMaxConnect);
|
||||
m_wServicePort=IniData.ReadInt(TEXT("LogonServer"),TEXT("ServicePort"),m_wServicePort);
|
||||
IniData.ReadString(TEXT("ServerInfo"),TEXT("ServiceName"),NULL,m_szServerName,CountArray(m_szServerName));
|
||||
IniData.ReadString(TEXT("ServerInfo"),TEXT("ServiceAddr"),NULL,m_ServiceAddress.szAddress,CountArray(m_ServiceAddress.szAddress));
|
||||
|
||||
//协调信息
|
||||
m_wCorrespondPort=IniData.ReadInt(TEXT("Correspond"),TEXT("ServicePort"),m_wCorrespondPort);
|
||||
IniData.ReadString(TEXT("ServerInfo"),TEXT("CorrespondAddr"),NULL,m_CorrespondAddress.szAddress,CountArray(m_CorrespondAddress.szAddress));
|
||||
|
||||
//连接信息
|
||||
m_AccountsDBParameter.wDataBasePort=(WORD)IniData.ReadInt(TEXT("AccountsDB"),TEXT("DBPort"),1433);
|
||||
IniData.ReadString(TEXT("AccountsDB"),TEXT("DBAddr"),NULL,m_AccountsDBParameter.szDataBaseAddr,CountArray(m_AccountsDBParameter.szDataBaseAddr));
|
||||
IniData.ReadString(TEXT("AccountsDB"),TEXT("DBUser"),NULL,m_AccountsDBParameter.szDataBaseUser,CountArray(m_AccountsDBParameter.szDataBaseUser));
|
||||
IniData.ReadString(TEXT("AccountsDB"),TEXT("DBPass"),NULL,m_AccountsDBParameter.szDataBasePass,CountArray(m_AccountsDBParameter.szDataBasePass));
|
||||
IniData.ReadString(TEXT("AccountsDB"),TEXT("DBName"),szAccountsDB,m_AccountsDBParameter.szDataBaseName,CountArray(m_AccountsDBParameter.szDataBaseName));
|
||||
|
||||
TCHAR szInFile[260]=TEXT("");
|
||||
TCHAR szPath[MAX_PATH]=TEXT("");
|
||||
GetCurrentDirectory(sizeof(szPath),szPath);
|
||||
_sntprintf_s(szInFile,sizeof(szInFile),TEXT("%s\\ServerParameter.ini"),szPath);
|
||||
|
||||
|
||||
TCHAR tcUrlAdders[128];
|
||||
TCHAR tcUrlAdder[128];
|
||||
|
||||
ZeroMemory(tcUrlAdders,sizeof(tcUrlAdders));
|
||||
GetPrivateProfileString(TEXT("AccountsDB"),TEXT("Url"),NULL,tcUrlAdders,sizeof(tcUrlAdders),szInFile);
|
||||
CopyMemory(tcUrlAdder,tcUrlAdders,sizeof(tcUrlAdders));
|
||||
////构造地址
|
||||
//TCHAR szDownLoadUrls[MAX_PATH]=TEXT("");
|
||||
//_sntprintf_s(szDownLoadUrls,CountArray(szDownLoadUrls),TEXT("%s/DownLoad.aspx?KindID=%ld"),tcUrlAdder,1);
|
||||
//CTraceService::TraceString(szDownLoadUrls,TraceLevel_Normal);
|
||||
|
||||
//连接信息
|
||||
m_TreasureDBParameter.wDataBasePort=(WORD)IniData.ReadInt(TEXT("TreasureDB"),TEXT("DBPort"),1433);
|
||||
IniData.ReadString(TEXT("TreasureDB"),TEXT("DBAddr"),NULL,m_TreasureDBParameter.szDataBaseAddr,CountArray(m_TreasureDBParameter.szDataBaseAddr));
|
||||
IniData.ReadString(TEXT("TreasureDB"),TEXT("DBUser"),NULL,m_TreasureDBParameter.szDataBaseUser,CountArray(m_TreasureDBParameter.szDataBaseUser));
|
||||
IniData.ReadString(TEXT("TreasureDB"),TEXT("DBPass"),NULL,m_TreasureDBParameter.szDataBasePass,CountArray(m_TreasureDBParameter.szDataBasePass));
|
||||
IniData.ReadString(TEXT("TreasureDB"),TEXT("DBName"),szTreasureDB,m_TreasureDBParameter.szDataBaseName,CountArray(m_TreasureDBParameter.szDataBaseName));
|
||||
|
||||
//连接信息
|
||||
m_PlatformDBParameter.wDataBasePort=(WORD)IniData.ReadInt(TEXT("PlatformDB"),TEXT("DBPort"),1433);
|
||||
IniData.ReadString(TEXT("PlatformDB"),TEXT("DBAddr"),NULL,m_PlatformDBParameter.szDataBaseAddr,CountArray(m_PlatformDBParameter.szDataBaseAddr));
|
||||
IniData.ReadString(TEXT("PlatformDB"),TEXT("DBUser"),NULL,m_PlatformDBParameter.szDataBaseUser,CountArray(m_PlatformDBParameter.szDataBaseUser));
|
||||
IniData.ReadString(TEXT("PlatformDB"),TEXT("DBPass"),NULL,m_PlatformDBParameter.szDataBasePass,CountArray(m_PlatformDBParameter.szDataBasePass));
|
||||
IniData.ReadString(TEXT("PlatformDB"),TEXT("DBName"),szPlatformDB,m_PlatformDBParameter.szDataBaseName,CountArray(m_PlatformDBParameter.szDataBaseName));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
61
Servers/服务器组件/登录服务器/InitParameter.h
Normal file
61
Servers/服务器组件/登录服务器/InitParameter.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef INIR_PARAMETER_HEAD_FILE
|
||||
#define INIR_PARAMETER_HEAD_FILE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Stdafx.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//配置参数
|
||||
class CInitParameter
|
||||
{
|
||||
//系统配置
|
||||
public:
|
||||
BYTE m_cbDelayList; //延时列表
|
||||
WORD m_wMaxConnect; //最大连接
|
||||
WORD m_wServicePort; //服务端口
|
||||
TCHAR m_szServerName[LEN_SERVER]; //服务器名
|
||||
|
||||
//组件时间
|
||||
public:
|
||||
WORD m_wConnectTime; //重连时间
|
||||
WORD m_wCollectTime; //统计时间
|
||||
WORD m_wLoadListTime; //列表时间
|
||||
WORD m_wReLoadListTime; //列表时间
|
||||
|
||||
//客户时间
|
||||
public:
|
||||
WORD m_wIntermitTime; //中断时间
|
||||
WORD m_wOnLineCountTime; //人数时间
|
||||
|
||||
//协调信息
|
||||
public:
|
||||
WORD m_wCorrespondPort; //协调端口
|
||||
tagAddressInfo m_CorrespondAddress; //协调地址
|
||||
|
||||
//服务地址
|
||||
public:
|
||||
tagAddressInfo m_ServiceAddress; //服务地址
|
||||
tagDataBaseParameter m_AccountsDBParameter; //连接地址
|
||||
tagDataBaseParameter m_TreasureDBParameter; //连接地址
|
||||
tagDataBaseParameter m_PlatformDBParameter; //连接地址
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CInitParameter();
|
||||
//析构函数
|
||||
virtual ~CInitParameter();
|
||||
|
||||
//功能函数
|
||||
public:
|
||||
//初始化
|
||||
VOID InitParameter();
|
||||
//加载配置
|
||||
VOID LoadInitParameter();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
43
Servers/服务器组件/登录服务器/LogonServer.cpp
Normal file
43
Servers/服务器组件/登录服务器/LogonServer.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "Stdafx.h"
|
||||
#include "LogonServer.h"
|
||||
#include "LogonServerDlg.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//程序对象
|
||||
CLogonServerApp theApp;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_MESSAGE_MAP(CLogonServerApp, CWinApp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CLogonServerApp::CLogonServerApp()
|
||||
{
|
||||
}
|
||||
|
||||
//启动函数
|
||||
BOOL CLogonServerApp::InitInstance()
|
||||
{
|
||||
__super::InitInstance();
|
||||
|
||||
//设置组件
|
||||
AfxInitRichEdit2();
|
||||
InitCommonControls();
|
||||
AfxEnableControlContainer();
|
||||
|
||||
//设置注册表
|
||||
SetRegistryKey(szProduct);
|
||||
|
||||
//显示窗口
|
||||
CLogonServerDlg LogonServerDlg;
|
||||
m_pMainWnd=&LogonServerDlg;
|
||||
LogonServerDlg.DoModal();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
28
Servers/服务器组件/登录服务器/LogonServer.h
Normal file
28
Servers/服务器组件/登录服务器/LogonServer.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "Resource.h" // 主符号
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//程序对象
|
||||
class CLogonServerApp : public CWinApp
|
||||
{
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CLogonServerApp();
|
||||
|
||||
//重载函数
|
||||
public:
|
||||
//启动函数
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//程序对象
|
||||
extern CLogonServerApp theApp;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
148
Servers/服务器组件/登录服务器/LogonServer.rc
Normal file
148
Servers/服务器组件/登录服务器/LogonServer.rc
Normal file
@@ -0,0 +1,148 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 中文(简体,中国) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
#pragma code_page(936)
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)\r\n"
|
||||
"LANGUAGE 4, 2\r\n"
|
||||
"#pragma code_page(936)\r\n"
|
||||
"#include ""res\\LogonServer.rc2"" // 非 Microsoft Visual C++ 编辑过的资源\r\n"
|
||||
"#include ""afxres.rc"" // 标准组件\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\LogonServer.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DLG_LOGON_SERVER DIALOGEX 0, 0, 285, 197
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
FONT 9, "宋体", 400, 0, 0x0
|
||||
BEGIN
|
||||
PUSHBUTTON "启动服务",IDC_START_SERVICE,19,178,49,15
|
||||
PUSHBUTTON "停止服务",IDC_STOP_SERVICE,85,178,49,15,WS_DISABLED
|
||||
PUSHBUTTON "系统配置",IDC_SYSTEM_OPTION,151,178,49,15,WS_DISABLED
|
||||
PUSHBUTTON "退出系统",IDCANCEL,217,178,49,15
|
||||
CONTROL "",IDC_TRACE_MESSAGE,"RichEdit20A",ES_MULTILINE | ES_NOHIDESEL | ES_READONLY | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_TABSTOP,4,5,276,167,WS_EX_CLIENTEDGE
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 6,6,0,3
|
||||
PRODUCTVERSION 6,6,0,3
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "080403a8"
|
||||
BEGIN
|
||||
VALUE "Comments", "科技有限公司"
|
||||
VALUE "CompanyName", "科技有限公司"
|
||||
VALUE "FileDescription", "登录服务器"
|
||||
VALUE "FileVersion", "6, 6, 0, 3"
|
||||
VALUE "InternalName", "LogonServer.exe"
|
||||
VALUE "LegalCopyright", "科技有限公司保留所有权利。"
|
||||
VALUE "OriginalFilename", "LogonServer.exe"
|
||||
VALUE "ProductName", "登录服务器"
|
||||
VALUE "ProductVersion", "6, 6, 0, 3"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x804, 936
|
||||
END
|
||||
END
|
||||
|
||||
#endif // 中文(简体,中国) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
|
||||
LANGUAGE 4, 2
|
||||
#pragma code_page(936)
|
||||
#include "res\LogonServer.rc2" // 非 Microsoft Visual C++ 编辑过的资源
|
||||
#include "afxres.rc" // 标准组件
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
265
Servers/服务器组件/登录服务器/LogonServer.vcxproj
Normal file
265
Servers/服务器组件/登录服务器/LogonServer.vcxproj
Normal file
@@ -0,0 +1,265 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug_Unicode|Win32">
|
||||
<Configuration>Debug_Unicode</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release_Unicode|Win32">
|
||||
<Configuration>Release_Unicode</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>登录服务器</ProjectName>
|
||||
<ProjectGuid>{CD826B8C-89BD-44AF-A1DE-0A91494CD763}</ProjectGuid>
|
||||
<Keyword>MFCProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Unicode|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Unicode|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Unicode|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Unicode|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>../../../运行/Debug/Ansi/</OutDir>
|
||||
<IntDir>Debug\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>LogonServer</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>../../../运行/Release/Ansi/</OutDir>
|
||||
<IntDir>Release\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>LogonServer</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Unicode|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Unicode|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>../../../运行/Debug/Ansi/LogonServer.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Command>mkdir ..\..\..\发布组件\服务器组件\Debug\Ansi
|
||||
copy /y ..\..\..\运行\Debug\Ansi\$(TargetFileName) ..\..\..\发布组件\服务器组件\Debug\Ansi\$(TargetFileName)
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0804</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>../../../运行/Release/Ansi/LogonServer.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0804</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Unicode|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>../../../运行/Debug/Unicode/LogonServer.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Command>mkdir ..\..\..\发布组件\服务器组件\Debug\Unicode
|
||||
copy /y ..\..\..\运行\Debug\Unicode\$(TargetFileName) ..\..\..\发布组件\服务器组件\Debug\Unicode\$(TargetFileName)
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0804</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Unicode|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<OutputFile>../../../运行/Release/Unicode/LogonServer.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
</Midl>
|
||||
<PostBuildEvent>
|
||||
<Command>mkdir ..\..\..\发布组件\服务器组件\Release\Unicode
|
||||
copy /y ..\..\..\运行\Release\Unicode\$(TargetFileName) ..\..\..\发布组件\服务器组件\Release\Unicode\$(TargetFileName)
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0804</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AttemperEngineSink.cpp" />
|
||||
<ClCompile Include="DataBaseEngineSink.cpp" />
|
||||
<ClCompile Include="InitParameter.cpp" />
|
||||
<ClCompile Include="LogonServer.cpp" />
|
||||
<ClCompile Include="LogonServerDlg.cpp" />
|
||||
<ClCompile Include="ServerListManager.cpp" />
|
||||
<ClCompile Include="ServiceUnits.cpp" />
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_Unicode|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_Unicode|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="AttemperEngineSink.h" />
|
||||
<ClInclude Include="ControlPacket.h" />
|
||||
<ClInclude Include="DataBaseEngineSink.h" />
|
||||
<ClInclude Include="DataBasePacket.h" />
|
||||
<ClInclude Include="DataBasePacketIn.h" />
|
||||
<ClInclude Include="DataBasePacketInOut.h" />
|
||||
<ClInclude Include="InitParameter.h" />
|
||||
<ClInclude Include="LogonServer.h" />
|
||||
<ClInclude Include="LogonServerDlg.h" />
|
||||
<ClInclude Include="Resource.h" />
|
||||
<ClInclude Include="ServerListManager.h" />
|
||||
<ClInclude Include="ServiceUnits.h" />
|
||||
<ClInclude Include="Stdafx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="res\LogonServer.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="LogonServer.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\LogonServer.rc2" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
99
Servers/服务器组件/登录服务器/LogonServer.vcxproj.filters
Normal file
99
Servers/服务器组件/登录服务器/LogonServer.vcxproj.filters
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AttemperEngineSink.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DataBaseEngineSink.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InitParameter.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LogonServer.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LogonServerDlg.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ServerListManager.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ServiceUnits.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Stdafx.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="AttemperEngineSink.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ControlPacket.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DataBaseEngineSink.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DataBasePacket.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="InitParameter.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LogonServer.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LogonServerDlg.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Resource.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ServerListManager.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ServiceUnits.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Stdafx.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DataBasePacketInOut.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DataBasePacketIn.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="res\LogonServer.ico">
|
||||
<Filter>资源文件</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="LogonServer.rc">
|
||||
<Filter>资源文件</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\LogonServer.rc2">
|
||||
<Filter>资源文件</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
4
Servers/服务器组件/登录服务器/LogonServer.vcxproj.user
Normal file
4
Servers/服务器组件/登录服务器/LogonServer.vcxproj.user
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
186
Servers/服务器组件/登录服务器/LogonServerDlg.cpp
Normal file
186
Servers/服务器组件/登录服务器/LogonServerDlg.cpp
Normal file
@@ -0,0 +1,186 @@
|
||||
#include "Stdafx.h"
|
||||
#include "Resource.h"
|
||||
#include "LogonServerDlg.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_MESSAGE_MAP(CLogonServerDlg, CDialog)
|
||||
ON_WM_QUERYENDSESSION()
|
||||
ON_BN_CLICKED(IDC_STOP_SERVICE, OnBnClickedStopService)
|
||||
ON_BN_CLICKED(IDC_START_SERVICE, OnBnClickedStartService)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CLogonServerDlg::CLogonServerDlg() : CDialog(IDD_DLG_LOGON_SERVER)
|
||||
{
|
||||
}
|
||||
|
||||
//析构函数
|
||||
CLogonServerDlg::~CLogonServerDlg()
|
||||
{
|
||||
}
|
||||
|
||||
//控件绑定
|
||||
VOID CLogonServerDlg::DoDataExchange(CDataExchange * pDX)
|
||||
{
|
||||
__super::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_TRACE_MESSAGE, m_TraceServiceControl);
|
||||
}
|
||||
|
||||
//初始化函数
|
||||
BOOL CLogonServerDlg::OnInitDialog()
|
||||
{
|
||||
__super::OnInitDialog();
|
||||
|
||||
//设置标题
|
||||
SetWindowText(TEXT("登录服务器 -- [ 停止 ]"));
|
||||
|
||||
//设置图标
|
||||
HICON hIcon=LoadIcon(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDR_MAINFRAME));
|
||||
SetIcon(hIcon,TRUE);
|
||||
SetIcon(hIcon,FALSE);
|
||||
|
||||
//设置组件
|
||||
m_ServiceUnits.SetServiceUnitsSink(this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//确定消息
|
||||
VOID CLogonServerDlg::OnOK()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//取消函数
|
||||
VOID CLogonServerDlg::OnCancel()
|
||||
{
|
||||
//关闭询问
|
||||
if (m_ServiceUnits.GetServiceStatus()!=ServiceStatus_Stop)
|
||||
{
|
||||
LPCTSTR pszQuestion=TEXT("登录服务器正在运行中,您确实要关闭服务器吗?");
|
||||
if (AfxMessageBox(pszQuestion,MB_YESNO|MB_DEFBUTTON2|MB_ICONQUESTION)!=IDYES) return;
|
||||
}
|
||||
|
||||
//停止服务
|
||||
m_ServiceUnits.ConcludeService();
|
||||
|
||||
__super::OnCancel();
|
||||
}
|
||||
|
||||
//消息解释
|
||||
BOOL CLogonServerDlg::PreTranslateMessage(MSG * pMsg)
|
||||
{
|
||||
//按键过滤
|
||||
if ((pMsg->message==WM_KEYDOWN)&&(pMsg->wParam==VK_ESCAPE))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return __super::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
//服务状态
|
||||
VOID CLogonServerDlg::OnServiceUnitsStatus(enServiceStatus ServiceStatus)
|
||||
{
|
||||
//状态设置
|
||||
switch (ServiceStatus)
|
||||
{
|
||||
case ServiceStatus_Stop: //停止状态
|
||||
{
|
||||
//设置标题
|
||||
SetWindowText(TEXT("登录服务器 -- [ 停止 ]"));
|
||||
|
||||
//设置按钮
|
||||
GetDlgItem(IDC_STOP_SERVICE)->EnableWindow(FALSE);
|
||||
GetDlgItem(IDC_START_SERVICE)->EnableWindow(TRUE);
|
||||
|
||||
//提示信息
|
||||
LPCTSTR pszDescribe=TEXT("服务停止成功");
|
||||
CTraceService::TraceString(pszDescribe,TraceLevel_Normal);
|
||||
|
||||
break;
|
||||
}
|
||||
case ServiceStatus_Config: //配置状态
|
||||
{
|
||||
//设置标题
|
||||
SetWindowText(TEXT("登录服务器 -- [ 初始化 ]"));
|
||||
|
||||
//设置按钮
|
||||
GetDlgItem(IDC_STOP_SERVICE)->EnableWindow(TRUE);
|
||||
GetDlgItem(IDC_START_SERVICE)->EnableWindow(FALSE);
|
||||
|
||||
//提示信息
|
||||
LPCTSTR pszDescribe=TEXT("正在初始化组件...");
|
||||
CTraceService::TraceString(pszDescribe,TraceLevel_Normal);
|
||||
|
||||
break;
|
||||
}
|
||||
case ServiceStatus_Service: //服务状态
|
||||
{
|
||||
//设置标题
|
||||
SetWindowText(TEXT("登录服务器 -- [ 运行 ]"));
|
||||
|
||||
//设置按钮
|
||||
GetDlgItem(IDC_STOP_SERVICE)->EnableWindow(TRUE);
|
||||
GetDlgItem(IDC_START_SERVICE)->EnableWindow(FALSE);
|
||||
|
||||
//提示信息
|
||||
LPCTSTR pszDescribe=TEXT("服务启动成功");
|
||||
CTraceService::TraceString(pszDescribe,TraceLevel_Normal);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//启动服务
|
||||
VOID CLogonServerDlg::OnBnClickedStartService()
|
||||
{
|
||||
//启动服务
|
||||
try
|
||||
{
|
||||
m_ServiceUnits.StartService();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//停止服务
|
||||
VOID CLogonServerDlg::OnBnClickedStopService()
|
||||
{
|
||||
//停止服务
|
||||
try
|
||||
{
|
||||
m_ServiceUnits.ConcludeService();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//关闭询问
|
||||
BOOL CLogonServerDlg::OnQueryEndSession()
|
||||
{
|
||||
//提示消息
|
||||
if (m_ServiceUnits.GetServiceStatus()!=ServiceStatus_Stop)
|
||||
{
|
||||
CTraceService::TraceString(TEXT("服务正在运行中,系统要求注销回话请求失败"),TraceLevel_Warning);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
61
Servers/服务器组件/登录服务器/LogonServerDlg.h
Normal file
61
Servers/服务器组件/登录服务器/LogonServerDlg.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef LOGON_SERVER_SERVER_DLG_HEAD_FILE
|
||||
#define LOGON_SERVER_SERVER_DLG_HEAD_FILE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Stdafx.h"
|
||||
#include "ServiceUnits.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//主对话框
|
||||
class CLogonServerDlg : public CDialog, public IServiceUnitsSink
|
||||
{
|
||||
//组件变量
|
||||
protected:
|
||||
CServiceUnits m_ServiceUnits; //服务单元
|
||||
CTraceServiceControl m_TraceServiceControl; //追踪窗口
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CLogonServerDlg();
|
||||
//析构函数
|
||||
virtual ~CLogonServerDlg();
|
||||
|
||||
//重载函数
|
||||
protected:
|
||||
//控件绑定
|
||||
virtual VOID DoDataExchange(CDataExchange * pDX);
|
||||
//初始化函数
|
||||
virtual BOOL OnInitDialog();
|
||||
//确定消息
|
||||
virtual VOID OnOK();
|
||||
//取消函数
|
||||
virtual VOID OnCancel();
|
||||
//消息解释
|
||||
virtual BOOL PreTranslateMessage(MSG * pMsg);
|
||||
|
||||
//服务接口
|
||||
public:
|
||||
//服务状态
|
||||
virtual VOID OnServiceUnitsStatus(enServiceStatus ServiceStatus);
|
||||
|
||||
//按钮消息
|
||||
protected:
|
||||
//启动服务
|
||||
VOID OnBnClickedStartService();
|
||||
//停止服务
|
||||
VOID OnBnClickedStopService();
|
||||
|
||||
//消息映射
|
||||
public:
|
||||
//关闭询问
|
||||
BOOL OnQueryEndSession();
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
2
Servers/服务器组件/登录服务器/PlazaOptionConfig.ini
Normal file
2
Servers/服务器组件/登录服务器/PlazaOptionConfig.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[ServerStatus]
|
||||
ShowServerStatus=1
|
||||
25
Servers/服务器组件/登录服务器/Release/LogonServer.Build.CppClean.log
Normal file
25
Servers/服务器组件/登录服务器/Release/LogonServer.Build.CppClean.log
Normal file
@@ -0,0 +1,25 @@
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\logonserver.pch
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\vc120.pdb
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\stdafx.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\serviceunits.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\serverlistmanager.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\logonserverdlg.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\logonserver.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\initparameter.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\databaseenginesink.obj
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\attemperenginesink.obj
|
||||
h:\git\wnmj\wnmj\运行\release\ansi\logonserver.exe
|
||||
h:\git\wnmj\wnmj\运行\release\ansi\logonserver.pdb
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\logonserver.res
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\msado15.tli
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\msado15.tlh
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\../../../运行/release/ansi/logonserver.exe
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\cl.command.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\cl.read.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\cl.write.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\link.command.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\link.read.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\link.write.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\rc.command.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\rc.read.1.tlog
|
||||
h:\git\wnmj\wnmj\servers\服务器组件\登录服务器\release\登录服务器.tlog\rc.write.1.tlog
|
||||
37
Servers/服务器组件/登录服务器/Release/LogonServer.log
Normal file
37
Servers/服务器组件/登录服务器/Release/LogonServer.log
Normal file
@@ -0,0 +1,37 @@
|
||||
生成启动时间为 2020-04-04 20:06:14。
|
||||
1>项目“H:\git\wnmj\wnmj\Servers\服务器组件\登录服务器\LogonServer.vcxproj”在节点 4 上(Rebuild 个目标)。
|
||||
1>ClCompile:
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oy- /D WIN32 /D _WINDOWS /D NDEBUG /D _MBCS /D _AFXDLL /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"stdafx.h" /Fp"Release\LogonServer.pch" /Fo"Release\\" /Fd"Release\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt Stdafx.cpp
|
||||
Stdafx.cpp
|
||||
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h(38): warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oy- /D WIN32 /D _WINDOWS /D NDEBUG /D _MBCS /D _AFXDLL /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"stdafx.h" /Fp"Release\LogonServer.pch" /Fo"Release\\" /Fd"Release\vc120.pdb" /Gd /TP /analyze- /errorReport:prompt AttemperEngineSink.cpp DataBaseEngineSink.cpp InitParameter.cpp LogonServer.cpp LogonServerDlg.cpp ServerListManager.cpp ServiceUnits.cpp
|
||||
AttemperEngineSink.cpp
|
||||
1>AttemperEngineSink.cpp(36): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\string.h(195) : 参见“strncpy”的声明
|
||||
DataBaseEngineSink.cpp
|
||||
1>DataBaseEngineSink.cpp(1510): warning C4244: “=”: 从“LONG”转换到“BYTE”,可能丢失数据
|
||||
InitParameter.cpp
|
||||
LogonServer.cpp
|
||||
LogonServerDlg.cpp
|
||||
ServerListManager.cpp
|
||||
ServiceUnits.cpp
|
||||
正在生成代码...
|
||||
ResourceCompile:
|
||||
C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe /D NDEBUG /D _AFXDLL /l"0x0804" /IRelease\ /nologo /fo"Release\LogonServer.res" LogonServer.rc
|
||||
Link:
|
||||
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"../../../运行/Release/Ansi/LogonServer.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /manifestinput:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Include\Manifest\dpiaware.manifest" /DEBUG /PDB:"../../../运行/Release/Ansi/LogonServer.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"../../../运行/Release/Ansi/LogonServer.lib" /MACHINE:X86 /SAFESEH Release\LogonServer.res
|
||||
Release\AttemperEngineSink.obj
|
||||
Release\DataBaseEngineSink.obj
|
||||
Release\InitParameter.obj
|
||||
Release\LogonServer.obj
|
||||
Release\LogonServerDlg.obj
|
||||
Release\ServerListManager.obj
|
||||
Release\ServiceUnits.obj
|
||||
Release\Stdafx.obj
|
||||
LogonServer.vcxproj -> H:\git\wnmj\wnmj\Servers\服务器组件\登录服务器\../../../运行/Release/Ansi/LogonServer.exe
|
||||
1>已完成生成项目“H:\git\wnmj\wnmj\Servers\服务器组件\登录服务器\LogonServer.vcxproj”(Rebuild 个目标)的操作。
|
||||
|
||||
生成成功。
|
||||
|
||||
已用时间 00:00:12.87
|
||||
BIN
Servers/服务器组件/登录服务器/Release/LogonServer.res
Normal file
BIN
Servers/服务器组件/登录服务器/Release/LogonServer.res
Normal file
Binary file not shown.
3140
Servers/服务器组件/登录服务器/Release/msado15.tlh
Normal file
3140
Servers/服务器组件/登录服务器/Release/msado15.tlh
Normal file
File diff suppressed because it is too large
Load Diff
2126
Servers/服务器组件/登录服务器/Release/msado15.tli
Normal file
2126
Servers/服务器组件/登录服务器/Release/msado15.tli
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/CL.read.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/CL.read.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/CL.write.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/CL.write.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/cl.command.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/cl.command.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/link.command.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/link.command.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/link.read.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/link.read.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/link.write.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/link.write.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/rc.command.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/rc.command.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/rc.read.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/rc.read.1.tlog
Normal file
Binary file not shown.
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/rc.write.1.tlog
Normal file
BIN
Servers/服务器组件/登录服务器/Release/登录服务器.tlog/rc.write.1.tlog
Normal file
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
|
||||
Release|Win32|H:\git\wnmj\wnmj\Servers\|
|
||||
BIN
Servers/服务器组件/登录服务器/Res/LogonServer.ico
Normal file
BIN
Servers/服务器组件/登录服务器/Res/LogonServer.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
13
Servers/服务器组件/登录服务器/Res/LogonServer.rc2
Normal file
13
Servers/服务器组件/登录服务器/Res/LogonServer.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// LogonServer.RC2 - Microsoft Visual C++ 不会直接编辑的资源
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error 此文件不能由 Microsoft Visual C++ 编辑
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 在此处添加手动编辑的资源...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
22
Servers/服务器组件/登录服务器/Resource.h
Normal file
22
Servers/服务器组件/登录服务器/Resource.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by LogonServer.rc
|
||||
//
|
||||
#define IDD_DLG_LOGON_SERVER_SERVER 103
|
||||
#define IDD_DLG_LOGON_SERVER 103
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDC_TRACE_MESSAGE 1002
|
||||
#define IDC_START_SERVICE 1003
|
||||
#define IDC_STOP_SERVICE 1004
|
||||
#define IDC_SYSTEM_OPTION 1005
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
857
Servers/服务器组件/登录服务器/ServerListManager.cpp
Normal file
857
Servers/服务器组件/登录服务器/ServerListManager.cpp
Normal file
@@ -0,0 +1,857 @@
|
||||
#include "StdAfx.h"
|
||||
#include "ServerListManager.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CGameTypeItem::CGameTypeItem()
|
||||
{
|
||||
//设置变量
|
||||
ZeroMemory(&m_GameType,sizeof(m_GameType));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CGameKindItem::CGameKindItem()
|
||||
{
|
||||
//设置变量
|
||||
ZeroMemory(&m_GameKind,sizeof(m_GameKind));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CGameNodeItem::CGameNodeItem()
|
||||
{
|
||||
//设置变量
|
||||
ZeroMemory(&m_GameNode,sizeof(m_GameNode));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CGameServerItem::CGameServerItem()
|
||||
{
|
||||
//设置变量
|
||||
ZeroMemory(&m_GameServer,sizeof(m_GameServer));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CGamePageItem::CGamePageItem()
|
||||
{
|
||||
//设置变量
|
||||
ZeroMemory(&m_GamePage,sizeof(m_GamePage));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CServerListManager::CServerListManager()
|
||||
{
|
||||
//设置质数
|
||||
m_TypeItemMap.InitHashTable(PRIME_TYPE);
|
||||
m_KindItemMap.InitHashTable(PRIME_KIND);
|
||||
m_NodeItemMap.InitHashTable(PRIME_NODE);
|
||||
m_PageItemMap.InitHashTable(PRIME_PAGE);
|
||||
m_ServerItemMap.InitHashTable(PRIME_SERVER);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//析构函数
|
||||
CServerListManager::~CServerListManager()
|
||||
{
|
||||
//变量定义
|
||||
WORD wKey=0;
|
||||
|
||||
//删除种类
|
||||
CGameTypeItem * pGameTypeItem=NULL;
|
||||
POSITION Position=m_TypeItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_TypeItemMap.GetNextAssoc(Position,wKey,pGameTypeItem);
|
||||
SafeDelete(pGameTypeItem);
|
||||
}
|
||||
for (INT_PTR i=0;i<m_TypeItemBuffer.GetCount();i++)
|
||||
{
|
||||
pGameTypeItem=m_TypeItemBuffer[i];
|
||||
SafeDelete(pGameTypeItem);
|
||||
}
|
||||
m_TypeItemMap.RemoveAll();
|
||||
m_TypeItemBuffer.RemoveAll();
|
||||
|
||||
//删除类型
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
Position=m_KindItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_KindItemMap.GetNextAssoc(Position,wKey,pGameKindItem);
|
||||
SafeDelete(pGameKindItem);
|
||||
}
|
||||
for (INT_PTR i=0;i<m_KindItemBuffer.GetCount();i++)
|
||||
{
|
||||
pGameKindItem=m_KindItemBuffer[i];
|
||||
SafeDelete(pGameKindItem);
|
||||
}
|
||||
m_KindItemMap.RemoveAll();
|
||||
m_KindItemBuffer.RemoveAll();
|
||||
|
||||
//删除节点
|
||||
CGameNodeItem * pGameNodeItem=NULL;
|
||||
Position=m_NodeItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_NodeItemMap.GetNextAssoc(Position,wKey,pGameNodeItem);
|
||||
SafeDelete(pGameNodeItem);
|
||||
}
|
||||
for (INT_PTR i=0;i<m_NodeItemBuffer.GetCount();i++)
|
||||
{
|
||||
pGameNodeItem=m_NodeItemBuffer[i];
|
||||
SafeDelete(pGameNodeItem);
|
||||
}
|
||||
m_NodeItemMap.RemoveAll();
|
||||
m_NodeItemBuffer.RemoveAll();
|
||||
|
||||
//删除房间
|
||||
CGameServerItem * pGameServerItem=NULL;
|
||||
Position=m_ServerItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_ServerItemMap.GetNextAssoc(Position,wKey,pGameServerItem);
|
||||
SafeDelete(pGameServerItem);
|
||||
}
|
||||
for (INT_PTR i=0;i<m_ServerItemBuffer.GetCount();i++)
|
||||
{
|
||||
pGameServerItem=m_ServerItemBuffer[i];
|
||||
SafeDelete(pGameServerItem);
|
||||
}
|
||||
m_ServerItemMap.RemoveAll();
|
||||
m_ServerItemBuffer.RemoveAll();
|
||||
|
||||
//删除定制
|
||||
CGamePageItem * pGamePageItem=NULL;
|
||||
Position=m_PageItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_PageItemMap.GetNextAssoc(Position,wKey,pGamePageItem);
|
||||
SafeDelete(pGamePageItem);
|
||||
}
|
||||
for (INT_PTR i=0;i<m_PageItemBuffer.GetCount();i++)
|
||||
{
|
||||
pGamePageItem=m_PageItemBuffer[i];
|
||||
SafeDelete(pGamePageItem);
|
||||
}
|
||||
m_PageItemMap.RemoveAll();
|
||||
m_PageItemBuffer.RemoveAll();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//重置列表
|
||||
VOID CServerListManager::ResetServerList()
|
||||
{
|
||||
//废弃列表
|
||||
DisuseKernelItem();
|
||||
DisuseServerItem();
|
||||
|
||||
//清理列表
|
||||
CleanKernelItem();
|
||||
CleanServerItem();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//清理内核
|
||||
VOID CServerListManager::CleanKernelItem()
|
||||
{
|
||||
//变量定义
|
||||
POSITION PositionType=m_TypeItemMap.GetStartPosition();
|
||||
POSITION PositionKind=m_KindItemMap.GetStartPosition();
|
||||
POSITION PositionNode=m_NodeItemMap.GetStartPosition();
|
||||
POSITION PositionPage=m_PageItemMap.GetStartPosition();
|
||||
|
||||
//清理种类
|
||||
while (PositionType!=NULL)
|
||||
{
|
||||
//索引房间
|
||||
WORD wTypeID=0;
|
||||
CGameTypeItem * pGameTypeItem=NULL;
|
||||
m_TypeItemMap.GetNextAssoc(PositionType,wTypeID,pGameTypeItem);
|
||||
|
||||
//删除判断
|
||||
if (pGameTypeItem->m_bDisuse==true)
|
||||
{
|
||||
m_TypeItemMap.RemoveKey(wTypeID);
|
||||
m_TypeItemBuffer.Add(pGameTypeItem);
|
||||
}
|
||||
}
|
||||
|
||||
//清理类型
|
||||
while (PositionKind!=NULL)
|
||||
{
|
||||
//索引房间
|
||||
WORD wKindID=0;
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
m_KindItemMap.GetNextAssoc(PositionKind,wKindID,pGameKindItem);
|
||||
|
||||
//删除判断
|
||||
if (pGameKindItem->m_bDisuse==true)
|
||||
{
|
||||
m_KindItemMap.RemoveKey(wKindID);
|
||||
m_KindItemBuffer.Add(pGameKindItem);
|
||||
}
|
||||
}
|
||||
|
||||
//清理节点
|
||||
while (PositionNode!=NULL)
|
||||
{
|
||||
//索引房间
|
||||
WORD wNodeID=0;
|
||||
CGameNodeItem * pGameNodeItem=NULL;
|
||||
m_NodeItemMap.GetNextAssoc(PositionNode,wNodeID,pGameNodeItem);
|
||||
|
||||
//删除判断
|
||||
if (pGameNodeItem->m_bDisuse==true)
|
||||
{
|
||||
m_NodeItemMap.RemoveKey(wNodeID);
|
||||
m_NodeItemBuffer.Add(pGameNodeItem);
|
||||
}
|
||||
}
|
||||
|
||||
//清理定制
|
||||
while (PositionPage!=NULL)
|
||||
{
|
||||
//索引房间
|
||||
WORD wPageID=0;
|
||||
CGamePageItem * pGamePageItem=NULL;
|
||||
m_PageItemMap.GetNextAssoc(PositionPage,wPageID,pGamePageItem);
|
||||
|
||||
//删除判断
|
||||
if (pGamePageItem->m_bDisuse==true)
|
||||
{
|
||||
m_PageItemMap.RemoveKey(wPageID);
|
||||
m_PageItemBuffer.Add(pGamePageItem);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//清理房间
|
||||
VOID CServerListManager::CleanServerItem()
|
||||
{
|
||||
//变量定义
|
||||
POSITION PositionServer=m_ServerItemMap.GetStartPosition();
|
||||
|
||||
//删除房间
|
||||
while (PositionServer!=NULL)
|
||||
{
|
||||
//索引房间
|
||||
WORD wServerID=0;
|
||||
CGameServerItem * pGameServerItem=NULL;
|
||||
m_ServerItemMap.GetNextAssoc(PositionServer,wServerID,pGameServerItem);
|
||||
|
||||
//删除判断
|
||||
if (pGameServerItem->m_bDisuse==true)
|
||||
{
|
||||
//删除数据
|
||||
m_ServerItemMap.RemoveKey(wServerID);
|
||||
m_ServerItemBuffer.Add(pGameServerItem);
|
||||
|
||||
//设置人数
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
if (m_KindItemMap.Lookup(pGameServerItem->m_GameServer.wKindID,pGameKindItem)==TRUE)
|
||||
{
|
||||
tagGameServer * pGameServer=&pGameServerItem->m_GameServer;
|
||||
pGameKindItem->m_GameKind.dwOnLineCount=__max(pGameKindItem->m_GameKind.dwOnLineCount-pGameServer->dwOnLineCount,0);
|
||||
pGameKindItem->m_GameKind.dwFullCount=__max(pGameKindItem->m_GameKind.dwFullCount-pGameServer->dwFullCount,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//废弃内核
|
||||
VOID CServerListManager::DisuseKernelItem()
|
||||
{
|
||||
//变量定义
|
||||
WORD wKey=0;
|
||||
DWORD dwKey=0;
|
||||
|
||||
//废弃种类
|
||||
CGameTypeItem * pGameTypeItem=NULL;
|
||||
POSITION Position=m_TypeItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_TypeItemMap.GetNextAssoc(Position,wKey,pGameTypeItem);
|
||||
pGameTypeItem->m_bDisuse=true;
|
||||
}
|
||||
|
||||
//废弃类型
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
Position=m_KindItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_KindItemMap.GetNextAssoc(Position,wKey,pGameKindItem);
|
||||
pGameKindItem->m_bDisuse=true;
|
||||
}
|
||||
|
||||
//废弃节点
|
||||
CGameNodeItem * pGameNodeItem=NULL;
|
||||
Position=m_NodeItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_NodeItemMap.GetNextAssoc(Position,wKey,pGameNodeItem);
|
||||
pGameNodeItem->m_bDisuse=true;
|
||||
}
|
||||
|
||||
//废弃定制
|
||||
CGamePageItem * pGamePageItem=NULL;
|
||||
Position=m_PageItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_PageItemMap.GetNextAssoc(Position,wKey,pGamePageItem);
|
||||
pGamePageItem->m_bDisuse=true;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//废弃房间
|
||||
VOID CServerListManager::DisuseServerItem()
|
||||
{
|
||||
//变量定义
|
||||
WORD wKey=0;
|
||||
CGameServerItem * pGameServerItem=NULL;
|
||||
|
||||
//废弃房间
|
||||
POSITION Position=m_ServerItemMap.GetStartPosition();
|
||||
while (Position!=NULL)
|
||||
{
|
||||
m_ServerItemMap.GetNextAssoc(Position,wKey,pGameServerItem);
|
||||
pGameServerItem->m_bDisuse=true;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//统计人数
|
||||
DWORD CServerListManager::CollectOnlineInfo()
|
||||
{
|
||||
//变量定义
|
||||
DWORD dwOnLineCount=0L;
|
||||
POSITION PositionKind=m_KindItemMap.GetStartPosition();
|
||||
|
||||
//统计人数
|
||||
while (PositionKind!=NULL)
|
||||
{
|
||||
//索引类型
|
||||
WORD wKindID=0;
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
m_KindItemMap.GetNextAssoc(PositionKind,wKindID,pGameKindItem);
|
||||
|
||||
//统计人数
|
||||
if (pGameKindItem!=NULL) dwOnLineCount+=pGameKindItem->m_GameKind.dwOnLineCount;
|
||||
}
|
||||
|
||||
return dwOnLineCount;
|
||||
}
|
||||
|
||||
//类型在线
|
||||
DWORD CServerListManager::CollectOnlineInfo(WORD wKindID)
|
||||
{
|
||||
//变量定义
|
||||
DWORD dwOnLineCount=0L;
|
||||
POSITION PositionServer=m_ServerItemMap.GetStartPosition();
|
||||
|
||||
//枚举房间
|
||||
while (PositionServer!=NULL)
|
||||
{
|
||||
//索引房间
|
||||
WORD wServerID=0;
|
||||
CGameServerItem * pGameServerItem=NULL;
|
||||
m_ServerItemMap.GetNextAssoc(PositionServer,wServerID,pGameServerItem);
|
||||
|
||||
//统计人数
|
||||
if (pGameServerItem->m_GameServer.wKindID==wKindID)
|
||||
{
|
||||
dwOnLineCount+=pGameServerItem->m_GameServer.dwOnLineCount;
|
||||
}
|
||||
}
|
||||
|
||||
return dwOnLineCount;
|
||||
}
|
||||
|
||||
//插入种类
|
||||
bool CServerListManager::InsertGameType(tagGameType * pGameType)
|
||||
{
|
||||
//效验参数
|
||||
ASSERT(pGameType!=NULL);
|
||||
if (pGameType==NULL) return false;
|
||||
|
||||
//查找现存
|
||||
CGameTypeItem * pGameTypeItem=NULL;
|
||||
if (m_TypeItemMap.Lookup(pGameType->wTypeID,pGameTypeItem)==FALSE)
|
||||
{
|
||||
//创建对象
|
||||
try
|
||||
{
|
||||
INT_PTR nStroeCount=m_TypeItemBuffer.GetCount();
|
||||
if (nStroeCount>0)
|
||||
{
|
||||
pGameTypeItem=m_TypeItemBuffer[nStroeCount-1];
|
||||
m_TypeItemBuffer.RemoveAt(nStroeCount-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pGameTypeItem=new CGameTypeItem;
|
||||
if (pGameTypeItem==NULL) return false;
|
||||
}
|
||||
}
|
||||
catch (...) { return false; }
|
||||
|
||||
//设置变量
|
||||
ZeroMemory(pGameTypeItem,sizeof(CGameTypeItem));
|
||||
}
|
||||
|
||||
//设置数据
|
||||
pGameTypeItem->m_bDisuse=false;
|
||||
CopyMemory(&pGameTypeItem->m_GameType,pGameType,sizeof(tagGameType));
|
||||
|
||||
//设置索引
|
||||
m_TypeItemMap[pGameType->wTypeID]=pGameTypeItem;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//插入类型
|
||||
bool CServerListManager::InsertGameKind(tagGameKind * pGameKind)
|
||||
{
|
||||
//效验参数
|
||||
ASSERT(pGameKind!=NULL);
|
||||
if (pGameKind==NULL) return false;
|
||||
|
||||
//查找现存
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
if (m_KindItemMap.Lookup(pGameKind->wKindID,pGameKindItem)==FALSE)
|
||||
{
|
||||
//创建对象
|
||||
try
|
||||
{
|
||||
INT_PTR nStroeCount=m_KindItemBuffer.GetCount();
|
||||
if (nStroeCount>0)
|
||||
{
|
||||
pGameKindItem=m_KindItemBuffer[nStroeCount-1];
|
||||
m_KindItemBuffer.RemoveAt(nStroeCount-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pGameKindItem=new CGameKindItem;
|
||||
if (pGameKindItem==NULL) return false;
|
||||
}
|
||||
}
|
||||
catch (...) { return false; }
|
||||
|
||||
//设置变量
|
||||
ZeroMemory(pGameKindItem,sizeof(CGameKindItem));
|
||||
}
|
||||
|
||||
//设置数据
|
||||
pGameKindItem->m_bDisuse=false;
|
||||
CopyMemory(&pGameKindItem->m_GameKind,pGameKind,sizeof(tagGameKind));
|
||||
|
||||
//设置索引
|
||||
m_KindItemMap[pGameKind->wKindID]=pGameKindItem;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//插入节点
|
||||
bool CServerListManager::InsertGameNode(tagGameNode * pGameNode)
|
||||
{
|
||||
//效验参数
|
||||
ASSERT(pGameNode!=NULL);
|
||||
if (pGameNode==NULL) return false;
|
||||
|
||||
//查找现存
|
||||
CGameNodeItem * pGameNodeItem=NULL;
|
||||
if (m_NodeItemMap.Lookup(pGameNode->wNodeID,pGameNodeItem)==FALSE)
|
||||
{
|
||||
//创建对象
|
||||
try
|
||||
{
|
||||
INT_PTR nStroeCount=m_NodeItemBuffer.GetCount();
|
||||
if (nStroeCount>0)
|
||||
{
|
||||
pGameNodeItem=m_NodeItemBuffer[nStroeCount-1];
|
||||
m_NodeItemBuffer.RemoveAt(nStroeCount-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pGameNodeItem=new CGameNodeItem;
|
||||
if (pGameNodeItem==NULL) return false;
|
||||
}
|
||||
}
|
||||
catch (...) { return false; }
|
||||
|
||||
//设置变量
|
||||
ZeroMemory(pGameNodeItem,sizeof(CGameNodeItem));
|
||||
}
|
||||
|
||||
//插入数据
|
||||
pGameNodeItem->m_bDisuse=false;
|
||||
CopyMemory(&pGameNodeItem->m_GameNode,pGameNode,sizeof(tagGameNode));
|
||||
|
||||
//设置索引
|
||||
m_NodeItemMap[pGameNode->wNodeID]=pGameNodeItem;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//插入定制
|
||||
bool CServerListManager::InsertGamePage(tagGamePage * pGamePage)
|
||||
{
|
||||
//效验参数
|
||||
ASSERT(pGamePage!=NULL);
|
||||
if (pGamePage==NULL) return false;
|
||||
|
||||
//获取子项
|
||||
CGamePageItem * pGamePageItem=NULL;
|
||||
if (m_PageItemMap.Lookup(pGamePage->wPageID,pGamePageItem)==FALSE)
|
||||
{
|
||||
//创建对象
|
||||
try
|
||||
{
|
||||
INT_PTR nStroeCount=m_PageItemBuffer.GetCount();
|
||||
if (nStroeCount>0)
|
||||
{
|
||||
pGamePageItem=m_PageItemBuffer[nStroeCount-1];
|
||||
m_PageItemBuffer.RemoveAt(nStroeCount-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pGamePageItem=new CGamePageItem;
|
||||
if (pGamePageItem==NULL) return false;
|
||||
}
|
||||
}
|
||||
catch (...) { return false; }
|
||||
|
||||
//设置变量
|
||||
ZeroMemory(pGamePageItem,sizeof(CGamePageItem));
|
||||
}
|
||||
|
||||
//设置数据
|
||||
pGamePageItem->m_bDisuse=false;
|
||||
CopyMemory(&pGamePageItem->m_GamePage,pGamePage,sizeof(tagGamePage));
|
||||
|
||||
//设置索引
|
||||
m_PageItemMap[pGamePage->wPageID]=pGamePageItem;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//插入房间
|
||||
bool CServerListManager::InsertGameServer(tagGameServer * pGameServer)
|
||||
{
|
||||
//效验参数
|
||||
ASSERT(pGameServer!=NULL);
|
||||
if (pGameServer==NULL) return false;
|
||||
|
||||
//查找房间
|
||||
WORD wKindID=0;
|
||||
DWORD dwOnLineCount=0L;
|
||||
DWORD dwMaxPlayer=0L;
|
||||
CGameServerItem * pGameServerItem=NULL;
|
||||
|
||||
//获取子项
|
||||
if (m_ServerItemMap.Lookup(pGameServer->wServerID,pGameServerItem)==FALSE)
|
||||
{
|
||||
//创建对象
|
||||
try
|
||||
{
|
||||
INT_PTR nStroeCount=m_ServerItemBuffer.GetCount();
|
||||
if (nStroeCount>0)
|
||||
{
|
||||
pGameServerItem=m_ServerItemBuffer[nStroeCount-1];
|
||||
m_ServerItemBuffer.RemoveAt(nStroeCount-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pGameServerItem=new CGameServerItem;
|
||||
if (pGameServerItem==NULL) return false;
|
||||
}
|
||||
}
|
||||
catch (...) { return false; }
|
||||
|
||||
//设置变量
|
||||
ZeroMemory(pGameServerItem,sizeof(CGameServerItem));
|
||||
}
|
||||
else
|
||||
{
|
||||
//保存变量
|
||||
wKindID=pGameServerItem->m_GameServer.wKindID;
|
||||
dwOnLineCount=pGameServerItem->m_GameServer.dwOnLineCount;
|
||||
dwMaxPlayer=pGameServerItem->m_GameServer.dwFullCount;
|
||||
}
|
||||
|
||||
//设置数据
|
||||
pGameServerItem->m_bDisuse=false;
|
||||
CopyMemory(&pGameServerItem->m_GameServer,pGameServer,sizeof(tagGameServer));
|
||||
|
||||
//设置人数
|
||||
if (wKindID!=pGameServerItem->m_GameServer.wKindID)
|
||||
{
|
||||
//变量定义
|
||||
CGameKindItem * pGameKindItemLast=NULL;
|
||||
CGameKindItem * pGameKindItemCurrent=NULL;
|
||||
|
||||
//历史人数
|
||||
if ((wKindID!=0)&&(m_KindItemMap.Lookup(wKindID,pGameKindItemLast)==TRUE))
|
||||
{
|
||||
pGameKindItemLast->m_GameKind.dwOnLineCount-=dwOnLineCount;
|
||||
pGameKindItemLast->m_GameKind.dwFullCount-=dwMaxPlayer;
|
||||
}
|
||||
|
||||
//当前人数
|
||||
if (m_KindItemMap.Lookup(pGameServer->wKindID,pGameKindItemCurrent)==TRUE)
|
||||
{
|
||||
pGameKindItemCurrent->m_GameKind.dwOnLineCount+=pGameServer->dwOnLineCount;
|
||||
pGameKindItemCurrent->m_GameKind.dwFullCount+=pGameServer->dwFullCount;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//查找类型
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
m_KindItemMap.Lookup(wKindID,pGameKindItem);
|
||||
|
||||
//设置人数
|
||||
if (pGameKindItem!=NULL)
|
||||
{
|
||||
pGameKindItem->m_GameKind.dwOnLineCount-=dwOnLineCount;
|
||||
pGameKindItem->m_GameKind.dwOnLineCount+=pGameServer->dwOnLineCount;
|
||||
|
||||
pGameKindItem->m_GameKind.dwFullCount-=dwMaxPlayer;
|
||||
pGameKindItem->m_GameKind.dwFullCount+=pGameServer->dwFullCount;
|
||||
}
|
||||
}
|
||||
|
||||
//设置索引
|
||||
m_ServerItemMap[pGameServer->wServerID]=pGameServerItem;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//删除种类
|
||||
bool CServerListManager::DeleteGameType(WORD wTypeID)
|
||||
{
|
||||
//查找种类
|
||||
CGameTypeItem * pGameTypeItem=NULL;
|
||||
if (m_TypeItemMap.Lookup(wTypeID,pGameTypeItem)==FALSE) return false;
|
||||
|
||||
//删除数据
|
||||
m_TypeItemMap.RemoveKey(wTypeID);
|
||||
m_TypeItemBuffer.Add(pGameTypeItem);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//删除类型
|
||||
bool CServerListManager::DeleteGameKind(WORD wKindID)
|
||||
{
|
||||
//查找类型
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
if (m_KindItemMap.Lookup(wKindID,pGameKindItem)==FALSE) return false;
|
||||
|
||||
//删除数据
|
||||
m_KindItemMap.RemoveKey(wKindID);
|
||||
m_KindItemBuffer.Add(pGameKindItem);
|
||||
|
||||
//设置变量
|
||||
ZeroMemory(pGameKindItem,sizeof(CGameKindItem));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//删除节点
|
||||
bool CServerListManager::DeleteGameNode(WORD wNodeID)
|
||||
{
|
||||
//查找节点
|
||||
CGameNodeItem * pGameNodeItem=NULL;
|
||||
if (m_NodeItemMap.Lookup(wNodeID,pGameNodeItem)==FALSE) return false;
|
||||
|
||||
//删除数据
|
||||
m_NodeItemMap.RemoveKey(wNodeID);
|
||||
m_NodeItemBuffer.Add(pGameNodeItem);
|
||||
|
||||
//设置变量
|
||||
ZeroMemory(pGameNodeItem,sizeof(CGameNodeItem));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//删除房间
|
||||
bool CServerListManager::DeleteGameServer(WORD wServerID)
|
||||
{
|
||||
//查找房间
|
||||
CGameServerItem * pGameServerItem=NULL;
|
||||
if (m_ServerItemMap.Lookup(wServerID,pGameServerItem)==FALSE) return false;
|
||||
|
||||
//删除数据
|
||||
m_ServerItemMap.RemoveKey(wServerID);
|
||||
m_ServerItemBuffer.Add(pGameServerItem);
|
||||
|
||||
//设置人数
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
if (m_KindItemMap.Lookup(pGameServerItem->m_GameServer.wKindID,pGameKindItem)==TRUE)
|
||||
{
|
||||
tagGameServer * pGameServer=&pGameServerItem->m_GameServer;
|
||||
pGameKindItem->m_GameKind.dwOnLineCount= __max(pGameKindItem->m_GameKind.dwOnLineCount-pGameServer->dwOnLineCount,0);
|
||||
pGameKindItem->m_GameKind.dwFullCount = __max(pGameKindItem->m_GameKind.dwFullCount-pGameServer->dwFullCount,0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//删除定制
|
||||
bool CServerListManager::DeleteGamePage(WORD wPageID)
|
||||
{
|
||||
//查找类型
|
||||
CGamePageItem * pGamePageItem=NULL;
|
||||
if (m_PageItemMap.Lookup(wPageID,pGamePageItem)==FALSE) return false;
|
||||
|
||||
//删除数据
|
||||
m_PageItemMap.RemoveKey(wPageID);
|
||||
m_PageItemBuffer.Add(pGamePageItem);
|
||||
|
||||
//设置变量
|
||||
ZeroMemory(pGamePageItem,sizeof(CGamePageItem));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//枚举种类
|
||||
CGameTypeItem * CServerListManager::EmunGameTypeItem(POSITION & Position)
|
||||
{
|
||||
//变量定义
|
||||
WORD wKey=0;
|
||||
CGameTypeItem * pGameTypeItem=NULL;
|
||||
|
||||
//获取对象
|
||||
if (Position==NULL) Position=m_TypeItemMap.GetStartPosition();
|
||||
if (Position!=NULL) m_TypeItemMap.GetNextAssoc(Position,wKey,pGameTypeItem);
|
||||
|
||||
return pGameTypeItem;
|
||||
}
|
||||
|
||||
//枚举类型
|
||||
CGameKindItem * CServerListManager::EmunGameKindItem(POSITION & Position)
|
||||
{
|
||||
//变量定义
|
||||
WORD wKey=0;
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
|
||||
//获取对象
|
||||
if (Position==NULL) Position=m_KindItemMap.GetStartPosition();
|
||||
if (Position!=NULL) m_KindItemMap.GetNextAssoc(Position,wKey,pGameKindItem);
|
||||
|
||||
return pGameKindItem;
|
||||
}
|
||||
|
||||
//枚举节点
|
||||
CGameNodeItem * CServerListManager::EmunGameNodeItem(POSITION & Position)
|
||||
{
|
||||
//变量定义
|
||||
WORD wKey=0;
|
||||
CGameNodeItem * pGameNodeItem=NULL;
|
||||
|
||||
//获取对象
|
||||
if (Position==NULL) Position=m_NodeItemMap.GetStartPosition();
|
||||
if (Position!=NULL) m_NodeItemMap.GetNextAssoc(Position,wKey,pGameNodeItem);
|
||||
|
||||
return pGameNodeItem;
|
||||
}
|
||||
|
||||
//枚举房间
|
||||
CGameServerItem * CServerListManager::EmunGameServerItem(POSITION & Position)
|
||||
{
|
||||
//变量定义
|
||||
WORD wKey=0;
|
||||
CGameServerItem * pGameServerItem=NULL;
|
||||
|
||||
//获取对象
|
||||
if (Position==NULL) Position=m_ServerItemMap.GetStartPosition();
|
||||
if (Position!=NULL) m_ServerItemMap.GetNextAssoc(Position,wKey,pGameServerItem);
|
||||
|
||||
return pGameServerItem;
|
||||
}
|
||||
|
||||
//枚举定制
|
||||
CGamePageItem * CServerListManager::EmunGamePageItem(POSITION & Position)
|
||||
{
|
||||
//变量定义
|
||||
WORD wKey=0;
|
||||
CGamePageItem * pGamePageItem=NULL;
|
||||
|
||||
//获取对象
|
||||
if (Position==NULL) Position=m_PageItemMap.GetStartPosition();
|
||||
if (Position!=NULL) m_PageItemMap.GetNextAssoc(Position,wKey,pGamePageItem);
|
||||
|
||||
return pGamePageItem;
|
||||
}
|
||||
|
||||
//查找种类
|
||||
CGameTypeItem * CServerListManager::SearchGameType(WORD wTypeID)
|
||||
{
|
||||
CGameTypeItem * pGameTypeItem=NULL;
|
||||
m_TypeItemMap.Lookup(wTypeID,pGameTypeItem);
|
||||
return pGameTypeItem;
|
||||
}
|
||||
|
||||
//查找类型
|
||||
CGameKindItem * CServerListManager::SearchGameKind(WORD wKindID)
|
||||
{
|
||||
CGameKindItem * pGameKindItem=NULL;
|
||||
m_KindItemMap.Lookup(wKindID,pGameKindItem);
|
||||
return pGameKindItem;
|
||||
}
|
||||
|
||||
//查找节点
|
||||
CGameNodeItem * CServerListManager::SearchGameNode(WORD wNodeID)
|
||||
{
|
||||
CGameNodeItem * pGameNodeItem=NULL;
|
||||
m_NodeItemMap.Lookup(wNodeID,pGameNodeItem);
|
||||
return pGameNodeItem;
|
||||
}
|
||||
|
||||
//查找房间
|
||||
CGameServerItem * CServerListManager::SearchGameServer(WORD wServerID)
|
||||
{
|
||||
CGameServerItem * pGameServerItem=NULL;
|
||||
m_ServerItemMap.Lookup(wServerID,pGameServerItem);
|
||||
return pGameServerItem;
|
||||
}
|
||||
|
||||
//查找定制
|
||||
CGamePageItem * CServerListManager::SearchGamePage(WORD wPageID)
|
||||
{
|
||||
CGamePageItem * pGamePageItem=NULL;
|
||||
m_PageItemMap.Lookup(wPageID,pGamePageItem);
|
||||
return pGamePageItem;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
247
Servers/服务器组件/登录服务器/ServerListManager.h
Normal file
247
Servers/服务器组件/登录服务器/ServerListManager.h
Normal file
@@ -0,0 +1,247 @@
|
||||
#ifndef SERVER_LIST_MANAGER_HEAD_FILE
|
||||
#define SERVER_LIST_MANAGER_HEAD_FILE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Stdafx.h"
|
||||
#include "AfxTempl.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//列表管理
|
||||
namespace NServerListManager
|
||||
{
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//游戏子项
|
||||
class CGameListItem
|
||||
{
|
||||
//变量定义
|
||||
public:
|
||||
bool m_bDisuse; //废弃标志
|
||||
|
||||
//函数定义
|
||||
protected:
|
||||
//构造函数
|
||||
CGameListItem() { m_bDisuse=false; }
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//种类结构
|
||||
class CGameTypeItem : public CGameListItem
|
||||
{
|
||||
//变量定义
|
||||
public:
|
||||
tagGameType m_GameType; //种类信息
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CGameTypeItem();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//类型结构
|
||||
class CGameKindItem : public CGameListItem
|
||||
{
|
||||
//变量定义
|
||||
public:
|
||||
tagGameKind m_GameKind; //类型信息
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CGameKindItem();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//节点结构
|
||||
class CGameNodeItem : public CGameListItem
|
||||
{
|
||||
//变量定义
|
||||
public:
|
||||
tagGameNode m_GameNode; //节点信息
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CGameNodeItem();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//定制结构
|
||||
class CGamePageItem : public CGameListItem
|
||||
{
|
||||
//变量定义
|
||||
public:
|
||||
tagGamePage m_GamePage; //定制信息
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CGamePageItem();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//房间结构
|
||||
class CGameServerItem : public CGameListItem
|
||||
{
|
||||
//变量定义
|
||||
public:
|
||||
tagGameServer m_GameServer; //房间信息
|
||||
tagGameMatch m_GameMatch; //比赛信息
|
||||
|
||||
//功能函数
|
||||
public:
|
||||
//比赛房间
|
||||
bool IsMatchServer() { return m_GameMatch.wServerID==m_GameServer.wServerID && m_GameMatch.dwMatchID!=0; }
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CGameServerItem();
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//数组说明
|
||||
typedef CWHArray<CGameTypeItem *> CGameTypeItemArray;
|
||||
typedef CWHArray<CGameKindItem *> CGameKindItemArray;
|
||||
typedef CWHArray<CGameNodeItem *> CGameNodeItemArray;
|
||||
typedef CWHArray<CGamePageItem *> CGamePageItemArray;
|
||||
typedef CWHArray<CGameServerItem *> CGameServerItemArray;
|
||||
|
||||
//索引说明
|
||||
typedef CMap<WORD,WORD,CGameTypeItem *,CGameTypeItem * &> CTypeItemMap;
|
||||
typedef CMap<WORD,WORD,CGameKindItem *,CGameKindItem * &> CKindItemMap;
|
||||
typedef CMap<WORD,WORD,CGameNodeItem *,CGameNodeItem * &> CNodeItemMap;
|
||||
typedef CMap<WORD,WORD,CGamePageItem *,CGamePageItem * &> CPageItemMap;
|
||||
typedef CMap<WORD,WORD,CGameServerItem *,CGameServerItem * &> CServerItemMap;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//列表服务
|
||||
class CServerListManager
|
||||
{
|
||||
//索引变量
|
||||
protected:
|
||||
CTypeItemMap m_TypeItemMap; //种类索引
|
||||
CKindItemMap m_KindItemMap; //类型索引
|
||||
CNodeItemMap m_NodeItemMap; //节点索引
|
||||
CPageItemMap m_PageItemMap; //定制索引
|
||||
CServerItemMap m_ServerItemMap; //房间索引
|
||||
|
||||
//存储变量
|
||||
protected:
|
||||
CGameTypeItemArray m_TypeItemBuffer; //种类数组
|
||||
CGameKindItemArray m_KindItemBuffer; //类型数组
|
||||
CGameNodeItemArray m_NodeItemBuffer; //节点数组
|
||||
CGamePageItemArray m_PageItemBuffer; //定制数组
|
||||
CGameServerItemArray m_ServerItemBuffer; //房间数组
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CServerListManager();
|
||||
//析构函数
|
||||
virtual ~CServerListManager();
|
||||
|
||||
//管理接口
|
||||
public:
|
||||
//重置列表
|
||||
VOID ResetServerList();
|
||||
//清理内核
|
||||
VOID CleanKernelItem();
|
||||
//清理房间
|
||||
VOID CleanServerItem();
|
||||
//废弃内核
|
||||
VOID DisuseKernelItem();
|
||||
//废弃房间
|
||||
VOID DisuseServerItem();
|
||||
|
||||
//统计接口
|
||||
public:
|
||||
//统计人数
|
||||
DWORD CollectOnlineInfo();
|
||||
//类型在线
|
||||
DWORD CollectOnlineInfo(WORD wKindID);
|
||||
|
||||
//插入接口
|
||||
public:
|
||||
//插入种类
|
||||
bool InsertGameType(tagGameType * pGameType);
|
||||
//插入类型
|
||||
bool InsertGameKind(tagGameKind * pGameKind);
|
||||
//插入节点
|
||||
bool InsertGameNode(tagGameNode * pGameNode);
|
||||
//插入定制
|
||||
bool InsertGamePage(tagGamePage * pGamePage);
|
||||
//插入房间
|
||||
bool InsertGameServer(tagGameServer * pGameServer);
|
||||
|
||||
//删除接口
|
||||
public:
|
||||
//删除种类
|
||||
bool DeleteGameType(WORD wTypeID);
|
||||
//删除类型
|
||||
bool DeleteGameKind(WORD wKindID);
|
||||
//删除节点
|
||||
bool DeleteGameNode(WORD wNodeID);
|
||||
//删除定制
|
||||
bool DeleteGamePage(WORD wPageID);
|
||||
//删除房间
|
||||
bool DeleteGameServer(WORD wServerID);
|
||||
|
||||
//枚举接口
|
||||
public:
|
||||
//枚举种类
|
||||
CGameTypeItem * EmunGameTypeItem(POSITION & Position);
|
||||
//枚举类型
|
||||
CGameKindItem * EmunGameKindItem(POSITION & Position);
|
||||
//枚举节点
|
||||
CGameNodeItem * EmunGameNodeItem(POSITION & Position);
|
||||
//枚举定制
|
||||
CGamePageItem * EmunGamePageItem(POSITION & Position);
|
||||
//枚举房间
|
||||
CGameServerItem * EmunGameServerItem(POSITION & Position);
|
||||
|
||||
//查找接口
|
||||
public:
|
||||
//查找种类
|
||||
CGameTypeItem * SearchGameType(WORD wTypeID);
|
||||
//查找类型
|
||||
CGameKindItem * SearchGameKind(WORD wKindID);
|
||||
//查找节点
|
||||
CGameNodeItem * SearchGameNode(WORD wNodeID);
|
||||
//查找定制
|
||||
CGamePageItem * SearchGamePage(WORD wPageID);
|
||||
//查找房间
|
||||
CGameServerItem * SearchGameServer(WORD wServerID);
|
||||
|
||||
//数目接口
|
||||
public:
|
||||
//种类数目
|
||||
DWORD GetGameTypeCount() { return (DWORD)m_TypeItemMap.GetCount(); }
|
||||
//类型数目
|
||||
DWORD GetGameKindCount() { return (DWORD)m_KindItemMap.GetCount(); }
|
||||
//节点数目
|
||||
DWORD GetGameNodeCount() { return (DWORD)m_NodeItemMap.GetCount(); }
|
||||
//定制数目
|
||||
DWORD GetGamePageCount() { return (DWORD)m_PageItemMap.GetCount(); }
|
||||
//房间数目
|
||||
DWORD GetGameServerCount() { return (DWORD)m_ServerItemMap.GetCount(); }
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
};
|
||||
|
||||
using namespace NServerListManager;
|
||||
|
||||
#endif
|
||||
338
Servers/服务器组件/登录服务器/ServiceUnits.cpp
Normal file
338
Servers/服务器组件/登录服务器/ServiceUnits.cpp
Normal file
@@ -0,0 +1,338 @@
|
||||
#include "StdAfx.h"
|
||||
#include "ServiceUnits.h"
|
||||
#include "ControlPacket.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//静态变量
|
||||
CServiceUnits * CServiceUnits::g_pServiceUnits=NULL; //对象指针
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_MESSAGE_MAP(CServiceUnits, CWnd)
|
||||
ON_MESSAGE(WM_UICONTROL_REQUEST,OnUIControlRequest)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//构造函数
|
||||
CServiceUnits::CServiceUnits()
|
||||
{
|
||||
//设置变量
|
||||
m_ServiceStatus=ServiceStatus_Stop;
|
||||
|
||||
//设置接口
|
||||
m_pIServiceUnitsSink=NULL;
|
||||
|
||||
//设置对象
|
||||
ASSERT(g_pServiceUnits==NULL);
|
||||
if (g_pServiceUnits==NULL) g_pServiceUnits=this;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//析构函数
|
||||
CServiceUnits::~CServiceUnits()
|
||||
{
|
||||
ConcludeService();
|
||||
}
|
||||
|
||||
//启动服务
|
||||
bool CServiceUnits::StartService()
|
||||
{
|
||||
//效验状态
|
||||
ASSERT(m_ServiceStatus==ServiceStatus_Stop);
|
||||
if (m_ServiceStatus!=ServiceStatus_Stop) return false;
|
||||
|
||||
//设置状态
|
||||
SetServiceStatus(ServiceStatus_Config);
|
||||
|
||||
//创建窗口
|
||||
if (m_hWnd==NULL)
|
||||
{
|
||||
CRect rcCreate(0,0,0,0);
|
||||
Create(NULL,NULL,WS_CHILD,rcCreate,AfxGetMainWnd(),100);
|
||||
}
|
||||
|
||||
//配置服务
|
||||
if (InitializeService()==false)
|
||||
{
|
||||
ConcludeService();
|
||||
return false;
|
||||
}
|
||||
|
||||
//启动内核
|
||||
if (StartKernelService()==false)
|
||||
{
|
||||
ConcludeService();
|
||||
return false;
|
||||
}
|
||||
|
||||
//获取列表
|
||||
SendControlPacket(CT_LOAD_DB_GAME_LIST,NULL,0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//停止服务
|
||||
bool CServiceUnits::ConcludeService()
|
||||
{
|
||||
//设置变量
|
||||
SetServiceStatus(ServiceStatus_Stop);
|
||||
|
||||
//停止服务
|
||||
if (m_TimerEngine.GetInterface()!=NULL) m_TimerEngine->ConcludeService();
|
||||
if (m_AttemperEngine.GetInterface()!=NULL) m_AttemperEngine->ConcludeService();
|
||||
if (m_DataBaseEngine.GetInterface()!=NULL) m_DataBaseEngine->ConcludeService();
|
||||
if (m_TCPNetworkEngine.GetInterface()!=NULL) m_TCPNetworkEngine->ConcludeService();
|
||||
if (m_TCPSocketService.GetInterface()!=NULL) m_TCPSocketService->ConcludeService();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//设置接口
|
||||
bool CServiceUnits::SetServiceUnitsSink(IServiceUnitsSink * pIServiceUnitsSink)
|
||||
{
|
||||
//设置变量
|
||||
m_pIServiceUnitsSink=pIServiceUnitsSink;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//投递请求
|
||||
bool CServiceUnits::PostControlRequest(WORD wIdentifier, VOID * pData, WORD wDataSize)
|
||||
{
|
||||
//状态判断
|
||||
ASSERT(IsWindow(m_hWnd));
|
||||
if (IsWindow(m_hWnd)==FALSE) return false;
|
||||
|
||||
//插入队列
|
||||
CWHDataLocker DataLocker(m_CriticalSection);
|
||||
if (m_DataQueue.InsertData(wIdentifier,pData,wDataSize)==false) return false;
|
||||
|
||||
//发送消息
|
||||
PostMessage(WM_UICONTROL_REQUEST,wIdentifier,wDataSize);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//配置组件
|
||||
bool CServiceUnits::InitializeService()
|
||||
{
|
||||
//加载参数
|
||||
m_InitParameter.LoadInitParameter();
|
||||
|
||||
//创建组件
|
||||
if ((m_TimerEngine.GetInterface()==NULL)&&(m_TimerEngine.CreateInstance()==false)) return false;
|
||||
if ((m_AttemperEngine.GetInterface()==NULL)&&(m_AttemperEngine.CreateInstance()==false)) return false;
|
||||
if ((m_DataBaseEngine.GetInterface()==NULL)&&(m_DataBaseEngine.CreateInstance()==false)) return false;
|
||||
if ((m_TCPNetworkEngine.GetInterface()==NULL)&&(m_TCPNetworkEngine.CreateInstance()==false)) return false;
|
||||
if ((m_TCPSocketService.GetInterface()==NULL)&&(m_TCPSocketService.CreateInstance()==false)) return false;
|
||||
|
||||
//组件接口
|
||||
IUnknownEx * pIAttemperEngine=m_AttemperEngine.GetInterface();
|
||||
IUnknownEx * pITCPNetworkEngine=m_TCPNetworkEngine.GetInterface();
|
||||
IUnknownEx * pIAttemperEngineSink=QUERY_OBJECT_INTERFACE(m_AttemperEngineSink,IUnknownEx);
|
||||
|
||||
//数据引擎
|
||||
IUnknownEx * pIDataBaseEngineSink[CountArray(m_DataBaseEngineSink)];
|
||||
for (WORD i=0;i<CountArray(pIDataBaseEngineSink);i++) pIDataBaseEngineSink[i]=QUERY_OBJECT_INTERFACE(m_DataBaseEngineSink[i],IUnknownEx);
|
||||
|
||||
//内核组件
|
||||
if (m_TimerEngine->SetTimerEngineEvent(pIAttemperEngine)==false) return false;
|
||||
if (m_AttemperEngine->SetNetworkEngine(pITCPNetworkEngine)==false) return false;
|
||||
if (m_AttemperEngine->SetAttemperEngineSink(pIAttemperEngineSink)==false) return false;
|
||||
if (m_TCPNetworkEngine->SetTCPNetworkEngineEvent(pIAttemperEngine)==false) return false;
|
||||
if (m_DataBaseEngine->SetDataBaseEngineSink(pIDataBaseEngineSink,CountArray(pIDataBaseEngineSink))==false) return false;
|
||||
|
||||
//协调服务
|
||||
if (m_TCPSocketService->SetServiceID(NETWORK_CORRESPOND)==false) return false;
|
||||
if (m_TCPSocketService->SetTCPSocketEvent(pIAttemperEngine)==false) return false;
|
||||
|
||||
//调度回调
|
||||
m_AttemperEngineSink.m_pInitParameter=&m_InitParameter;
|
||||
m_AttemperEngineSink.m_pITimerEngine=m_TimerEngine.GetInterface();
|
||||
m_AttemperEngineSink.m_pIDataBaseEngine=m_DataBaseEngine.GetInterface();
|
||||
m_AttemperEngineSink.m_pITCPNetworkEngine=m_TCPNetworkEngine.GetInterface();
|
||||
m_AttemperEngineSink.m_pITCPSocketService=m_TCPSocketService.GetInterface();
|
||||
|
||||
//数据库回调
|
||||
for (INT i=0;i<CountArray(m_DataBaseEngineSink);i++)
|
||||
{
|
||||
m_DataBaseEngineSink[i].m_pInitParameter=&m_InitParameter;
|
||||
m_DataBaseEngineSink[i].m_pIDataBaseEngineEvent=QUERY_OBJECT_PTR_INTERFACE(pIAttemperEngine,IDataBaseEngineEvent);
|
||||
}
|
||||
|
||||
//配置网络
|
||||
WORD wMaxConnect=m_InitParameter.m_wMaxConnect;
|
||||
WORD wServicePort=m_InitParameter.m_wServicePort;
|
||||
if (m_TCPNetworkEngine->SetServiceParameter(wServicePort,wMaxConnect,NULL)==false) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//启动内核
|
||||
bool CServiceUnits::StartKernelService()
|
||||
{
|
||||
//时间引擎
|
||||
if (m_TimerEngine->StartService()==false)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return false;
|
||||
}
|
||||
|
||||
//调度引擎
|
||||
if (m_AttemperEngine->StartService()==false)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return false;
|
||||
}
|
||||
|
||||
//数据引擎
|
||||
if (m_DataBaseEngine->StartService()==false)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return false;
|
||||
}
|
||||
|
||||
//协调引擎
|
||||
if (m_TCPSocketService->StartService()==false)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//启动网络
|
||||
bool CServiceUnits::StartNetworkService()
|
||||
{
|
||||
//网络引擎
|
||||
if (m_TCPNetworkEngine->StartService()==false)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//设置状态
|
||||
bool CServiceUnits::SetServiceStatus(enServiceStatus ServiceStatus)
|
||||
{
|
||||
//状态判断
|
||||
if (m_ServiceStatus!=ServiceStatus)
|
||||
{
|
||||
//错误通知
|
||||
if ((m_ServiceStatus!=ServiceStatus_Service)&&(ServiceStatus==ServiceStatus_Stop))
|
||||
{
|
||||
LPCTSTR pszString=TEXT("服务启动失败");
|
||||
CTraceService::TraceString(pszString,TraceLevel_Exception);
|
||||
}
|
||||
|
||||
//设置变量
|
||||
m_ServiceStatus=ServiceStatus;
|
||||
|
||||
//状态通知
|
||||
ASSERT(m_pIServiceUnitsSink!=NULL);
|
||||
if (m_pIServiceUnitsSink!=NULL) m_pIServiceUnitsSink->OnServiceUnitsStatus(m_ServiceStatus);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//发送控制
|
||||
bool CServiceUnits::SendControlPacket(WORD wControlID, VOID * pData, WORD wDataSize)
|
||||
{
|
||||
//状态效验
|
||||
ASSERT(m_AttemperEngine.GetInterface()!=NULL);
|
||||
if (m_AttemperEngine.GetInterface()==NULL) return false;
|
||||
|
||||
//发送控制
|
||||
m_AttemperEngine->OnEventControl(wControlID,pData,wDataSize);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//控制消息
|
||||
LRESULT CServiceUnits::OnUIControlRequest(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
//变量定义
|
||||
tagDataHead DataHead;
|
||||
BYTE cbBuffer[MAX_ASYNCHRONISM_DATA];
|
||||
|
||||
//提取数据
|
||||
CWHDataLocker DataLocker(m_CriticalSection);
|
||||
if (m_DataQueue.DistillData(DataHead,cbBuffer,sizeof(cbBuffer))==false)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//数据处理
|
||||
switch (DataHead.wIdentifier)
|
||||
{
|
||||
case UI_LOAD_DB_LIST_RESULT: //列表结果
|
||||
{
|
||||
//效验消息
|
||||
ASSERT(DataHead.wDataSize==sizeof(CP_ControlResult));
|
||||
if (DataHead.wDataSize!=sizeof(CP_ControlResult)) return 0;
|
||||
|
||||
//变量定义
|
||||
CP_ControlResult * pControlResult=(CP_ControlResult *)cbBuffer;
|
||||
|
||||
//失败处理
|
||||
if ((m_ServiceStatus!=ServiceStatus_Service)&&(pControlResult->cbSuccess==ER_FAILURE))
|
||||
{
|
||||
ConcludeService();
|
||||
return 0;
|
||||
}
|
||||
|
||||
//成功处理
|
||||
if ((m_ServiceStatus!=ServiceStatus_Service)&&(pControlResult->cbSuccess==ER_SUCCESS))
|
||||
{
|
||||
//连接协调
|
||||
SendControlPacket(CT_CONNECT_CORRESPOND,NULL,0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
case UI_CORRESPOND_RESULT: //协调结果
|
||||
{
|
||||
//效验消息
|
||||
ASSERT(DataHead.wDataSize==sizeof(CP_ControlResult));
|
||||
if (DataHead.wDataSize!=sizeof(CP_ControlResult)) return 0;
|
||||
|
||||
//变量定义
|
||||
CP_ControlResult * pControlResult=(CP_ControlResult *)cbBuffer;
|
||||
|
||||
//失败处理
|
||||
if ((m_ServiceStatus!=ServiceStatus_Service)&&(pControlResult->cbSuccess==ER_FAILURE))
|
||||
{
|
||||
ConcludeService();
|
||||
return 0;
|
||||
}
|
||||
|
||||
//成功处理
|
||||
if ((m_ServiceStatus!=ServiceStatus_Service)&&(pControlResult->cbSuccess==ER_SUCCESS))
|
||||
{
|
||||
//启动网络
|
||||
if (StartNetworkService()==false)
|
||||
{
|
||||
ConcludeService();
|
||||
return 0;
|
||||
}
|
||||
|
||||
//设置状态
|
||||
SetServiceStatus(ServiceStatus_Service);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
133
Servers/服务器组件/登录服务器/ServiceUnits.h
Normal file
133
Servers/服务器组件/登录服务器/ServiceUnits.h
Normal file
@@ -0,0 +1,133 @@
|
||||
#ifndef SERVICE_UNITS_HEAD_FILE
|
||||
#define SERVICE_UNITS_HEAD_FILE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Stdafx.h"
|
||||
#include "InitParameter.h"
|
||||
#include "AttemperEngineSink.h"
|
||||
#include "DataBaseEngineSink.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//网络标示
|
||||
#define NETWORK_CORRESPOND 1 //登录连接
|
||||
|
||||
//消息定义
|
||||
#define WM_UICONTROL_REQUEST (WM_USER+100) //控制请求
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//枚举定义
|
||||
|
||||
//服务状态
|
||||
enum enServiceStatus
|
||||
{
|
||||
ServiceStatus_Stop, //停止状态
|
||||
ServiceStatus_Config, //配置状态
|
||||
ServiceStatus_Service, //服务状态
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//状态接口
|
||||
interface IServiceUnitsSink
|
||||
{
|
||||
//接口定义
|
||||
public:
|
||||
//服务状态
|
||||
virtual VOID OnServiceUnitsStatus(enServiceStatus ServiceStatus)=NULL;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//服务单元
|
||||
class CServiceUnits : public CWnd
|
||||
{
|
||||
//友元定义
|
||||
friend class CAttemperEngineSink;
|
||||
friend class CDataBaseEngineSink;
|
||||
|
||||
//状态变量
|
||||
protected:
|
||||
enServiceStatus m_ServiceStatus; //运行状态
|
||||
|
||||
//配置组件
|
||||
public:
|
||||
CInitParameter m_InitParameter; //配置参数
|
||||
|
||||
//组件变量
|
||||
private:
|
||||
CWHDataQueue m_DataQueue; //数据队列
|
||||
CCriticalSection m_CriticalSection; //同步对象
|
||||
|
||||
//服务组件
|
||||
protected:
|
||||
CAttemperEngineSink m_AttemperEngineSink; //调度钩子
|
||||
CDataBaseEngineSink m_DataBaseEngineSink[4]; //数据钩子
|
||||
|
||||
//内核组件
|
||||
protected:
|
||||
CTimerEngineHelper m_TimerEngine; //时间引擎
|
||||
CAttemperEngineHelper m_AttemperEngine; //调度引擎
|
||||
CDataBaseEngineHelper m_DataBaseEngine; //数据引擎
|
||||
CTCPNetworkEngineHelper m_TCPNetworkEngine; //网络引擎
|
||||
CTCPSocketServiceHelper m_TCPSocketService; //协调服务
|
||||
|
||||
//接口变量
|
||||
protected:
|
||||
IServiceUnitsSink * m_pIServiceUnitsSink; //状态接口
|
||||
|
||||
//静态变量
|
||||
public:
|
||||
static CServiceUnits * g_pServiceUnits; //对象指针
|
||||
|
||||
//函数定义
|
||||
public:
|
||||
//构造函数
|
||||
CServiceUnits();
|
||||
//析构函数
|
||||
virtual ~CServiceUnits();
|
||||
|
||||
//信息函数
|
||||
public:
|
||||
//获取状态
|
||||
enServiceStatus GetServiceStatus() { return m_ServiceStatus; }
|
||||
|
||||
//服务控制
|
||||
public:
|
||||
//启动服务
|
||||
bool StartService();
|
||||
//停止服务
|
||||
bool ConcludeService();
|
||||
//设置接口
|
||||
bool SetServiceUnitsSink(IServiceUnitsSink * pIServiceUnitsSink);
|
||||
//投递请求
|
||||
bool PostControlRequest(WORD wIdentifier, VOID * pData, WORD wDataSize);
|
||||
|
||||
//辅助函数
|
||||
protected:
|
||||
//配置组件
|
||||
bool InitializeService();
|
||||
//启动内核
|
||||
bool StartKernelService();
|
||||
//启动网络
|
||||
bool StartNetworkService();
|
||||
|
||||
//内部函数
|
||||
private:
|
||||
//设置状态
|
||||
bool SetServiceStatus(enServiceStatus ServiceStatus);
|
||||
//发送控制
|
||||
bool SendControlPacket(WORD wControlID, VOID * pData, WORD wDataSize);
|
||||
|
||||
//消息映射
|
||||
protected:
|
||||
//控制消息
|
||||
LRESULT OnUIControlRequest(WPARAM wParam, LPARAM lParam);
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
3
Servers/服务器组件/登录服务器/Stdafx.cpp
Normal file
3
Servers/服务器组件/登录服务器/Stdafx.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#include "Stdafx.h"
|
||||
|
||||
|
||||
72
Servers/服务器组件/登录服务器/Stdafx.h
Normal file
72
Servers/服务器组件/登录服务器/Stdafx.h
Normal file
@@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//MFC 文件
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN
|
||||
#endif
|
||||
|
||||
#ifndef WINVER
|
||||
#define WINVER 0x0501
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS
|
||||
#define _WIN32_WINDOWS 0x0410
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE
|
||||
#define _WIN32_IE 0x0400
|
||||
#endif
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
|
||||
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <AfxWin.h>
|
||||
#include <AfxExt.h>
|
||||
#include <AfxDisp.h>
|
||||
#include <AfxDtctl.h>
|
||||
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <AfxCmn.h>
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//包含文件
|
||||
|
||||
//平台定义
|
||||
#include "..\..\全局定义\Platform.h"
|
||||
#include "..\..\消息定义\CMD_Correspond.h"
|
||||
#include "..\..\消息定义\CMD_LogonServer.h"
|
||||
|
||||
//组件定义
|
||||
#include "..\..\服务器组件\服务核心\ServiceCoreHead.h"
|
||||
#include "..\..\服务器组件\内核引擎\KernelEngineHead.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//链接代码
|
||||
|
||||
#ifndef _DEBUG
|
||||
#ifndef _UNICODE
|
||||
#pragma comment (lib,"../../链接库/Ansi/ServiceCore.lib")
|
||||
#pragma comment (lib,"../../链接库/Ansi/KernelEngine.lib")
|
||||
#else
|
||||
#pragma comment (lib,"../../链接库/Unicode/ServiceCore.lib")
|
||||
#pragma comment (lib,"../../链接库/Unicode/KernelEngine.lib")
|
||||
#endif
|
||||
#else
|
||||
#ifndef _UNICODE
|
||||
#pragma comment (lib,"../../链接库/Ansi/ServiceCoreD.lib")
|
||||
#pragma comment (lib,"../../链接库/Ansi/KernelEngineD.lib")
|
||||
#else
|
||||
#pragma comment (lib,"../../链接库/Unicode/ServiceCoreD.lib")
|
||||
#pragma comment (lib,"../../链接库/Unicode/KernelEngineD.lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
Reference in New Issue
Block a user