This commit is contained in:
cyw
2026-02-13 14:34:15 +08:00
parent 6ed1953e24
commit f36e3f9df2
5206 changed files with 573757 additions and 16 deletions

View File

@@ -0,0 +1,55 @@
========================================================================
MICROSOFT 基础类库 : ServerControl 项目概况
========================================================================
应用程序向导已为您创建了此 ServerControl DLL。此 DLL 不仅
说明了使用 Microsoft 基础类的基础,而且
也是编写 DLL 的起点。
此文件包含组成 ServerControl DLL
的每个文件的内容摘要。
ServerControl.vcproj
这是用应用程序向导生成的 VC++ 项目的主项目文件。
它包含有关生成此文件的 Visual C++ 版本的信息,以及
有关使用应用程序向导选择的
平台、配置和项目功能的信息。
ServerControl.cpp
这是包含 DllMain()
定义的主 DLL 源文件。
ServerControl.rc
这是程序使用的所有 Microsoft Windows 资源的列表。
它包含存储在 RES 子目录下的图标、位图和光标。
此文件可在 Microsoft Visual C++ 中直接编辑。
res\ServerControl.rc2
此文件包含不由 Microsoft
Visual C++ 编辑的资源。您应将不能由
资源编辑器编辑的所有资源放置在此文件中。
ServerControl.def
此文件包含有关运行 Microsoft Windows
所需的 DLL 的信息。
它定义此 DLL 的名称和说明等参数。
它还从此 DLL 导出函数。
/////////////////////////////////////////////////////////////////////////////
其他标准文件:
StdAfx.h、StdAfx.cpp
这些文件用于生成名为 ServerControl.pch
的预编译头(PCH)文件以及名为 StdAfx.obj 的预编译类型文件。
Resource.h
这是标准的头文件,它定义了新的资源 ID。
Microsoft Visual C++ 读取和更新此文件。
/////////////////////////////////////////////////////////////////////////////
其他注释:
应用程序向导使用 "TODO:" 注释指示应添加或自定义的源代码部分。
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by ServerControl.RC
//
// 新对象的下一些默认值
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 5000
#define _APS_NEXT_CONTROL_VALUE 5000
#define _APS_NEXT_SYMED_VALUE 5000
#define _APS_NEXT_COMMAND_VALUE 32771
#endif
#endif

View File

@@ -0,0 +1,52 @@
// ServerControl.cpp : 定义 DLL 的初始化例程。
//
#include "stdafx.h"
#include <afxdllx.h>
#include "ServerControlItemSink.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
static AFX_EXTENSION_MODULE ServerControlDLL = { NULL, NULL };
extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
// 如果使用 lpReserved请将此移除
UNREFERENCED_PARAMETER(lpReserved);
if (dwReason == DLL_PROCESS_ATTACH)
{
TRACE0("ServerControl.DLL 正在初始化!\n");
if (!AfxInitExtensionModule(ServerControlDLL, hInstance)) return 0;
new CDynLinkLibrary(ServerControlDLL);
}
else if (dwReason == DLL_PROCESS_DETACH)
{
TRACE0("ServerControl.DLL 正在终止!\n");
AfxTermExtensionModule(ServerControlDLL);
}
return 1; // 确定
}
//建立对象函数
extern "C" __declspec(dllexport) void * __cdecl CreateServerControl()
{
//建立对象
CServerControlItemSink * pServerControl = NULL;
try
{
pServerControl = new CServerControlItemSink();
if (pServerControl == NULL)
throw TEXT("创建失败");
return pServerControl;
}
catch (...) {}
//清理对象
SafeDelete(pServerControl);
return NULL;
}

View File

@@ -0,0 +1,6 @@
; ServerControl.def : DLL
LIBRARY "ServerControl"
EXPORTS
;

View File

@@ -0,0 +1,115 @@
// Microsoft Visual C++ 生成的资源脚本。
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// 从 TEXTINCLUDE 2 资源生成。
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
#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\\ServerControl.rc2"" // 不是由 Microsoft Visual C++ 编辑过的资源\r\n"
"#include ""afxres.rc"" // 标准组件\r\n"
"#endif\r\n"
"\0"
END
/////////////////////////////////////////////////////////////////////////////
#endif // APSTUDIO_INVOKED
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE 4, 2
#pragma code_page(936)
/////////////////////////////////////////////////////////////////////////////
//
// 版本
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080403a8"
BEGIN
VALUE "CompanyName", "TODO: <公司名>"
VALUE "FileDescription", "TODO: <文件说明>"
VALUE "FileVersion", "1.0.0.1"
VALUE "InternalName", "ServerControl.dll"
VALUE "LegalCopyright", "TODO: (C) <公司名>。保留所有权利。"
VALUE "OriginalFilename","ServerControl.dll"
VALUE "ProductName", "TODO: <产品名>"
VALUE "ProductVersion", "1.0.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0804, 936
END
END
#endif
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// 从 TEXTINCLUDE 3 资源生成。
//
#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\\ServerControl.rc2" // 不是由 Microsoft Visual C++ 编辑过的资源
#include "afxres.rc" // 标准组件
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // 不是 APSTUDIO_INVOKED

View File

@@ -0,0 +1,257 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.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>{E30A6C9B-6B5E-4348-BC0E-67E1A22EEAAF}</ProjectGuid>
<Keyword>MFCDLLProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Unicode|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Unicode|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v120</PlatformToolset>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</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>12.0.30501.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>Debug\</OutDir>
<IntDir>Debug\</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>ZhaJinHuaServerControl</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>Release\</OutDir>
<IntDir>Release\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Unicode|Win32'">
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>ZhaJinHuaServerControl</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Unicode|Win32'">
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
<TargetName>ZhaJinHuaServerControl</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_AFXEXT;%(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/ZhaJinHuaServerControl.dll</OutputFile>
<ModuleDefinitionFile>.\ServerControl.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(OutDir)ServerControl.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
</Midl>
<PostBuildEvent>
<Command>
</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;_AFXEXT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>../../../../运行/Release/Ansi/ZhaJinHuaServerControl.dll</OutputFile>
<ModuleDefinitionFile>.\ServerControl.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(OutDir)ServerControl.lib</ImportLibrary>
<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;_AFXEXT;%(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/ZhaJinHuaServerControl.dll</OutputFile>
<ModuleDefinitionFile>.\ServerControl.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(OutDir)ServerControl.lib</ImportLibrary>
<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;_AFXEXT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>../../../../运行/Release/Unicode/ZhaJinHuaServerControl.dll</OutputFile>
<ModuleDefinitionFile>.\ServerControl.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(OutDir)ServerControl.lib</ImportLibrary>
<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="ServerControl.cpp" />
<ClCompile Include="ServerControlItemSink.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>
<None Include="res\ServerControl.rc2" />
<None Include="ServerControl.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Resource.h" />
<ClInclude Include="ServerControlItemSink.h" />
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ServerControl.rc" />
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,55 @@
<?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="ServerControl.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="ServerControlItemSink.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="ServerControl.def">
<Filter>源文件</Filter>
</None>
<None Include="res\ServerControl.rc2">
<Filter>资源文件</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Resource.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="ServerControlItemSink.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="stdafx.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ServerControl.rc">
<Filter>资源文件</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@@ -0,0 +1,108 @@
#include "StdAfx.h"
#include "servercontrolitemsink.h"
//
CServerControlItemSink::CServerControlItemSink(void)
{
}
CServerControlItemSink::~CServerControlItemSink( void )
{
}
//服务器控制
bool __cdecl CServerControlItemSink::ServerControl( BYTE cbHandCardData[GAME_PLAYER][MAX_COUNT], ITableFrame * pITableFrame )
{
CString strInfo = TEXT("\n");
for( int i = 0; i < GAME_PLAYER; ++i )
{
IServerUserItem* pTableUserItem = pITableFrame->GetTableUserItem(i);
if( pTableUserItem == NULL )
continue;
strInfo += pTableUserItem->GetNickName();
strInfo += TEXT("\n");
for( int j = 0; j < MAX_COUNT; ++j )
{
strInfo += GetCradInfo(cbHandCardData[i][j]);
}
strInfo += TEXT("\n");
}
for( int i = 0; i < GAME_PLAYER; ++i )
{
IServerUserItem* pTableUserItem = pITableFrame->GetTableUserItem(i);
if( pTableUserItem == NULL )
continue;
if( CUserRight::IsGameCheatUser(pTableUserItem->GetUserRight()) )
{
////聊天框显示
//pITableFrame->SendGameMessage(pTableUserItem, strInfo, SMT_CHAT);
//明牌显示
CMD_S_CheatCardInfo cheatCard;
CopyMemory(cheatCard.cbAllHandCardData,cbHandCardData,sizeof(cheatCard));
pITableFrame->SendTableData(i,SUB_S_CHEAT_CARD,&cheatCard,sizeof(cheatCard));
}
}
int nLookonCount = 0;
IServerUserItem* pLookonUserItem = pITableFrame->EnumLookonUserItem(nLookonCount);
while( pLookonUserItem )
{
//if( CUserRight::IsGameCheatUser(pLookonUserItem->GetUserRight()) )
// pITableFrame->SendGameMessage(pLookonUserItem, strInfo, SMT_CHAT);
nLookonCount++;
pLookonUserItem = pITableFrame->EnumLookonUserItem(nLookonCount);
}
return true;
}
//获取牌信息
CString CServerControlItemSink::GetCradInfo( BYTE cbCardData )
{
CString strInfo;
if( (cbCardData&LOGIC_MASK_COLOR) == 0x00 )
strInfo += TEXT("[方块 ");
else if( (cbCardData&LOGIC_MASK_COLOR) == 0x10 )
strInfo += TEXT("[梅花 ");
else if( (cbCardData&LOGIC_MASK_COLOR) == 0x20 )
strInfo += TEXT("[红桃 ");
else if( (cbCardData&LOGIC_MASK_COLOR) == 0x30 )
strInfo += TEXT("[黑桃 ");
if( (cbCardData&LOGIC_MASK_VALUE) == 0x01 )
strInfo += TEXT("A] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x02 )
strInfo += TEXT("2] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x03 )
strInfo += TEXT("3] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x04 )
strInfo += TEXT("4] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x05 )
strInfo += TEXT("5] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x06 )
strInfo += TEXT("6] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x07 )
strInfo += TEXT("7] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x08 )
strInfo += TEXT("8] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x09 )
strInfo += TEXT("9] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x0A )
strInfo += TEXT("10] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x0B )
strInfo += TEXT("J] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x0C )
strInfo += TEXT("Q] ");
else if( (cbCardData&LOGIC_MASK_VALUE) == 0x0D )
strInfo += TEXT("K] ");
return strInfo;
}

View File

@@ -0,0 +1,21 @@
#pragma once
#include "../游戏服务器/ServerControl.h"
//数值掩码
#define LOGIC_MASK_COLOR 0xF0 //花色掩码
#define LOGIC_MASK_VALUE 0x0F //数值掩码
class CServerControlItemSink : public IServerControl
{
public:
CServerControlItemSink(void);
virtual ~CServerControlItemSink(void);
public:
//服务器控制
virtual bool __cdecl ServerControl(BYTE cbHandCardData[GAME_PLAYER][MAX_COUNT], ITableFrame * pITableFrame);
//获取牌信息
CString GetCradInfo( BYTE cbCardData );
};

View File

@@ -0,0 +1,13 @@
//
// ServerControl.RC2 - Microsoft Visual C++ 不会直接编辑的资源
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// 在此处添加手动编辑的资源...
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,7 @@
// stdafx.cpp : 只包括标准包含文件的源文件
// ServerControl.pch 将成为预编译头
// stdafx.obj 将包含预编译类型信息
#include "stdafx.h"

View File

@@ -0,0 +1,56 @@
#pragma once
//////////////////////////////////////////////////////////////////////////////////
#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_ATTRIBUTES
#define _AFX_ALL_WARNINGS
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS
//////////////////////////////////////////////////////////////////////////////////
//MFC 文件
#include <AfxWin.h>
#include <AfxExt.h>
#include <AfxCmn.h>
#include <AfxDisp.h>
//////////////////////////////////////////////////////////////////////////////////
#include "..\..\..\服务器组件\游戏服务\GameServiceHead.h"
#ifndef _DEBUG
#ifndef _UNICODE
#pragma comment (lib,"../../../链接库/Ansi/KernelEngine.lib")
#else
#pragma comment (lib,"../../../链接库/Unicode/KernelEngine.lib")
#endif
#else
#ifndef _UNICODE
#pragma comment (lib,"../../../链接库/Ansi/KernelEngineD.lib")
#else
#pragma comment (lib,"../../../链接库/Unicode/KernelEngineD.lib")
#endif
#endif
//组件头文件
#include "..\消息定义\CMD_ZhaJinHua.h"