Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
110
Server/Billing/Billing.sln
Normal file
110
Server/Billing/Billing.sln
Normal file
@@ -0,0 +1,110 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetHanBilling", "GetHanBilling\GetHanBilling.vcproj", "{56E2A7F7-7BAD-4095-BCDB-AE1015B981D0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{68041CA4-DB5B-4716-BB34-AFD654BD9D33} = {68041CA4-DB5B-4716-BB34-AFD654BD9D33}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DB", "DB\DB.vcproj", "{68041CA4-DB5B-4716-BB34-AFD654BD9D33}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MediaWebBilling", "MediaWebBilling\MediaWebBilling.vcproj", "{FD74ADE2-6961-4304-B23A-89DA3665477E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{68041CA4-DB5B-4716-BB34-AFD654BD9D33} = {68041CA4-DB5B-4716-BB34-AFD654BD9D33}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BillingTestModule", "<22>Ѱ<EFBFBD><D1B0><EFBFBD> <20><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD> <20><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD>\BillingTestModule.vcproj", "{45133C4E-218B-4327-A547-9B64F0CACD5D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Executable", "Executable\Executable.vcproj", "{139979E4-819A-4CA7-9003-013C000CD09A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetHanBillingLogData", "GetHanBillingLogData\GetHanBillingLogData.vcproj", "{96F0B439-8858-4D3F-BF05-3EE915CFDD94}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{68041CA4-DB5B-4716-BB34-AFD654BD9D33} = {68041CA4-DB5B-4716-BB34-AFD654BD9D33}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetCharacterData", "GetCharacterData\GetCharacterData.vcproj", "{EBA2EBB1-86CE-4CFB-8A63-CA622558BAA6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{68041CA4-DB5B-4716-BB34-AFD654BD9D33} = {68041CA4-DB5B-4716-BB34-AFD654BD9D33}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
|
||||
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
|
||||
EndGlobalSection
|
||||
GlobalSection(SourceCodeControl) = preSolution
|
||||
SccNumberOfProjects = 8
|
||||
SccLocalPath0 = .
|
||||
CanCheckoutShared = false
|
||||
SolutionUniqueID = {6DB76421-C111-47FC-8938-CF0298994E9F}
|
||||
SccProjectUniqueName1 = DB\\DB.vcproj
|
||||
SccLocalPath1 = .
|
||||
CanCheckoutShared = false
|
||||
SccProjectFilePathRelativizedFromConnection1 = DB\\
|
||||
SccProjectUniqueName2 = Executable\\Executable.vcproj
|
||||
SccLocalPath2 = .
|
||||
CanCheckoutShared = false
|
||||
SccProjectFilePathRelativizedFromConnection2 = Executable\\
|
||||
SccProjectUniqueName3 = GetCharacterData\\GetCharacterData.vcproj
|
||||
SccLocalPath3 = .
|
||||
CanCheckoutShared = false
|
||||
SccProjectFilePathRelativizedFromConnection3 = GetCharacterData\\
|
||||
SccProjectUniqueName4 = GetHanBilling\\GetHanBilling.vcproj
|
||||
SccLocalPath4 = .
|
||||
CanCheckoutShared = false
|
||||
SccProjectFilePathRelativizedFromConnection4 = GetHanBilling\\
|
||||
SccProjectUniqueName5 = GetHanBillingLogData\\GetHanBillingLogData.vcproj
|
||||
SccLocalPath5 = .
|
||||
CanCheckoutShared = false
|
||||
SccProjectFilePathRelativizedFromConnection5 = GetHanBillingLogData\\
|
||||
SccProjectUniqueName6 = MediaWebBilling\\MediaWebBilling.vcproj
|
||||
SccLocalPath6 = .
|
||||
CanCheckoutShared = false
|
||||
SccProjectFilePathRelativizedFromConnection6 = MediaWebBilling\\
|
||||
SccProjectUniqueName7 = <20>Ѱ<EFBFBD><D1B0><EFBFBD>\u0020<32><30><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>\u0020<32><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD>\\BillingTestModule.vcproj
|
||||
SccLocalPath7 = .
|
||||
CanCheckoutShared = false
|
||||
SccProjectFilePathRelativizedFromConnection7 = <20>Ѱ<EFBFBD><D1B0><EFBFBD>\u0020<32><30><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>\u0020<32><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD>\\
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{56E2A7F7-7BAD-4095-BCDB-AE1015B981D0}.Debug.ActiveCfg = Debug|Win32
|
||||
{56E2A7F7-7BAD-4095-BCDB-AE1015B981D0}.Debug.Build.0 = Debug|Win32
|
||||
{56E2A7F7-7BAD-4095-BCDB-AE1015B981D0}.Release.ActiveCfg = Release|Win32
|
||||
{56E2A7F7-7BAD-4095-BCDB-AE1015B981D0}.Release.Build.0 = Release|Win32
|
||||
{68041CA4-DB5B-4716-BB34-AFD654BD9D33}.Debug.ActiveCfg = Debug|Win32
|
||||
{68041CA4-DB5B-4716-BB34-AFD654BD9D33}.Debug.Build.0 = Debug|Win32
|
||||
{68041CA4-DB5B-4716-BB34-AFD654BD9D33}.Release.ActiveCfg = Release|Win32
|
||||
{68041CA4-DB5B-4716-BB34-AFD654BD9D33}.Release.Build.0 = Release|Win32
|
||||
{FD74ADE2-6961-4304-B23A-89DA3665477E}.Debug.ActiveCfg = Debug|Win32
|
||||
{FD74ADE2-6961-4304-B23A-89DA3665477E}.Debug.Build.0 = Debug|Win32
|
||||
{FD74ADE2-6961-4304-B23A-89DA3665477E}.Release.ActiveCfg = Release|Win32
|
||||
{FD74ADE2-6961-4304-B23A-89DA3665477E}.Release.Build.0 = Release|Win32
|
||||
{45133C4E-218B-4327-A547-9B64F0CACD5D}.Debug.ActiveCfg = Debug|Win32
|
||||
{45133C4E-218B-4327-A547-9B64F0CACD5D}.Debug.Build.0 = Debug|Win32
|
||||
{45133C4E-218B-4327-A547-9B64F0CACD5D}.Release.ActiveCfg = Release|Win32
|
||||
{45133C4E-218B-4327-A547-9B64F0CACD5D}.Release.Build.0 = Release|Win32
|
||||
{139979E4-819A-4CA7-9003-013C000CD09A}.Debug.ActiveCfg = Debug|Win32
|
||||
{139979E4-819A-4CA7-9003-013C000CD09A}.Debug.Build.0 = Debug|Win32
|
||||
{139979E4-819A-4CA7-9003-013C000CD09A}.Release.ActiveCfg = Release|Win32
|
||||
{139979E4-819A-4CA7-9003-013C000CD09A}.Release.Build.0 = Release|Win32
|
||||
{96F0B439-8858-4D3F-BF05-3EE915CFDD94}.Debug.ActiveCfg = Debug|Win32
|
||||
{96F0B439-8858-4D3F-BF05-3EE915CFDD94}.Debug.Build.0 = Debug|Win32
|
||||
{96F0B439-8858-4D3F-BF05-3EE915CFDD94}.Release.ActiveCfg = Release|Win32
|
||||
{96F0B439-8858-4D3F-BF05-3EE915CFDD94}.Release.Build.0 = Release|Win32
|
||||
{EBA2EBB1-86CE-4CFB-8A63-CA622558BAA6}.Debug.ActiveCfg = Debug|Win32
|
||||
{EBA2EBB1-86CE-4CFB-8A63-CA622558BAA6}.Debug.Build.0 = Debug|Win32
|
||||
{EBA2EBB1-86CE-4CFB-8A63-CA622558BAA6}.Release.ActiveCfg = Release|Win32
|
||||
{EBA2EBB1-86CE-4CFB-8A63-CA622558BAA6}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
Server/Billing/Billing.suo
Normal file
BIN
Server/Billing/Billing.suo
Normal file
Binary file not shown.
65
Server/Billing/Db/Config.cpp
Normal file
65
Server/Billing/Db/Config.cpp
Normal file
@@ -0,0 +1,65 @@
|
||||
#include "Config.h"
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
CConfigurator::CConfigurator()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
CConfigurator::~CConfigurator()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool CConfigurator::Load(const char* szFileName)
|
||||
{
|
||||
FILE* lpFile = fopen(szFileName, "rt");
|
||||
|
||||
if(NULL != lpFile)
|
||||
{
|
||||
const int MAX_READ = 4096;
|
||||
char szRead[MAX_READ];
|
||||
char* szDelimitChars = " =\t\n\r";
|
||||
|
||||
while(fgets(szRead, MAX_READ, lpFile))
|
||||
{
|
||||
const char* szCommand = strtok(szRead, szDelimitChars);
|
||||
const char* szValue = strtok(NULL, szDelimitChars);
|
||||
|
||||
if(0 != szCommand && 0 != szValue)
|
||||
{
|
||||
if(0 != strncmp(szCommand, TEXT("//"), strlen(TEXT("//"))))
|
||||
{
|
||||
m_ConfigMap.insert(std::make_pair(szCommand, szValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(lpFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* CConfigurator::Get(const char* szKey)
|
||||
{
|
||||
ConfigMap::iterator end = m_ConfigMap.end();
|
||||
ConfigMap::iterator find = m_ConfigMap.find(szKey);
|
||||
|
||||
if(end != find)
|
||||
{
|
||||
return find->second.c_str();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CConfigurator::Clear()
|
||||
{
|
||||
m_ConfigMap.clear();
|
||||
}
|
||||
25
Server/Billing/Db/Config.h
Normal file
25
Server/Billing/Db/Config.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef _GAMA_DB_CONFIGURATOR_
|
||||
#define _GAMA_DB_CONFIGURATOR_
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
class CConfigurator
|
||||
{
|
||||
public:
|
||||
|
||||
CConfigurator();
|
||||
~CConfigurator();
|
||||
|
||||
bool Load(const char* szFileName);
|
||||
const char* Get(const char* szKey);
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
|
||||
typedef std::map<std::string, std::string> ConfigMap;
|
||||
|
||||
ConfigMap m_ConfigMap;
|
||||
};
|
||||
|
||||
#endif
|
||||
137
Server/Billing/Db/DB.vcproj
Normal file
137
Server/Billing/Db/DB.vcproj
Normal file
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="DB"
|
||||
ProjectGUID="{68041CA4-DB5B-4716-BB34-AFD654BD9D33}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/DB.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/DB.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Config.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Log.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\myOLEDB.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\Config.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Log.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\myOLEDB.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
93
Server/Billing/Db/Log.cpp
Normal file
93
Server/Billing/Db/Log.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
#include "Log.h"
|
||||
#include <windows.h>
|
||||
|
||||
CLog::CLog()
|
||||
: m_stdout(0), m_stderr(0)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
CLog::~CLog()
|
||||
{
|
||||
if(0 != m_stderr)
|
||||
{
|
||||
fclose(m_stderr);
|
||||
m_stderr = 0;
|
||||
}
|
||||
|
||||
if(0 != m_stdout)
|
||||
{
|
||||
fclose(m_stdout);
|
||||
m_stdout = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool CLog::RedirectStdErr(const char* szFileName)
|
||||
{
|
||||
char szLogFileName[MAX_PATH];
|
||||
|
||||
if(MakeFileName(szFileName, szLogFileName))
|
||||
{
|
||||
m_stderr = freopen(szLogFileName, "at", stderr);
|
||||
return (0 != m_stderr);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CLog::RedirectStdOut(const char *szFileName)
|
||||
{
|
||||
char szLogFileName[MAX_PATH];
|
||||
|
||||
if(MakeFileName(szFileName, szLogFileName))
|
||||
{
|
||||
m_stdout = freopen(szLogFileName, "at", stdout);
|
||||
return (0 != m_stdout);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool CLog::MakeFileName(const char* szFileName, char* szLogFileName)
|
||||
{
|
||||
// create log file name in good order
|
||||
for(unsigned long dwSpinCount = 0; TRUE; ++dwSpinCount)
|
||||
{
|
||||
int nLength = _snprintf(szLogFileName, MAX_PATH, "%s%04d.log",
|
||||
szFileName, dwSpinCount);
|
||||
|
||||
if(nLength < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (INVALID_FILE_ATTRIBUTES == GetFileAttributes(szLogFileName))
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
HANDLE hFile = CreateFile(szLogFileName, GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if(hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
DWORD dwFileHighSize = 0;
|
||||
DWORD dwFileSize = GetFileSize(hFile, &dwFileHighSize);
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
if(0 == dwFileHighSize && dwFileSize < 10 * 1024 * 1024)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
24
Server/Billing/Db/Log.h
Normal file
24
Server/Billing/Db/Log.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef _GAMA_STD_LOG_H_
|
||||
#define _GAMA_STD_LOG_H_
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
class CLog
|
||||
{
|
||||
public:
|
||||
|
||||
CLog();
|
||||
~CLog();
|
||||
|
||||
bool RedirectStdErr(const char* szFileName);
|
||||
bool RedirectStdOut(const char* szFileName);
|
||||
|
||||
private:
|
||||
|
||||
bool MakeFileName(const char* szFileName, char* szLogFileName);
|
||||
|
||||
FILE* m_stdout;
|
||||
FILE* m_stderr;
|
||||
};
|
||||
|
||||
#endif
|
||||
21
Server/Billing/Db/ReadMe.txt
Normal file
21
Server/Billing/Db/ReadMe.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
========================================================================
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF> : DB <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
========================================================================
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><> DB <20><><EFBFBD>̺귯<CCBA><EAB7AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾҽ<CABE><D2BD>ϴ<EFBFBD>.
|
||||
|
||||
|
||||
DB.vcproj
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>⺻ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++<2B><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ɿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>:
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> "TODO:" <20>ּ<EFBFBD><D6BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
|
||||
<EFBFBD>ҽ<EFBFBD> <20>ڵ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
1358
Server/Billing/Db/myOLEDB.cpp
Normal file
1358
Server/Billing/Db/myOLEDB.cpp
Normal file
File diff suppressed because it is too large
Load Diff
118
Server/Billing/Db/myOLEDB.h
Normal file
118
Server/Billing/Db/myOLEDB.h
Normal file
@@ -0,0 +1,118 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// OleDB
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef _OleDB
|
||||
#define _OleDB
|
||||
|
||||
#include <oledb.h>
|
||||
#include <oledberr.h>
|
||||
|
||||
//#define _CHECK_OLEDB_PERFORMANCE // DB <20><><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD> üũ
|
||||
#ifdef _CHECK_OLEDB_PERFORMANCE
|
||||
#define DB_PERFORMANCE_CHECK(x) x
|
||||
#else
|
||||
#define DB_PERFORMANCE_CHECK(x) (void*)0;
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class OleDB
|
||||
{
|
||||
public:
|
||||
const static unsigned long MaxRowNum = 2000; // <20>ִ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
const static unsigned long MaxErrorLen = 512; // <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
const static unsigned long MaxQueryTextLen = 5000; // <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ڿ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
protected:
|
||||
|
||||
typedef struct _COL_INFO
|
||||
{
|
||||
const static unsigned short MaxColNameLen = 100; // <20>ִ<EFBFBD> <20>÷<EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
char ColName[MaxColNameLen]; // <20>÷<EFBFBD> <20≯<EFBFBD>
|
||||
unsigned long ColSize; // <20>÷<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
}COL_INFO, *LPCOL_INFO;
|
||||
|
||||
typedef struct _RESULT_COLS
|
||||
{
|
||||
unsigned long ColNum;
|
||||
DBCOLUMNINFO* lpDBColumnInfo;
|
||||
WCHAR* lpStringsBuffer;
|
||||
}RESULT_COLS, *LPRESULT_COLS;
|
||||
|
||||
WCHAR m_QueryText[MaxQueryTextLen]; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ڿ<EFBFBD>
|
||||
COL_INFO m_ColInfo;
|
||||
|
||||
public:
|
||||
enum ConnType { ConnType_ODBC = 0, ConnType_MSSQL = 1, ConnType_ORACLE };
|
||||
|
||||
enum Rowset { Rowset_Get = 0, Rowset_Update = 1 }; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ο<EFBFBD><CEBF><EFBFBD>
|
||||
|
||||
typedef struct _PARAM_INFO
|
||||
{
|
||||
const static unsigned short MaxColNum = 20; // <20>ִ<EFBFBD> <20>÷<EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
unsigned long ColNum; // <20>÷<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
unsigned long ColSize[MaxColNum]; // <20>÷<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
unsigned short ColType[MaxColNum];
|
||||
}PARAM_INFO, *LPPARAM_INFO;
|
||||
|
||||
typedef struct _SET_BINARY
|
||||
{
|
||||
unsigned long Size;
|
||||
}SET_BINARY, *LPSET_BINARY;
|
||||
|
||||
public:
|
||||
|
||||
IDBInitialize* m_pIDBInit;
|
||||
IDBCreateSession* m_pIDBCreateSession;
|
||||
IDBCreateCommand* m_pIDBCreateCommand;
|
||||
IRowset* m_pIRowset;
|
||||
IRowsetChange* m_pIRowsetChange;
|
||||
|
||||
char m_ErrorString[MaxErrorLen];
|
||||
|
||||
public:
|
||||
|
||||
OleDB(void);
|
||||
virtual ~OleDB(void);
|
||||
|
||||
char* GetErrorString(void) { return m_ErrorString; }
|
||||
|
||||
bool ConnectDataSourcePrompt(HWND hWnd_In);
|
||||
bool ConnectSQLServer(LPCTSTR ServerName_In, LPCTSTR DataBaseName_In, LPCTSTR UserID_In, LPCTSTR UserPass_In, ConnType ConnType_In);
|
||||
bool DisconnectDataSource(void);
|
||||
|
||||
bool ExcuteQuery(LPCTSTR Query_In, Rowset Rowset_In = Rowset_Get);
|
||||
bool ExcuteQueryWithParams(LPCTSTR Query_In, char *Data_In, PARAM_INFO& ColInfo_In, Rowset Rowset_In);
|
||||
|
||||
bool ExcuteQueryGetData(LPCTSTR Query_In, void *Buffer_Out);
|
||||
|
||||
bool GetData(void *Buffer_Out);
|
||||
bool GetData(void **Buffer_Out, int RowSize_In, int Row_In, int *pGetRow_Out);
|
||||
|
||||
bool SetBinaryData(int ColNum_In, LPSET_BINARY lpSetBinary);
|
||||
|
||||
COL_INFO& GetColInfo(void) { return m_ColInfo; }
|
||||
|
||||
private:
|
||||
|
||||
bool HandleError(int ErrorLine_In, HRESULT hResult_In, char *Buffer_In);
|
||||
|
||||
bool CreateSession(void);
|
||||
bool DBCreateCommand(void);
|
||||
|
||||
bool AllocResultCols(IUnknown* lpIUnknown_In, RESULT_COLS &Rsult_Cols);
|
||||
bool ReleaseResultCols(IUnknown* lpIUnknown_In, RESULT_COLS &Rsult_Cols);
|
||||
|
||||
bool SetConnectionProperties(LPCTSTR ServerName_In, LPCTSTR DataBaseName_In, LPCTSTR UserID_In, LPCTSTR UserPass_In);
|
||||
DBBINDING* AllocBindGetData(int ColsNum_In, DBCOLUMNINFO* pDBColumnInfo_In);
|
||||
DBBINDING* AllocBindParamInputData(PARAM_INFO &ColInfo_In);
|
||||
};
|
||||
|
||||
#endif
|
||||
11
Server/Billing/Executable/BillingInfo.cfg
Normal file
11
Server/Billing/Executable/BillingInfo.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
// <20>Ѱ<EFBFBD><D1B0><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
HanServerName = gamabill
|
||||
HanDBName = scott
|
||||
HanUserName = scott
|
||||
HanPassword = scott
|
||||
|
||||
// <20><><EFBFBD>ݼ<EFBFBD><DDBC><EFBFBD>
|
||||
BillingServerName = GAMADBMAN\GAMASQL
|
||||
BillingDBName = RYLBILLINGDB
|
||||
BillingUserName = sa
|
||||
BillingPassword = gamadb
|
||||
11
Server/Billing/Executable/BillingLogData.cfg
Normal file
11
Server/Billing/Executable/BillingLogData.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
// <20>Ѱ<EFBFBD><D1B0><EFBFBD> <20><><EFBFBD><EFBFBD> (Select)
|
||||
HanServerName = 61.251.229.189
|
||||
HanDBName = RylbillingDBLOG
|
||||
HanUserName = gama
|
||||
HanPassword = 1234
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (Insert)
|
||||
GamaServerName = 192.168.3.4
|
||||
GamaDBName = RylbillingDB_LOG
|
||||
GamaUserName = sa
|
||||
GamaPassword = 1234
|
||||
12
Server/Billing/Executable/CharacterData.cfg
Normal file
12
Server/Billing/Executable/CharacterData.cfg
Normal file
@@ -0,0 +1,12 @@
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (Select)
|
||||
GameServerID = 4
|
||||
GameServerName = datastation
|
||||
GameDBName = HighLand
|
||||
GameUserName = gama
|
||||
GamePassword = 1234
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (Insert)
|
||||
GamaServerName = 61.251.229.189
|
||||
GamaDBName = RylBillingDBLOG
|
||||
GamaUserName = gama
|
||||
GamaPassword = 1234
|
||||
133
Server/Billing/Executable/Executable.vcproj
Normal file
133
Server/Billing/Executable/Executable.vcproj
Normal file
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Executable"
|
||||
ProjectGUID="{139979E4-819A-4CA7-9003-013C000CD09A}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/Executable.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/Executable.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Debug"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\Debug\BillingInfo.cfg">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Debug\BillingLogData.cfg">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Debug\CharacterData.cfg">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Debug\MWBillingInfo.cfg">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Release"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\Release\BillingInfo.cfg">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Release\BillingLogData.cfg">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Release\CharacterData.cfg">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Release\MWBillingInfo.cfg">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
11
Server/Billing/Executable/MWBillingInfo.cfg
Normal file
11
Server/Billing/Executable/MWBillingInfo.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
// <20>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD>
|
||||
MWServerName = gamabill
|
||||
MWDBName = scott
|
||||
MWUserName = scott
|
||||
MWPassword = scott
|
||||
|
||||
// <20><><EFBFBD>ݼ<EFBFBD><DDBC><EFBFBD>
|
||||
BillingServerName = GAMADBMAN\GAMASQL
|
||||
BillingDBName = RYLBILLINGDB
|
||||
BillingUserName = sa
|
||||
BillingPassword = gamadb
|
||||
275
Server/Billing/GetCharacterData/GetCharacterData.cpp
Normal file
275
Server/Billing/GetCharacterData/GetCharacterData.cpp
Normal file
@@ -0,0 +1,275 @@
|
||||
// GetGameCharacterData.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
#include "stdafx.h"
|
||||
#include <myOLEDB.h>
|
||||
#include <Config.h>
|
||||
#include <Log.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <ctime>
|
||||
#include <list>
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct CharacterData
|
||||
{
|
||||
int CID;
|
||||
int Class;
|
||||
int Level;
|
||||
char CreateTime[20];
|
||||
char UpdateTime[20];
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
template<class _Elem, class _Traits>
|
||||
inline basic_ostream<_Elem, _Traits>& __cdecl writetime(basic_ostream<_Elem, _Traits>& _Ostr)
|
||||
{
|
||||
SYSTEMTIME systime;
|
||||
GetLocalTime(&systime);
|
||||
|
||||
_Elem fill = _Ostr.fill();
|
||||
|
||||
_Ostr << setfill('0')
|
||||
<< "["
|
||||
<< setw(4) << systime.wYear << "-"
|
||||
<< setw(2) << systime.wMonth << "-"
|
||||
<< setw(2) << systime.wDay << " "
|
||||
<< setw(2) << systime.wHour << ":"
|
||||
<< setw(2) << systime.wMinute << ":"
|
||||
<< setw(2) << systime.wSecond << "] " << setfill(fill);
|
||||
|
||||
return (_Ostr);
|
||||
}
|
||||
|
||||
bool LoadLastProcessedTime(const char* szFileName, __time64_t* lpLastProcessedTime)
|
||||
{
|
||||
FILE* file = fopen(szFileName, "rb");
|
||||
if(0 != file)
|
||||
{
|
||||
if(0 != lpLastProcessedTime)
|
||||
{
|
||||
tm tmLastProcessedTime;
|
||||
memset(&tmLastProcessedTime, 0, sizeof(tm));
|
||||
|
||||
fscanf(file, "%04d-%02d-%02d %02d:%02d:%02d",
|
||||
&tmLastProcessedTime.tm_year, &tmLastProcessedTime.tm_mon, &tmLastProcessedTime.tm_mday,
|
||||
&tmLastProcessedTime.tm_hour, &tmLastProcessedTime.tm_min, &tmLastProcessedTime.tm_sec);
|
||||
|
||||
tmLastProcessedTime.tm_year -= 1900;
|
||||
tmLastProcessedTime.tm_mon -= 1;
|
||||
|
||||
*lpLastProcessedTime = _mktime64(&tmLastProcessedTime);
|
||||
fclose(file);
|
||||
return true;
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SaveLastProcessedTime(const char* szFileName, __time64_t LastProcessedTime)
|
||||
{
|
||||
FILE* file = fopen(szFileName, "wt");
|
||||
if(0 != file)
|
||||
{
|
||||
tm tmLastProcessedTime = *_localtime64(&LastProcessedTime);
|
||||
|
||||
fprintf(file, "%04d-%02d-%02d %02d:%02d:%02d",
|
||||
tmLastProcessedTime.tm_year + 1900, tmLastProcessedTime.tm_mon + 1, tmLastProcessedTime.tm_mday,
|
||||
tmLastProcessedTime.tm_hour, tmLastProcessedTime.tm_min, tmLastProcessedTime.tm_sec);
|
||||
|
||||
fclose(file);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPTSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
CLog log;
|
||||
CConfigurator config;
|
||||
|
||||
OleDB gameDB;
|
||||
OleDB gamaDB;
|
||||
|
||||
char szSelectQuery[OleDB::MaxQueryTextLen];
|
||||
char szInserQuery[OleDB::MaxQueryTextLen];
|
||||
int nQueryLen = 0;
|
||||
|
||||
if(!log.RedirectStdOut("GetCharacterDataLog"))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
cout << endl << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>." << endl;
|
||||
|
||||
TCHAR* tszConfigFileName = TEXT("CharacterData.cfg");
|
||||
|
||||
if(!config.Load(tszConfigFileName))
|
||||
{
|
||||
cout << writetime << tszConfigFileName << "DB<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* szTimeFileName = "GetCharacterDataTime.txt";
|
||||
|
||||
unsigned long dwServerID = atoi(config.Get("GameServerID"));
|
||||
|
||||
const char* szGameServerName = config.Get("GameServerName");
|
||||
const char* szGameDBName = config.Get("GameDBName");
|
||||
const char* szGameUserName = config.Get("GameUserName");
|
||||
const char* szGamePassword = config.Get("GamePassword");
|
||||
|
||||
if(!gameDB.ConnectSQLServer(szGameServerName, szGameDBName,
|
||||
szGameUserName, szGamePassword, OleDB::ConnType_MSSQL))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << gameDB.GetErrorString()
|
||||
<< " ServerName : " << szGameServerName
|
||||
<< " DBName : " << szGameDBName
|
||||
<< " UserName : " << szGameUserName
|
||||
<< " Password : " << szGamePassword
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* szGamaServerName = config.Get("GamaServerName");
|
||||
const char* szGamaDBName = config.Get("GamaDBName");
|
||||
const char* szGamaUserName = config.Get("GamaUserName");
|
||||
const char* szGamaPassword = config.Get("GamaPassword");
|
||||
|
||||
if(!gamaDB.ConnectSQLServer(szGamaServerName, szGamaDBName,
|
||||
szGamaUserName, szGamaPassword, OleDB::ConnType_MSSQL))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << gamaDB.GetErrorString()
|
||||
<< " ServerName : " << szGamaServerName
|
||||
<< " DBName : " << szGamaDBName
|
||||
<< " UserName : " << szGamaUserName
|
||||
<< " Password : " << szGamaPassword
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
__time64_t lastTime = 0;
|
||||
if(!LoadLastProcessedTime(szTimeFileName, &lastTime))
|
||||
{
|
||||
cout << writetime << szTimeFileName << "<EFBFBD>ð<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
__time64_t currentTime = _time64(0);
|
||||
|
||||
tm tmLastTime = *_localtime64(&lastTime);
|
||||
tm tmCurrentTime = *_localtime64(¤tTime);
|
||||
|
||||
_snprintf(szSelectQuery, OleDB::MaxQueryTextLen - 1, "SELECT "
|
||||
"CAST(CID AS INT), "
|
||||
"CAST(Class AS INT), "
|
||||
"CAST(Level AS INT), "
|
||||
"CONVERT(varchar(20), CreateTime, 20), "
|
||||
"CONVERT(varchar(20), UpdateTime, 20) "
|
||||
"FROM CharInfo A "
|
||||
"JOIN (SELECT CID,CreateTime,UpdateTime FROM CharInfo_Time WHERE UpdateTime >= '%04d-%02d-%02d %02d:%02d:%02d') B ON A.UID = B.CID",
|
||||
|
||||
tmLastTime.tm_year + 1900, tmLastTime.tm_mon + 1, tmLastTime.tm_mday,
|
||||
tmLastTime.tm_hour, tmLastTime.tm_min, tmLastTime.tm_sec);
|
||||
|
||||
szSelectQuery[OleDB::MaxQueryTextLen - 1] = 0;
|
||||
|
||||
if(!gameDB.ExcuteQuery(szSelectQuery))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
<< gameDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
typedef std::list<std::pair<int, CharacterData*> > InsertList;
|
||||
|
||||
InsertList insertList;
|
||||
|
||||
const int MAX_DATA = OleDB::MaxRowNum;
|
||||
CharacterData* lpCharacterData = new CharacterData[MAX_DATA];
|
||||
|
||||
int nReturnRow = 0;
|
||||
int nTotalRow = 0;
|
||||
while(gameDB.GetData((void**)lpCharacterData,
|
||||
sizeof(CharacterData), MAX_DATA, &nReturnRow))
|
||||
{
|
||||
if(0 == nReturnRow)
|
||||
{
|
||||
if(0 != lpCharacterData)
|
||||
{
|
||||
delete [] lpCharacterData;
|
||||
lpCharacterData = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
nTotalRow += nReturnRow;
|
||||
insertList.push_back(std::make_pair(nReturnRow, lpCharacterData));
|
||||
lpCharacterData = new CharacterData[MAX_DATA];
|
||||
}
|
||||
|
||||
int nTotal_InsertRow = 0;
|
||||
|
||||
InsertList::iterator pos = insertList.begin();
|
||||
InsertList::iterator end = insertList.end();
|
||||
|
||||
for(;pos != end; ++pos)
|
||||
{
|
||||
CharacterData* lpCharacterData = pos->second;
|
||||
CharacterData* lpCharacterDataEnd = lpCharacterData + pos->first;
|
||||
|
||||
for(; lpCharacterData != lpCharacterDataEnd; ++lpCharacterData)
|
||||
{
|
||||
_snprintf(szInserQuery, OleDB::MaxQueryTextLen - 1,
|
||||
"Statics_InsertCharData %d, %d, %d, %d, '%s', '%s'",
|
||||
dwServerID, lpCharacterData->CID, lpCharacterData->Class, lpCharacterData->Level,
|
||||
lpCharacterData->CreateTime, lpCharacterData->UpdateTime);
|
||||
|
||||
szInserQuery[OleDB::MaxQueryTextLen - 1] = 0;
|
||||
|
||||
if(!gamaDB.ExcuteQuery(szInserQuery))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD>DB<44><42><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : "
|
||||
<< gamaDB.GetErrorString() << " " << szInserQuery;
|
||||
}
|
||||
else
|
||||
{
|
||||
++nTotal_InsertRow;
|
||||
}
|
||||
}
|
||||
|
||||
delete [] pos->second;
|
||||
}
|
||||
|
||||
if(!SaveLastProcessedTime(szTimeFileName, currentTime))
|
||||
{
|
||||
cout << writetime << szTimeFileName << "<EFBFBD>ð<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(nTotal_InsertRow != nTotalRow)
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǽ<EFBFBD> : " << nTotal_InsertRow << " <20><><EFBFBD><EFBFBD> <20>Ǽ<EFBFBD> : " << nTotalRow << endl;
|
||||
}
|
||||
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> : " << szSelectQuery << "<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. ó<><C3B3> <20>Ǽ<EFBFBD> : " << nTotalRow << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
136
Server/Billing/GetCharacterData/GetCharacterData.vcproj
Normal file
136
Server/Billing/GetCharacterData/GetCharacterData.vcproj
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="GetCharacterData"
|
||||
ProjectGUID="{EBA2EBB1-86CE-4CFB-8A63-CA622558BAA6}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../DB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/GetCharacterData.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/GetCharacterData.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../DB"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/GetCharacterData.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\GetCharacterData.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
373
Server/Billing/GetHanBilling/GetHanBilling.cpp
Normal file
373
Server/Billing/GetHanBilling/GetHanBilling.cpp
Normal file
@@ -0,0 +1,373 @@
|
||||
// GetHanBilling.cpp : <20>ܼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <myOLEDB.h>
|
||||
#include <Config.h>
|
||||
#include <Log.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <ctime>
|
||||
#include <vector>
|
||||
#include <oledb.h>
|
||||
#include <srv.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
//##### KTE - EDIT 20041207 #####
|
||||
struct HanBillingData
|
||||
{
|
||||
//DBCHAR m_EndDate[20];
|
||||
//DBCHAR m_MemberID[20];
|
||||
//DBCHAR m_BillNum[11];
|
||||
//DBCHAR m_RylUID[11];
|
||||
//DBCHAR m_GameMin[11];
|
||||
//DBCHAR m_BillingType[2];
|
||||
|
||||
DBCHAR m_MemberID[20];
|
||||
DBCHAR m_RegDate[20];
|
||||
DBCHAR m_BillEndDate[20];
|
||||
DBCHAR m_KeeperSeq[11];
|
||||
DBCHAR m_RylUID[11];
|
||||
DBCHAR m_AddedDay[11];
|
||||
DBCHAR m_AddedTime[11];
|
||||
DBCHAR m_AddedMonth[11];
|
||||
DBCHAR m_AutoBill[2];
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
template<class _Elem, class _Traits>
|
||||
inline basic_ostream<_Elem, _Traits>& __cdecl writetime(basic_ostream<_Elem, _Traits>& _Ostr)
|
||||
{
|
||||
SYSTEMTIME systime;
|
||||
GetLocalTime(&systime);
|
||||
|
||||
_Elem fill = _Ostr.fill();
|
||||
|
||||
_Ostr << setfill('0')
|
||||
<< "["
|
||||
<< setw(4) << systime.wYear << "-"
|
||||
<< setw(2) << systime.wMonth << "-"
|
||||
<< setw(2) << systime.wDay << " "
|
||||
<< setw(2) << systime.wHour << ":"
|
||||
<< setw(2) << systime.wMinute << ":"
|
||||
<< setw(2) << systime.wSecond << "] " << setfill(fill);
|
||||
|
||||
return (_Ostr);
|
||||
}
|
||||
|
||||
int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPTSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
CLog log;
|
||||
CConfigurator config;
|
||||
|
||||
OleDB hanDB;
|
||||
OleDB billingDB;
|
||||
|
||||
char szQuery[OleDB::MaxQueryTextLen];
|
||||
int nQueryLen = 0;
|
||||
|
||||
if(!log.RedirectStdOut("GetHanBillingLog"))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
cout << endl << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>." << endl;
|
||||
|
||||
TCHAR* tszConfigFileName = TEXT("BillingInfo.cfg");
|
||||
|
||||
if(!config.Load(tszConfigFileName))
|
||||
{
|
||||
cout << writetime << tszConfigFileName << "DB<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* szHanServerName = config.Get("HanServerName");
|
||||
const char* szHanDBName = config.Get("HanDBName");
|
||||
const char* szHanUserName = config.Get("HanUserName");
|
||||
const char* szHanPassword = config.Get("HanPassword");
|
||||
|
||||
if(!hanDB.ConnectSQLServer(szHanServerName, szHanDBName,
|
||||
szHanUserName, szHanPassword, OleDB::ConnType_ORACLE))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << hanDB.GetErrorString()
|
||||
<< " ServerName : " << szHanServerName
|
||||
<< " DBName : " << szHanDBName
|
||||
<< " UserName : " << szHanUserName
|
||||
<< " Password : " << szHanPassword
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* szBillingServerName = config.Get("BillingServerName");
|
||||
const char* szBillingDBName = config.Get("BillingDBName");
|
||||
const char* szBillingUserName = config.Get("BillingUserName");
|
||||
const char* szBillingPassword = config.Get("BillingPassword");
|
||||
|
||||
if(!billingDB.ConnectSQLServer(szBillingServerName, szBillingDBName,
|
||||
szBillingUserName, szBillingPassword, OleDB::ConnType_MSSQL))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << billingDB.GetErrorString()
|
||||
<< " ServerName : " << szBillingServerName
|
||||
<< " DBName : " << szBillingDBName
|
||||
<< " UserName : " << szBillingUserName
|
||||
<< " Password : " << szBillingPassword
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD>̺<EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>
|
||||
if(!billingDB.ExcuteQuery("EXEC agt_PersonBilling_Delete"))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20>ӽ<EFBFBD> <20><><EFBFBD>̺<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD> : "
|
||||
<< billingDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
int nMinNum = 0;
|
||||
|
||||
if(!billingDB.ExcuteQueryGetData(
|
||||
"SELECT intCount FROM TblImportedNum WHERE strCompType = 'H'", &nMinNum))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǽ<EFBFBD> <20><>ȣ<EFBFBD><C8A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> : "
|
||||
<< billingDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
//##### KTE - EDIT 20041207 #####
|
||||
//nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,
|
||||
// "SELECT TO_CHAR(ENDDATE, 'YYYY-MM-DD HH24:MI:SS '), "
|
||||
// "MEMBERID, "
|
||||
// "CAST(BILLNUM AS VARCHAR(11)),"
|
||||
// "CAST(RYLUID AS VARCHAR(11)),"
|
||||
// "CAST(GAMEMIN AS VARCHAR(11)),"
|
||||
// "CAST(BILLTYPE AS VARCHAR(2)) "
|
||||
// " FROM RYLBILLINGT WHERE BILLNUM > ? AND HanCHK = 'N' ORDER BY BILLNUM ASC");
|
||||
|
||||
nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,
|
||||
"SELECT MEMBERID,"
|
||||
"TO_CHAR(REGDATE, 'YYYY-MM-DD HH24:MI:SS '),"
|
||||
"TO_CHAR(BILLENDDATE,'YYYY-MM-DD HH24:MI:SS '),"
|
||||
"CAST(KEEPERSEQ AS VARCHAR(11)),"
|
||||
"CAST(RYLUID AS VARCHAR(11)),"
|
||||
"CAST(ADDEDDAY AS VARCHAR(11)),"
|
||||
"CAST(ADDEDTIME AS VARCHAR(11)),"
|
||||
"CAST(ADDEDMONTH AS VARCHAR(11)),"
|
||||
"CAST(AUTOBILL AS VARCHAR(2)) "
|
||||
"FROM RYLCHECKT WHERE KEEPERSEQ > ? AND CHECKFLAG = 'N' ORDER BY KEEPERSEQ ASC");
|
||||
|
||||
if(nQueryLen < 0)
|
||||
{
|
||||
cout << writetime << "<EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
OleDB::PARAM_INFO BillingInfoParam;
|
||||
memset(&BillingInfoParam, 0, sizeof(OleDB::PARAM_INFO));
|
||||
|
||||
BillingInfoParam.ColNum = 1;
|
||||
|
||||
BillingInfoParam.ColSize[0] = sizeof(int);
|
||||
BillingInfoParam.ColType[0] = DBTYPE_I4;
|
||||
|
||||
if(!hanDB.ExcuteQueryWithParams(szQuery,
|
||||
reinterpret_cast<char*>(&nMinNum), BillingInfoParam, OleDB::Rowset_Get))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> : "
|
||||
<< hanDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
typedef std::vector<HanBillingData> BillingDataArray;
|
||||
|
||||
BillingDataArray hanBillingArray;
|
||||
hanBillingArray.reserve(5000);
|
||||
|
||||
const int MAX_DATA = 1000;
|
||||
HanBillingData hanBillingData[MAX_DATA];
|
||||
memset(hanBillingData, 0, sizeof(HanBillingData) * MAX_DATA);
|
||||
|
||||
int nReturnRow = 0;
|
||||
while(hanDB.GetData((void**)&hanBillingData,
|
||||
sizeof(HanBillingData), MAX_DATA, &nReturnRow))
|
||||
{
|
||||
if(0 == nReturnRow)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
hanBillingArray.insert(hanBillingArray.end(),
|
||||
hanBillingData, hanBillingData + nReturnRow);
|
||||
|
||||
memset(hanBillingData, 0, sizeof(HanBillingData) * MAX_DATA);
|
||||
}
|
||||
|
||||
|
||||
//##### KTE - EDIT 20041207 #####
|
||||
// BillNum, MemberID, RylUID, BillingType, EndTime, GameMin
|
||||
//const char* szInsertQuery = "INSERT INTO TblPersonBilling_log "
|
||||
// "(intIndex, strClientID, UID, strBillingType, dateEndTime, intServiceTime, strConvertChk, dateInsertTime) "
|
||||
// "values (%s, '%s', %s, '%s', '%s', %s, 'N', GetDate())";
|
||||
|
||||
//const char* szNullEndInsertQuery = "INSERT INTO TblPersonBilling_log "
|
||||
// "(intIndex, strClientID, UID, strBillingType, dateEndTime, intServiceTime, strConvertChk, dateInsertTime) "
|
||||
// "values (%s, '%s', %s, '%s', NULL, %s, 'N', GetDate())";
|
||||
|
||||
// BillNum , ClientID , UID , RegDate , AddedDay , AddedTime , AddedMonth , BillEndDate , AutoBill ,CheckFlag,InsertTime
|
||||
const char* szInsertQuery = "INSERT INTO dbo.TblRYLCheckT "
|
||||
"(BillNum , ClientID , UID , RegDate , AddedDay , AddedTime , AddedMonth , BillEndDate , AutoBill,CheckFlag ,InsertTime) "
|
||||
"VALUES (%s, '%s' , %s , '%s' , %s , %s , %s , '%s' , '%s' , 'N' , GETDATE() )" ;
|
||||
|
||||
const char* szNullEndInsertQuery = "INSERT INTO dbo.TblRYLCheckT "
|
||||
"(BillNum , ClientID , UID , RegDate , AddedDay , AddedTime , AddedMonth , AutoBill,CheckFlag ,InsertTime) "
|
||||
"VALUES (%s, '%s' , %s , '%s' , %s , %s , %s , '%s' , 'N' , GETDATE() )" ;
|
||||
|
||||
BillingDataArray::iterator pos = hanBillingArray.begin();
|
||||
BillingDataArray::iterator end = hanBillingArray.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
HanBillingData& data = *pos;
|
||||
|
||||
//if(0 == strlen(data.m_EndDate))
|
||||
//{
|
||||
// nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen, szNullEndInsertQuery,
|
||||
// data.m_BillNum, data.m_MemberID, data.m_RylUID, data.m_BillingType, data.m_GameMin);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen, szInsertQuery,
|
||||
// data.m_BillNum, data.m_MemberID, data.m_RylUID, data.m_BillingType,
|
||||
// data.m_EndDate, data.m_GameMin);
|
||||
//}
|
||||
if( 0 == strlen(data.m_BillEndDate))
|
||||
{
|
||||
nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,szNullEndInsertQuery,
|
||||
data.m_KeeperSeq, data.m_MemberID, data.m_RylUID, data.m_RegDate,
|
||||
data.m_AddedDay, data.m_AddedTime, data.m_AddedMonth, data.m_AutoBill);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,szInsertQuery,
|
||||
data.m_KeeperSeq, data.m_MemberID, data.m_RylUID, data.m_RegDate,
|
||||
data.m_AddedDay, data.m_AddedTime, data.m_AddedMonth, data.m_BillEndDate, data.m_AutoBill);
|
||||
}
|
||||
|
||||
if(nQueryLen < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!billingDB.ExcuteQuery(szQuery))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20>Ѱ<EFBFBD><D1B0>ӿ<EFBFBD><D3BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << billingDB.GetErrorString()
|
||||
<< " <20><><EFBFBD><EFBFBD> BillNum : " << data.m_KeeperSeq << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int nMaxNum = 0;
|
||||
|
||||
//##### KTE - EDIT 20041207 #####
|
||||
//if(!billingDB.ExcuteQueryGetData(
|
||||
// "SELECT MAX(intIndex) FROM TblPersonBilling_log WHERE strConvertCHK ='N'", &nMaxNum))
|
||||
|
||||
if(!billingDB.ExcuteQueryGetData(
|
||||
"SELECT MAX(BillNum) FROM dbo.TblRYLCheckT WHERE CheckFlag = 'N'", &nMaxNum))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20>Ѱ<EFBFBD><D1B0>ӿ<EFBFBD><D3BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǽ<EFBFBD> <20>ִ<EFBFBD> <20><>ȣ<EFBFBD><C8A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> : "
|
||||
<< billingDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(0 < nMaxNum)
|
||||
{
|
||||
//##### KTE - EDIT 20041207 #####
|
||||
//nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,
|
||||
// "UPDATE RYLBILLINGT SET HANCHK = 'Y' "
|
||||
// "WHERE BILLNUM > ? AND BILLNUM <= ? AND HANCHK = 'N'");
|
||||
nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,
|
||||
"UPDATE RYLCHECKT SET CHECKFLAG = 'Y' "
|
||||
"WHERE KEEPERSEQ > ? AND KEEPERSEQ <= ? AND CHECKFLAG = 'N'");
|
||||
|
||||
if(nQueryLen < 0)
|
||||
{
|
||||
cout << writetime << "<EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
OleDB::PARAM_INFO BillingUpdateParam;
|
||||
memset(&BillingUpdateParam, 0, sizeof(OleDB::PARAM_INFO));
|
||||
|
||||
BillingUpdateParam.ColNum = 2;
|
||||
|
||||
BillingUpdateParam.ColSize[0] = sizeof(int);
|
||||
BillingUpdateParam.ColType[0] = DBTYPE_I4;
|
||||
|
||||
BillingUpdateParam.ColSize[1] = sizeof(int);
|
||||
BillingUpdateParam.ColType[1] = DBTYPE_I4;
|
||||
|
||||
char szData[sizeof(int) * 2];
|
||||
memcpy(szData, &nMinNum, sizeof(int));
|
||||
memcpy(szData + sizeof(int), &nMaxNum, sizeof(int));
|
||||
|
||||
if(!hanDB.ExcuteQueryWithParams(szQuery, szData, BillingUpdateParam, OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> : "
|
||||
<< hanDB.GetErrorString() << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,
|
||||
"UPDATE TblImportedNum SET intCount = %d WHERE strCompType = 'H'", nMaxNum);
|
||||
|
||||
if(nQueryLen < 0)
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> "
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!billingDB.ExcuteQuery(szQuery, OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> : "
|
||||
<< billingDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum << endl;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>
|
||||
if(!billingDB.ExcuteQuery("EXEC agt_PersonBilling_CHK"))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< billingDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD>." << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
157
Server/Billing/GetHanBilling/GetHanBilling.vcproj
Normal file
157
Server/Billing/GetHanBilling/GetHanBilling.vcproj
Normal file
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="GetHanBilling"
|
||||
ProjectGUID="{56E2A7F7-7BAD-4095-BCDB-AE1015B981D0}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../DB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/GetHanBilling.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/GetHanBilling.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../DB"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/GetHanBilling.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\GetHanBilling.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
32
Server/Billing/GetHanBilling/ReadMe.txt
Normal file
32
Server/Billing/GetHanBilling/ReadMe.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
========================================================================
|
||||
<20>ܼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> : GetHanBilling <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
========================================================================
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><> GetHanBilling <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
<EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> GetHanBilling <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǾ<D4B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
|
||||
GetHanBilling.vcproj
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>⺻ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++<2B><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ɿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
GetHanBilling.cpp
|
||||
<20>⺻ <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
<EFBFBD><EFBFBD>Ÿ ǥ<><C7A5> <20><><EFBFBD><EFBFBD>:
|
||||
|
||||
StdAfx.h <20><> StdAfx.cpp<70><70>
|
||||
GetHanBilling.pch<63><68><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> PCH(<28≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD>) <20><><EFBFBD>ϰ<EFBFBD>
|
||||
StdAfx.obj<62><6A><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>:
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> "TODO:" <20>ּ<EFBFBD><D6BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
|
||||
<EFBFBD>ҽ<EFBFBD> <20>ڵ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
8
Server/Billing/GetHanBilling/stdafx.cpp
Normal file
8
Server/Billing/GetHanBilling/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// GetHanBilling.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD> STDAFX.H<><48><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
12
Server/Billing/GetHanBilling/stdafx.h
Normal file
12
Server/Billing/GetHanBilling/stdafx.h
Normal file
@@ -0,0 +1,12 @@
|
||||
// stdafx.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD>
|
||||
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <tchar.h>
|
||||
|
||||
// TODO: <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
295
Server/Billing/GetHanBillingLogData/GetHanBillingLogData.cpp
Normal file
295
Server/Billing/GetHanBillingLogData/GetHanBillingLogData.cpp
Normal file
@@ -0,0 +1,295 @@
|
||||
// GetHanBillingLogData.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <myOLEDB.h>
|
||||
#include <Config.h>
|
||||
#include <Log.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <ctime>
|
||||
#include <list>
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct BillingLogData
|
||||
{
|
||||
char strClientID[20];
|
||||
int UID;
|
||||
int intCRMIndex;
|
||||
char strIP[15];
|
||||
char strBillingType[2];
|
||||
int tinyServerID;
|
||||
char firstLoginTime[20];
|
||||
char loginTime[20];
|
||||
char logoutTime[20];
|
||||
int intPlayTime;
|
||||
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
template<class _Elem, class _Traits>
|
||||
inline basic_ostream<_Elem, _Traits>& __cdecl writetime(basic_ostream<_Elem, _Traits>& _Ostr)
|
||||
{
|
||||
SYSTEMTIME systime;
|
||||
GetLocalTime(&systime);
|
||||
|
||||
_Elem fill = _Ostr.fill();
|
||||
|
||||
_Ostr << setfill('0')
|
||||
<< "["
|
||||
<< setw(4) << systime.wYear << "-"
|
||||
<< setw(2) << systime.wMonth << "-"
|
||||
<< setw(2) << systime.wDay << " "
|
||||
<< setw(2) << systime.wHour << ":"
|
||||
<< setw(2) << systime.wMinute << ":"
|
||||
<< setw(2) << systime.wSecond << "] " << setfill(fill);
|
||||
|
||||
return (_Ostr);
|
||||
}
|
||||
|
||||
bool LoadLastProcessedTime(const char* szFileName, __time64_t* lpLastProcessedTime)
|
||||
{
|
||||
FILE* file = fopen(szFileName, "rb");
|
||||
if(0 != file)
|
||||
{
|
||||
if(0 != lpLastProcessedTime)
|
||||
{
|
||||
tm tmLastProcessedTime;
|
||||
memset(&tmLastProcessedTime, 0, sizeof(tm));
|
||||
|
||||
fscanf(file, "%04d-%02d-%02d %02d:%02d:%02d",
|
||||
&tmLastProcessedTime.tm_year, &tmLastProcessedTime.tm_mon, &tmLastProcessedTime.tm_mday,
|
||||
&tmLastProcessedTime.tm_hour, &tmLastProcessedTime.tm_min, &tmLastProcessedTime.tm_sec);
|
||||
|
||||
tmLastProcessedTime.tm_year -= 1900;
|
||||
tmLastProcessedTime.tm_mon -= 1;
|
||||
|
||||
*lpLastProcessedTime = _mktime64(&tmLastProcessedTime);
|
||||
fclose(file);
|
||||
return true;
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SaveLastProcessedTime(const char* szFileName, __time64_t LastProcessedTime)
|
||||
{
|
||||
FILE* file = fopen(szFileName, "wt");
|
||||
if(0 != file)
|
||||
{
|
||||
tm tmLastProcessedTime = *_localtime64(&LastProcessedTime);
|
||||
|
||||
fprintf(file, "%04d-%02d-%02d %02d:%02d:%02d",
|
||||
tmLastProcessedTime.tm_year + 1900, tmLastProcessedTime.tm_mon + 1, tmLastProcessedTime.tm_mday,
|
||||
tmLastProcessedTime.tm_hour, tmLastProcessedTime.tm_min, tmLastProcessedTime.tm_sec);
|
||||
|
||||
fclose(file);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPTSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
CLog log;
|
||||
CConfigurator config;
|
||||
|
||||
OleDB hanDB;
|
||||
OleDB gamaDB;
|
||||
|
||||
char szQuery[OleDB::MaxQueryTextLen];
|
||||
int nQueryLen = 0;
|
||||
|
||||
if(!log.RedirectStdOut("GetHanBillingLogData_Log"))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
cout << endl << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>." << endl;
|
||||
|
||||
TCHAR* tszConfigFileName = TEXT("BillingLogData.cfg");
|
||||
|
||||
if(!config.Load(tszConfigFileName))
|
||||
{
|
||||
cout << writetime << tszConfigFileName << "DB<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* szTimeFileName = "GetHanBillingLogDataTime.txt";
|
||||
|
||||
const char* szHanServerName = config.Get("HanServerName");
|
||||
const char* szHanDBName = config.Get("HanDBName");
|
||||
const char* szHanUserName = config.Get("HanUserName");
|
||||
const char* szHanPassword = config.Get("HanPassword");
|
||||
|
||||
if(!hanDB.ConnectSQLServer(szHanServerName, szHanDBName,
|
||||
szHanUserName, szHanPassword, OleDB::ConnType_MSSQL))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << hanDB.GetErrorString()
|
||||
<< " ServerName : " << szHanServerName
|
||||
<< " DBName : " << szHanDBName
|
||||
<< " UserName : " << szHanUserName
|
||||
<< " Password : " << szHanPassword
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* szGamaServerName = config.Get("GamaServerName");
|
||||
const char* szGamaDBName = config.Get("GamaDBName");
|
||||
const char* szGamaUserName = config.Get("GamaUserName");
|
||||
const char* szGamaPassword = config.Get("GamaPassword");
|
||||
|
||||
if(!gamaDB.ConnectSQLServer(szGamaServerName, szGamaDBName,
|
||||
szGamaUserName, szGamaPassword, OleDB::ConnType_MSSQL))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << gamaDB.GetErrorString()
|
||||
<< " ServerName : " << szGamaServerName
|
||||
<< " DBName : " << szGamaDBName
|
||||
<< " UserName : " << szGamaUserName
|
||||
<< " Password : " << szGamaPassword
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
__time64_t lastTime = 0;
|
||||
if(!LoadLastProcessedTime(szTimeFileName, &lastTime))
|
||||
{
|
||||
cout << writetime << szTimeFileName << "<EFBFBD>ð<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
__time64_t currentTime = _time64(0);
|
||||
|
||||
tm tmLastTime = *_localtime64(&lastTime);
|
||||
tm tmCurrentTime = *_localtime64(¤tTime);
|
||||
|
||||
_snprintf(szQuery, OleDB::MaxQueryTextLen - 1, "select "
|
||||
"strClientID, "
|
||||
"UID, "
|
||||
"intCRMIndex, "
|
||||
"strIp, "
|
||||
"CAST(strBillingType AS VARCHAR(2)), "
|
||||
"CAST(tinyServerID AS INT), "
|
||||
"CONVERT(varchar(20), FirstLoginTime, 20), "
|
||||
"CONVERT(varchar(20), LoginTime, 20), "
|
||||
"CONVERT(varchar(20), LogoutTime, 20), "
|
||||
"intPlayTime "
|
||||
"from tblcurrentuser_log where firstlogintime >='%04d-%02d-%02d %02d:%02d:%02d' "
|
||||
"and firstlogintime < '%04d-%02d-%02d %02d:%02d:%02d'",
|
||||
|
||||
tmLastTime.tm_year + 1900, tmLastTime.tm_mon + 1, tmLastTime.tm_mday,
|
||||
tmLastTime.tm_hour, tmLastTime.tm_min, tmLastTime.tm_sec,
|
||||
|
||||
tmCurrentTime.tm_year + 1900, tmCurrentTime.tm_mon + 1, tmCurrentTime.tm_mday,
|
||||
tmCurrentTime.tm_hour, tmCurrentTime.tm_min, tmCurrentTime.tm_sec);
|
||||
|
||||
szQuery[OleDB::MaxQueryTextLen - 1] = 0;
|
||||
|
||||
if(!hanDB.ExcuteQuery(szQuery))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>Ѱ<EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> <20>α<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
<< hanDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
typedef std::list<std::pair<int, BillingLogData*> > InsertList;
|
||||
|
||||
InsertList insertList;
|
||||
|
||||
const int MAX_DATA = OleDB::MaxRowNum;
|
||||
BillingLogData* lpBillingLogData = new BillingLogData[MAX_DATA];
|
||||
|
||||
int nReturnRow = 0;
|
||||
int nTotalRow = 0;
|
||||
while(hanDB.GetData((void**)lpBillingLogData,
|
||||
sizeof(BillingLogData), MAX_DATA, &nReturnRow))
|
||||
{
|
||||
if(0 == nReturnRow)
|
||||
{
|
||||
if(0 != lpBillingLogData)
|
||||
{
|
||||
delete [] lpBillingLogData;
|
||||
lpBillingLogData = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
nTotalRow += nReturnRow;
|
||||
insertList.push_back(std::make_pair(nReturnRow, lpBillingLogData));
|
||||
lpBillingLogData = new BillingLogData[MAX_DATA];
|
||||
}
|
||||
|
||||
InsertList::iterator pos = insertList.begin();
|
||||
InsertList::iterator end = insertList.end();
|
||||
|
||||
int nInsertRow = 0;
|
||||
|
||||
for(;pos != end; ++pos)
|
||||
{
|
||||
BillingLogData* lpBillingLogData = pos->second;
|
||||
BillingLogData* lpBillingLogDataEnd = lpBillingLogData + pos->first;
|
||||
|
||||
for(; lpBillingLogData != lpBillingLogDataEnd; ++lpBillingLogData)
|
||||
{
|
||||
_snprintf(szQuery, OleDB::MaxQueryTextLen - 1,
|
||||
"INSERT INTO Tblcurrentuser_log values ('%s', %d, %d, '%s', '%c', %d, '%s', '%s', '%s', %d)",
|
||||
lpBillingLogData->strClientID,
|
||||
lpBillingLogData->UID,
|
||||
lpBillingLogData->intCRMIndex,
|
||||
lpBillingLogData->strIP,
|
||||
lpBillingLogData->strBillingType[0],
|
||||
lpBillingLogData->tinyServerID,
|
||||
lpBillingLogData->firstLoginTime,
|
||||
lpBillingLogData->loginTime,
|
||||
lpBillingLogData->logoutTime,
|
||||
lpBillingLogData->intPlayTime);
|
||||
|
||||
szQuery[OleDB::MaxQueryTextLen - 1] = 0;
|
||||
|
||||
if(!gamaDB.ExcuteQuery(szQuery, OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20>Ѱ<EFBFBD><D1B0>ӿ<EFBFBD><D3BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : "
|
||||
<< gamaDB.GetErrorString() << " " << szQuery;
|
||||
}
|
||||
else
|
||||
{
|
||||
++nInsertRow;
|
||||
}
|
||||
}
|
||||
|
||||
delete [] pos->second;
|
||||
}
|
||||
|
||||
if(!SaveLastProcessedTime(szTimeFileName, currentTime))
|
||||
{
|
||||
cout << writetime << szTimeFileName << "<EFBFBD>ð<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(nInsertRow != nTotalRow)
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǽ<EFBFBD> : " << nInsertRow << " <20>о<EFBFBD><D0BE><EFBFBD> <20>Ǽ<EFBFBD> : " << nTotalRow << endl;
|
||||
}
|
||||
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : ó<><C3B3> <20>Ǽ<EFBFBD> : " << nTotalRow << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
154
Server/Billing/GetHanBillingLogData/GetHanBillingLogData.vcproj
Normal file
154
Server/Billing/GetHanBillingLogData/GetHanBillingLogData.vcproj
Normal file
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="GetHanBillingLogData"
|
||||
ProjectGUID="{96F0B439-8858-4D3F-BF05-3EE915CFDD94}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../DB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/GetHanBillingLogData.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/GetHanBillingLogData.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../DB"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/GetHanBillingLogData.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\GetHanBillingLogData.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
8
Server/Billing/GetHanBillingLogData/stdafx.cpp
Normal file
8
Server/Billing/GetHanBillingLogData/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// GetHanBillingLogData.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD> STDAFX.H<><48><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
18
Server/Billing/GetHanBillingLogData/stdafx.h
Normal file
18
Server/Billing/GetHanBillingLogData/stdafx.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// stdafx.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD>
|
||||
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Windows <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
// Windows <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#include <windows.h>
|
||||
// C<><43> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
||||
|
||||
// TODO: <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
539
Server/Billing/MediaWebBilling/MediaWebBilling.cpp
Normal file
539
Server/Billing/MediaWebBilling/MediaWebBilling.cpp
Normal file
@@ -0,0 +1,539 @@
|
||||
// MediaWebBilling.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "MediaWebBilling.h"
|
||||
#include <myOLEDB.h>
|
||||
#include <Config.h>
|
||||
#include <Log.h>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <ctime>
|
||||
#include <vector>
|
||||
#include <oledb.h>
|
||||
#include <srv.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
template<class _Elem, class _Traits>
|
||||
inline basic_ostream<_Elem, _Traits>& __cdecl writetime(basic_ostream<_Elem, _Traits>& _Ostr)
|
||||
{
|
||||
SYSTEMTIME systime;
|
||||
GetLocalTime(&systime);
|
||||
|
||||
_Elem fill = _Ostr.fill();
|
||||
|
||||
_Ostr << setfill('0')
|
||||
<< "["
|
||||
<< setw(4) << systime.wYear << "-"
|
||||
<< setw(2) << systime.wMonth << "-"
|
||||
<< setw(2) << systime.wDay << " "
|
||||
<< setw(2) << systime.wHour << ":"
|
||||
<< setw(2) << systime.wMinute << ":"
|
||||
<< setw(2) << systime.wSecond << "] " << setfill(fill);
|
||||
|
||||
return (_Ostr);
|
||||
}
|
||||
|
||||
inline std::string& addNumber(std::string& str, const char* szData)
|
||||
{
|
||||
const char* szWriteData = (0 == strlen(szData)) ? "NULL" : szData;
|
||||
|
||||
str += szWriteData;
|
||||
str += ", ";
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
inline std::string& addString(std::string& str, const char* szData)
|
||||
{
|
||||
if(0 == strlen(szData))
|
||||
{
|
||||
str += "NULL, ";
|
||||
}
|
||||
else
|
||||
{
|
||||
str += "'";
|
||||
str += szData;
|
||||
str += "', ";
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
struct MWBillingData
|
||||
{
|
||||
DBCHAR m_CRMCode[16]; // PC<50><43> CRMCode
|
||||
DBCHAR m_Command[16]; // ó<><C3B3> command
|
||||
|
||||
DBCHAR m_CRMIP1[13]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪1
|
||||
DBCHAR m_CRMIP2[13]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪2
|
||||
DBCHAR m_CRMIP3[13]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪3
|
||||
|
||||
DBCHAR m_Index[11]; // <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>(SEQID)
|
||||
DBCHAR m_ServiceTime[11]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD>
|
||||
DBCHAR m_EndTime[11]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><>û<EFBFBD>ð<EFBFBD>
|
||||
DBCHAR m_ServiceIPNum[11]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69><70><EFBFBD><EFBFBD>
|
||||
|
||||
DBCHAR m_SysDay[20]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> YYYY-MM-DD HH24:MI:SS
|
||||
DBCHAR m_ServiceDay[11]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> YYYY-MM-DD
|
||||
DBCHAR m_EndDay[11]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> YYYY-MM-DD
|
||||
|
||||
DBCHAR m_CRMStartIP1[4]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>1
|
||||
DBCHAR m_CRMStopIP1[4]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪<EFBFBD><EBBFAA>1
|
||||
DBCHAR m_CRMStartIP2[4]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>2
|
||||
DBCHAR m_CRMStopIP2[4]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪<EFBFBD><EBBFAA>2
|
||||
DBCHAR m_CRMStartIP3[4]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪<EFBFBD><EBBFAA><EFBFBD><EFBFBD>3
|
||||
DBCHAR m_CRMStopIP3[4]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ip<69>뿪<EFBFBD><EBBFAA>3
|
||||
|
||||
DBCHAR m_TimeProcess[2]; // <20>ܿ<EFBFBD><DCBF><EFBFBD>ó<EFBFBD><C3B3> <20><><EFBFBD><EFBFBD> (m = -ó<><C3B3>, z = <20><><EFBFBD><EFBFBD>)
|
||||
DBCHAR m_PriceType[2]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (D <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, T <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
};
|
||||
|
||||
struct RemainTimeLog
|
||||
{
|
||||
DBCHAR m_CRMCode[20];
|
||||
DBCHAR m_IntServiceTime[11];
|
||||
DBCHAR m_DelColumn[2];
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
|
||||
int APIENTRY _tWinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPTSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
CLog log;
|
||||
CConfigurator config;
|
||||
|
||||
OleDB mwDB;
|
||||
OleDB billingDB;
|
||||
|
||||
char szQuery[OleDB::MaxQueryTextLen];
|
||||
int nQueryLen = 0;
|
||||
|
||||
if(!log.RedirectStdOut("MediaWebBilling"))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
cout << endl << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>." << endl;
|
||||
|
||||
TCHAR* tszConfigFileName = TEXT("MWBillingInfo.cfg");
|
||||
|
||||
if(!config.Load(tszConfigFileName))
|
||||
{
|
||||
cout << writetime << tszConfigFileName << "DB<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* szMWServerName = config.Get("MWServerName");
|
||||
const char* szMWDBName = config.Get("MWDBName");
|
||||
const char* szMWUserName = config.Get("MWUserName");
|
||||
const char* szMWPassword = config.Get("MWPassword");
|
||||
|
||||
if(!mwDB.ConnectSQLServer(szMWServerName, szMWDBName,
|
||||
szMWUserName, szMWPassword, OleDB::ConnType_ORACLE))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << mwDB.GetErrorString()
|
||||
<< " ServerName : " << szMWServerName
|
||||
<< " DBName : " << szMWDBName
|
||||
<< " UserName : " << szMWUserName
|
||||
<< " Password : " << szMWPassword
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char* szBillingServerName = config.Get("BillingServerName");
|
||||
const char* szBillingDBName = config.Get("BillingDBName");
|
||||
const char* szBillingUserName = config.Get("BillingUserName");
|
||||
const char* szBillingPassword = config.Get("BillingPassword");
|
||||
|
||||
if(!billingDB.ConnectSQLServer(szBillingServerName, szBillingDBName,
|
||||
szBillingUserName, szBillingPassword, OleDB::ConnType_MSSQL))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << billingDB.GetErrorString()
|
||||
<< " ServerName : " << szBillingServerName
|
||||
<< " DBName : " << szBillingDBName
|
||||
<< " UserName : " << szBillingUserName
|
||||
<< " Password : " << szBillingPassword
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 1. <20><><EFBFBD>̺<EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>
|
||||
if(!billingDB.ExcuteQuery("EXEC agt_CRM_RYLLOG_Delete"))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20>ӽ<EFBFBD> <20><><EFBFBD>̺<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD> : "
|
||||
<< billingDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 2. <20>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD>(Oracle) <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
int nMinNum = 0;
|
||||
|
||||
if(!billingDB.ExcuteQueryGetData(
|
||||
"SELECT intCount FROM TblImportedNum WHERE strCompType = 'M'", &nMinNum))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǽ<EFBFBD> <20><>ȣ<EFBFBD><C8A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> : "
|
||||
<< billingDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,
|
||||
"SELECT "
|
||||
" CAST(crmcode AS VARCHAR(16)), "
|
||||
" CAST(command AS VARCHAR(16)), "
|
||||
|
||||
" CAST(crmip1 AS VARCHAR(13)), "
|
||||
" CAST(crmip2 AS VARCHAR(13)), "
|
||||
" CAST(crmip3 AS VARCHAR(13)), "
|
||||
|
||||
" CAST(seqid AS VARCHAR(11)), "
|
||||
" CAST(servicetime AS VARCHAR(11)), "
|
||||
" CAST(endtime AS VARCHAR(11)), "
|
||||
" CAST(serviceipnum AS VARCHAR(11)), "
|
||||
|
||||
" TO_CHAR(regdate, 'YYYY-MM-DD HH24:MI:SS '), "
|
||||
" TO_CHAR(serviceday, 'YYYY-MM-DD '), "
|
||||
" TO_CHAR(endday, 'YYYY-MM-DD '), "
|
||||
|
||||
" CAST(startcrmip1 AS VARCHAR(4)), "
|
||||
" CAST(endcrmip1 AS VARCHAR(4)), "
|
||||
" CAST(startcrmip2 AS VARCHAR(4)), "
|
||||
" CAST(endcrmip2 AS VARCHAR(4)), "
|
||||
" CAST(startcrmip3 AS VARCHAR(4)), "
|
||||
" CAST(endcrmip3 AS VARCHAR(4)), "
|
||||
|
||||
" CAST(timeprocess AS VARCHAR(2)), "
|
||||
" CAST(pricetype AS VARCHAR(2)) "
|
||||
|
||||
" FROM CRM.CRM_RYLLOG WHERE SEQID > %d AND RYLCHK = 'N' ORDER BY SEQID ASC", nMinNum);
|
||||
|
||||
if(nQueryLen < 0)
|
||||
{
|
||||
cout << writetime << "<EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!mwDB.ExcuteQuery(szQuery))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> : "
|
||||
<< mwDB.GetErrorString()
|
||||
<< " Query : " << szQuery << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
typedef std::vector<MWBillingData> BillingDataArray;
|
||||
|
||||
BillingDataArray mwBillingArray;
|
||||
mwBillingArray.reserve(5000);
|
||||
|
||||
const int MAX_DATA = 1000;
|
||||
MWBillingData mwBillingData[MAX_DATA];
|
||||
memset(mwBillingData, 0, sizeof(MWBillingData) * MAX_DATA);
|
||||
|
||||
int nReturnRow = 0;
|
||||
while(mwDB.GetData((void**)&mwBillingData,
|
||||
sizeof(MWBillingData), MAX_DATA, &nReturnRow))
|
||||
{
|
||||
if(0 == nReturnRow)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
mwBillingArray.insert(mwBillingArray.end(),
|
||||
mwBillingData, mwBillingData + nReturnRow);
|
||||
|
||||
memset(mwBillingData, 0, sizeof(MWBillingData) * MAX_DATA);
|
||||
}
|
||||
|
||||
// BillNum, MemberID, RylUID, BillingType, EndTime, GameMin
|
||||
const char* szInsertQuery = "INSERT INTO TblCRM_RYLLOG "
|
||||
" (intIndex, strCRMCode, strPriceType, dateSysDay, strCommand, "
|
||||
" strCRMIP1,strStartCRMIP1,strEndCRMIP1, "
|
||||
" strCRMIP2,strStartCRMIP2,strEndCRMIP2, "
|
||||
" strCRMIP3,strStartCRMIP3,strEndCRMIP3, "
|
||||
" strTimeprocess, intServiceTime, dateServiceDay, "
|
||||
" TinyServiceIPNum, dateEndday, intEndTime, strRylChk) values ( ";
|
||||
|
||||
BillingDataArray::iterator pos = mwBillingArray.begin();
|
||||
BillingDataArray::iterator end = mwBillingArray.end();
|
||||
|
||||
std::string strQuery;
|
||||
strQuery.reserve(OleDB::MaxQueryTextLen);
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
MWBillingData& data = *pos;
|
||||
|
||||
strQuery.assign(szInsertQuery);
|
||||
|
||||
addNumber(strQuery, data.m_Index);
|
||||
addString(strQuery, data.m_CRMCode);
|
||||
addString(strQuery, data.m_PriceType);
|
||||
addString(strQuery, data.m_SysDay);
|
||||
addString(strQuery, data.m_Command);
|
||||
|
||||
addString(strQuery, data.m_CRMIP1);
|
||||
addNumber(strQuery, data.m_CRMStartIP1);
|
||||
addNumber(strQuery, data.m_CRMStopIP1);
|
||||
|
||||
addString(strQuery, data.m_CRMIP2);
|
||||
addNumber(strQuery, data.m_CRMStartIP2);
|
||||
addNumber(strQuery, data.m_CRMStopIP2);
|
||||
|
||||
addString(strQuery, data.m_CRMIP3);
|
||||
addNumber(strQuery, data.m_CRMStartIP3);
|
||||
addNumber(strQuery, data.m_CRMStopIP3);
|
||||
|
||||
addString(strQuery, data.m_TimeProcess);
|
||||
addNumber(strQuery, data.m_ServiceTime);
|
||||
addString(strQuery, data.m_ServiceDay);
|
||||
addNumber(strQuery, data.m_ServiceIPNum);
|
||||
addString(strQuery, data.m_EndDay);
|
||||
addNumber(strQuery, data.m_EndTime);
|
||||
|
||||
strQuery += " 'N')";
|
||||
|
||||
if(!billingDB.ExcuteQuery(strQuery.c_str(), OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. : " << billingDB.GetErrorString()
|
||||
<< " <20><><EFBFBD><EFBFBD> SEQIndex : " << data.m_Index
|
||||
<< " Query : " << strQuery << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int nMaxNum = 0;
|
||||
|
||||
if(!billingDB.ExcuteQueryGetData(
|
||||
"SELECT MAX(intIndex) FROM TblCRM_RYLLOG WHERE strRYLCHK = 'N' AND strConvertCHK ='N'", &nMaxNum))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǽ<EFBFBD> <20>ִ<EFBFBD> <20><>ȣ<EFBFBD><C8A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> : "
|
||||
<< billingDB.GetErrorString() << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(0 < nMaxNum)
|
||||
{
|
||||
nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,
|
||||
"UPDATE CRM.CRM_RYLLOG SET RYLCHK = 'Y'"
|
||||
"WHERE SEQID > %d AND SEQID <= %d AND RYLCHK = 'N'", nMinNum, nMaxNum);
|
||||
|
||||
if(nQueryLen < 0)
|
||||
{
|
||||
cout << writetime << "<EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!mwDB.ExcuteQuery(szQuery, OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> : "
|
||||
<< mwDB.GetErrorString() << " Query : " << szQuery << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
nQueryLen = _snprintf(szQuery, OleDB::MaxQueryTextLen,
|
||||
"UPDATE TblImportedNum SET intCount = %d WHERE strCompType = 'M'", nMaxNum);
|
||||
|
||||
if(nQueryLen < 0)
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> "
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< " Query : " << szQuery << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!billingDB.ExcuteQuery(szQuery, OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> : "
|
||||
<< billingDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< " Query : " << szQuery << endl;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 3. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>
|
||||
if(!billingDB.ExcuteQuery("EXEC agt_CRM_RYLLOG_EXECUTE"))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : agt_CRM_RYLLOG_EXECUTE<54><45> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< billingDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< endl;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20>ִ<EFBFBD>.
|
||||
// return -1;
|
||||
}
|
||||
|
||||
// 4. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<><C5B8> <20><><EFBFBD><EFBFBD>
|
||||
if(!billingDB.ExcuteQuery("EXEC agt_CRM_RemainServiceTime"))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : agt_CRM_RemainServiceTime<6D><65> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< billingDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 5. <20>ܿ<EFBFBD><DCBF>ð<EFBFBD> <20>Ѱ<EFBFBD><D1B0>ֱ<EFBFBD> agt_CRM_RemainServiceTime_Transfer
|
||||
if(!billingDB.ExcuteQuery(
|
||||
"SELECT strCRMCode, "
|
||||
" CAST(MIN(intServiceTime) AS VARCHAR(11)), "
|
||||
" CAST(delColumn AS VARCHAR(2)) "
|
||||
" FROM TblCRM_SERVICETIME WHERE WebCHK = 'N' "
|
||||
" GROUP BY strCRMCode,delColumn"))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : <20>ܿ<EFBFBD><DCBF>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< billingDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
typedef std::vector<RemainTimeLog> RemainTimeLogArray;
|
||||
|
||||
RemainTimeLogArray remainTimeLogArray;
|
||||
remainTimeLogArray.reserve(10000);
|
||||
|
||||
const int MAX_REMAIN_TIME_DATA = 1000;
|
||||
RemainTimeLog remainTimes[MAX_REMAIN_TIME_DATA];
|
||||
|
||||
memset(remainTimes, 0, sizeof(RemainTimeLog) * MAX_REMAIN_TIME_DATA);
|
||||
|
||||
int nGetRemainTimesNum = 0;
|
||||
|
||||
while(billingDB.GetData((void**)&remainTimes, sizeof(RemainTimeLog),
|
||||
MAX_REMAIN_TIME_DATA, &nGetRemainTimesNum))
|
||||
{
|
||||
if(0 == nGetRemainTimesNum)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
remainTimeLogArray.insert(remainTimeLogArray.end(),
|
||||
remainTimes, remainTimes + nGetRemainTimesNum);
|
||||
|
||||
memset(remainTimes, 0, sizeof(RemainTimeLog) * MAX_REMAIN_TIME_DATA);
|
||||
}
|
||||
|
||||
if(!billingDB.ExcuteQuery("UPDATE TblCRM_SERVICETIME SET WebCHK = 'Y' WHERE WebCHK ='N'",
|
||||
OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : WebCHK<48><4B> Y<><59> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< billingDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
RemainTimeLogArray::iterator rtpos = remainTimeLogArray.begin();
|
||||
RemainTimeLogArray::iterator rtend = remainTimeLogArray.end();
|
||||
|
||||
for(; rtpos != rtend; ++rtpos)
|
||||
{
|
||||
RemainTimeLog& data = *rtpos;
|
||||
|
||||
char szCRMCode[20];
|
||||
memset(szCRMCode, 0, sizeof(char) * 20);
|
||||
|
||||
strQuery = "SELECT CRMCODE FROM GAME.CRM_SERVICETIME WHERE CRMCODE = '";
|
||||
strQuery += data.m_CRMCode;
|
||||
strQuery += "' AND GAMECODE ='002' ";
|
||||
|
||||
if(!mwDB.ExcuteQuery(strQuery.c_str()))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : CRMCODE<44>˻<EFBFBD><CBBB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< mwDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< " Query : " << strQuery << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
mwDB.GetData(szCRMCode);
|
||||
|
||||
if(0 != strlen(szCRMCode))
|
||||
{
|
||||
strQuery = "UPDATE GAME.CRM_SERVICETIME SET SERVICETIME = ";
|
||||
strQuery += data.m_IntServiceTime;
|
||||
strQuery += ",DELCHK = '";
|
||||
strQuery += data.m_DelColumn;
|
||||
strQuery += "' WHERE CRMCODE = '";
|
||||
strQuery += data.m_CRMCode;
|
||||
strQuery += "' AND GAMECODE ='002'";
|
||||
|
||||
if(!mwDB.ExcuteQuery(strQuery.c_str(), OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : ServiceTime Update<74><65> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< mwDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< " Query : " << strQuery << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strQuery = "INSERT INTO GAME.CRM_SERVICETIME (CRMCODE,GAMECODE,SERVICETIME,DELCHK) VALUES ('";
|
||||
strQuery += data.m_CRMCode;
|
||||
strQuery += "','002',";
|
||||
strQuery += data.m_IntServiceTime;
|
||||
strQuery += ", '";
|
||||
strQuery += data.m_DelColumn;
|
||||
strQuery += "') ";
|
||||
|
||||
if(!mwDB.ExcuteQuery(strQuery.c_str(), OleDB::Rowset_Update))
|
||||
{
|
||||
cout << writetime << "<EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : ServiceTime Insert<72><74> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< mwDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< " Query : " << strQuery << endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 6. <20>ܿ<EFBFBD><DCBF>ð<EFBFBD> <20>α׳<CEB1><D7B3><EFBFBD><EFBFBD><EFBFBD>
|
||||
if(!billingDB.ExcuteQuery("EXEC agt_CRM_RemainServiceTime_LOG"))
|
||||
{
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>DB : agt_CRM_RemainServiceTime_LOG<4F><47> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>. : "
|
||||
<< billingDB.GetErrorString()
|
||||
<< " MinBillingNum : " << nMinNum
|
||||
<< " MaxBillingNum : " << nMaxNum
|
||||
<< endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
cout << writetime << "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD>." << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
3
Server/Billing/MediaWebBilling/MediaWebBilling.h
Normal file
3
Server/Billing/MediaWebBilling/MediaWebBilling.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "resource.h"
|
||||
BIN
Server/Billing/MediaWebBilling/MediaWebBilling.ico
Normal file
BIN
Server/Billing/MediaWebBilling/MediaWebBilling.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
128
Server/Billing/MediaWebBilling/MediaWebBilling.rc
Normal file
128
Server/Billing/MediaWebBilling/MediaWebBilling.rc
Normal file
@@ -0,0 +1,128 @@
|
||||
//Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD> <20><>ũ<EFBFBD><C5A9>Ʈ<EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE 2 <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
LANGUAGE 18, 1
|
||||
#pragma code_page(949)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ý<EFBFBD><C3BD>ۿ<EFBFBD><DBBF><EFBFBD> <20>ϰ<EFBFBD><CFB0><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> <20>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ID <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><>ġ<EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
IDI_MEDIAWEBBILLING ICON "MediaWebBilling.ico"
|
||||
IDI_SMALL ICON "small.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// <20><EFBFBD>
|
||||
//
|
||||
|
||||
IDC_MEDIAWEBBILLING MENU
|
||||
BEGIN
|
||||
POPUP "<22><><EFBFBD><EFBFBD>(&F)"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&X)", IDM_EXIT
|
||||
END
|
||||
POPUP "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&H)"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>(&A)...", IDM_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// <20><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ű
|
||||
//
|
||||
|
||||
IDC_MEDIAWEBBILLING ACCELERATORS
|
||||
BEGIN
|
||||
"?", IDM_ABOUT, ASCII, ALT
|
||||
"/", IDM_ABOUT, ASCII, ALT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOG 22, 17, 230, 75
|
||||
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "<22><><EFBFBD><EFBFBD>"
|
||||
FONT 9, "System"
|
||||
BEGIN
|
||||
ICON IDI_MEDIAWEBBILLING,IDC_MYICON,14,9,16,16
|
||||
LTEXT "MediaWebBilling <20><><EFBFBD><EFBFBD> 1.0",IDC_STATIC,49,10,119,8,SS_NOPREFIX
|
||||
LTEXT "Copyright (C) 2003",IDC_STATIC,49,20,119,8
|
||||
DEFPUSHBUTTON "Ȯ<><C8AE>",IDOK,195,6,30,11,WS_GROUP
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// <20><><EFBFBD>ڿ<EFBFBD> <20><><EFBFBD>̺<EFBFBD>
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDC_MEDIAWEBBILLING "MEDIAWEBBILLING"
|
||||
IDS_APP_TITLE "MediaWebBilling"
|
||||
END
|
||||
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE 3 <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // APSTUDIO_INVOKED<45><44> <20>ƴմϴ<D5B4>.
|
||||
172
Server/Billing/MediaWebBilling/MediaWebBilling.vcproj
Normal file
172
Server/Billing/MediaWebBilling/MediaWebBilling.vcproj
Normal file
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="MediaWebBilling"
|
||||
ProjectGUID="{FD74ADE2-6961-4304-B23A-89DA3665477E}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../DB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/MediaWebBilling.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/MediaWebBilling.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../DB"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/MediaWebBilling.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\MediaWebBilling.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\MediaWebBilling.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
<File
|
||||
RelativePath=".\MediaWebBilling.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\MediaWebBilling.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\small.ico">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
53
Server/Billing/MediaWebBilling/ReadMe.txt
Normal file
53
Server/Billing/MediaWebBilling/ReadMe.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
========================================================================
|
||||
Win32 <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> : MediaWebBilling <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
========================================================================
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><> MediaWebBilling <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
<EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> MediaWebBilling <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǾ<D4B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
|
||||
MediaWebBilling.vcproj
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>⺻ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++<2B><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ɿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
MediaWebBilling.cpp
|
||||
<20>⺻ <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
MediaWebBilling.rc
|
||||
<20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
Microsoft Windows <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. RES <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>Ʈ<EFBFBD><C6AE>, <20><> Ŀ<><C4BF> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
Resource.h
|
||||
<20><> <20><><EFBFBD>ҽ<EFBFBD> ID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>а<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>մϴ<D5B4>.
|
||||
MediaWebBilling.ico
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD≯<EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(32x32)<29><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
<20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⺻ <20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MediaWebBilling.rc<72><63> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
small.ico
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD≯<EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(16x16)<29><>
|
||||
<20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>. <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⺻ <20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
MediaWebBilling.rc<72><63> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
<EFBFBD><EFBFBD>Ÿ ǥ<><C7A5> <20><><EFBFBD><EFBFBD>:
|
||||
|
||||
StdAfx.h <20><> StdAfx.cpp<70><70>
|
||||
MediaWebBilling.pch<63><68><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> PCH(<28≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD>) <20><><EFBFBD>ϰ<EFBFBD>
|
||||
StdAfx.obj<62><6A><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>:
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> "TODO:" <20>ּ<EFBFBD><D6BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
|
||||
<EFBFBD>ҽ<EFBFBD> <20>ڵ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
29
Server/Billing/MediaWebBilling/Resource.h
Normal file
29
Server/Billing/MediaWebBilling/Resource.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by MediaWebBilling.rc
|
||||
//
|
||||
|
||||
#define IDS_APP_TITLE 103
|
||||
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_MEDIAWEBBILLING_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDM_ABOUT 104
|
||||
#define IDM_EXIT 105
|
||||
#define IDI_MEDIAWEBBILLING 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDC_MEDIAWEBBILLING 109
|
||||
#define IDC_MYICON 2
|
||||
#define IDC_STATIC -1
|
||||
// <20><> <20><>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>⺻<EFBFBD><E2BABB><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#define _APS_NO_MFC 130
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
BIN
Server/Billing/MediaWebBilling/small.ico
Normal file
BIN
Server/Billing/MediaWebBilling/small.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
8
Server/Billing/MediaWebBilling/stdafx.cpp
Normal file
8
Server/Billing/MediaWebBilling/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// MediaWebBilling.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD> STDAFX.H<><48><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
18
Server/Billing/MediaWebBilling/stdafx.h
Normal file
18
Server/Billing/MediaWebBilling/stdafx.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// stdafx.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD>
|
||||
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Windows <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
// Windows <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#include <windows.h>
|
||||
// C<><43> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <tchar.h>
|
||||
|
||||
// TODO: <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
240
Server/Billing/한게임 통합빌링 테스트모듈/BillingAsyncSocket.cpp
Normal file
240
Server/Billing/한게임 통합빌링 테스트모듈/BillingAsyncSocket.cpp
Normal file
@@ -0,0 +1,240 @@
|
||||
// BillingAsyncSocket.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "BillingTestModule.h"
|
||||
#include "BillingAsyncSocket.h"
|
||||
#include ".\billingasyncsocket.h"
|
||||
|
||||
|
||||
// CBillingAsyncSocket
|
||||
|
||||
CBillingAsyncSocket::CBillingAsyncSocket()
|
||||
: m_eConnectionMode(ACTIVE_CONNECTION),
|
||||
m_nAddressLen(0),
|
||||
m_nRefCount(1),
|
||||
m_nSendBytesFirstPacket(0),
|
||||
m_nBufferUsed(0)
|
||||
{
|
||||
memset(&m_PeerAddress, 0, sizeof(SOCKADDR));
|
||||
}
|
||||
|
||||
CBillingAsyncSocket::~CBillingAsyncSocket()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// CBillingAsyncSocket <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD><D4BC>Դϴ<D4B4>.
|
||||
|
||||
CBillingAsyncSocket* CBillingAsyncSocket::CreateBillingSocket(int nSocketType, UINT nSocketPort)
|
||||
{
|
||||
CBillingAsyncSocket* lpSocket = new CBillingAsyncSocket;
|
||||
if(0 != lpSocket)
|
||||
{
|
||||
if(!lpSocket->Create(nSocketPort, nSocketType))
|
||||
{
|
||||
delete lpSocket;
|
||||
lpSocket = 0;
|
||||
}
|
||||
}
|
||||
return lpSocket;
|
||||
}
|
||||
|
||||
void CBillingAsyncSocket::OnAccept(int nErrorCode)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
if(0 == nErrorCode)
|
||||
{
|
||||
CBillingAsyncSocket* lpSocket = new CBillingAsyncSocket;
|
||||
|
||||
if(0 != lpSocket)
|
||||
{
|
||||
lpSocket->m_nAddressLen = sizeof(SOCKADDR_IN);
|
||||
|
||||
if(Accept(*lpSocket, &lpSocket->m_PeerAddress, &lpSocket->m_nAddressLen))
|
||||
{
|
||||
lpSocket->m_eConnectionMode = PASSIVE_CONNECTION;
|
||||
theApp.RegisterSocket(*lpSocket);
|
||||
|
||||
lpSocket->OnReceive(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
lpSocket->Release();
|
||||
lpSocket = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO : Make log here
|
||||
Close();
|
||||
}
|
||||
|
||||
CAsyncSocket::OnAccept(nErrorCode);
|
||||
}
|
||||
|
||||
|
||||
void CBillingAsyncSocket::OnReceive(int nErrorCode)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
if(0 == nErrorCode)
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
int nReceived = Receive(m_szRecvBuffer + m_nBufferUsed,
|
||||
MAX_RECV_BUFFER - m_nBufferUsed);
|
||||
|
||||
if(SOCKET_ERROR != nReceived)
|
||||
{
|
||||
m_nBufferUsed += nReceived;
|
||||
|
||||
size_t nBufferPos = 0;
|
||||
while(sizeof(unsigned short) + nBufferPos <= m_nBufferUsed)
|
||||
{
|
||||
unsigned short usPacketSize = ntohs(*reinterpret_cast<unsigned short*>(m_szRecvBuffer + nBufferPos))
|
||||
+ sizeof(unsigned short) + sizeof(unsigned short) + sizeof(unsigned long);
|
||||
|
||||
if(m_nBufferUsed < usPacketSize + nBufferPos)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
theApp.AddRecvPacket(*this, m_szRecvBuffer, usPacketSize);
|
||||
nBufferPos += usPacketSize;
|
||||
}
|
||||
|
||||
if(0 != nBufferPos)
|
||||
{
|
||||
memmove(m_szRecvBuffer, m_szRecvBuffer + nBufferPos,
|
||||
m_nBufferUsed - nBufferPos);
|
||||
|
||||
m_nBufferUsed -= nBufferPos;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(GetLastError() != WSAEWOULDBLOCK)
|
||||
{
|
||||
// TODO : Make Log here
|
||||
Close();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO : Make Log here
|
||||
Close();
|
||||
}
|
||||
|
||||
CAsyncSocket::OnReceive(nErrorCode);
|
||||
}
|
||||
|
||||
|
||||
void CBillingAsyncSocket::OnSend(int nErrorCode)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
if(0 == nErrorCode || WSAEWOULDBLOCK == nErrorCode)
|
||||
{
|
||||
SendPacket();
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO : Make Log here
|
||||
Close();
|
||||
}
|
||||
|
||||
CAsyncSocket::OnSend(nErrorCode);
|
||||
}
|
||||
|
||||
|
||||
void CBillingAsyncSocket::OnClose(int nErrorCode)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
theApp.RemoveSocket(*this);
|
||||
|
||||
CAsyncSocket::OnClose(nErrorCode);
|
||||
|
||||
if(m_eConnectionMode == PASSIVE_CONNECTION)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
Release();
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingAsyncSocket::OnConnect(int nErrorCode)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
m_eConnectionMode = ACTIVE_CONNECTION;
|
||||
CAsyncSocket::OnConnect(nErrorCode);
|
||||
}
|
||||
|
||||
LONG CBillingAsyncSocket::AddRef()
|
||||
{
|
||||
return ++m_nRefCount;
|
||||
}
|
||||
|
||||
LONG CBillingAsyncSocket::Release()
|
||||
{
|
||||
LONG nRefCount = --m_nRefCount;
|
||||
|
||||
if(0 == nRefCount)
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
return nRefCount;
|
||||
}
|
||||
|
||||
|
||||
void CBillingAsyncSocket::SendPending(const HanUnitedBilling::GLTransStruct& glTransStruct)
|
||||
{
|
||||
m_SendPacketList.push_back(glTransStruct);
|
||||
SendPacket();
|
||||
}
|
||||
|
||||
void CBillingAsyncSocket::SendPacket()
|
||||
{
|
||||
while(!m_SendPacketList.empty())
|
||||
{
|
||||
HanUnitedBilling::GLTransStruct& sendTransStruct = m_SendPacketList.front();
|
||||
|
||||
int nTotalBytes = ntohs(sendTransStruct.DataSize) + sizeof(sendTransStruct.DataSize)
|
||||
+ sizeof(sendTransStruct.HeaderMsg) + sizeof(sendTransStruct.SeqID);
|
||||
|
||||
int nSendLen = Send(
|
||||
reinterpret_cast<char*>(&sendTransStruct) + m_nSendBytesFirstPacket,
|
||||
nTotalBytes - m_nSendBytesFirstPacket);
|
||||
|
||||
if(SOCKET_ERROR != nSendLen)
|
||||
{
|
||||
m_nSendBytesFirstPacket += nSendLen;
|
||||
|
||||
if(m_nSendBytesFirstPacket == nTotalBytes)
|
||||
{
|
||||
m_SendPacketList.pop_front();
|
||||
m_nSendBytesFirstPacket = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(GetLastError() != WSAEWOULDBLOCK)
|
||||
{
|
||||
// TODO : Make Log here
|
||||
Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
63
Server/Billing/한게임 통합빌링 테스트모듈/BillingAsyncSocket.h
Normal file
63
Server/Billing/한게임 통합빌링 테스트모듈/BillingAsyncSocket.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
|
||||
#include <deque>
|
||||
#include "HanUnitedBillingPacket.h"
|
||||
|
||||
// CBillingAsyncSocket <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
class CBillingAsyncSocket : public CAsyncSocket
|
||||
{
|
||||
public:
|
||||
|
||||
enum ConnectionMode
|
||||
{
|
||||
ACTIVE_CONNECTION,
|
||||
PASSIVE_CONNECTION
|
||||
};
|
||||
|
||||
static CBillingAsyncSocket* CreateBillingSocket(int nSocketType = SOCK_STREAM, UINT nSocketPort = 0);
|
||||
|
||||
void SendPending(const HanUnitedBilling::GLTransStruct& glTransStruct);
|
||||
void SendPacket();
|
||||
|
||||
const SOCKADDR& GetPeerAddr() { return m_PeerAddress; }
|
||||
const char* GetPeerAddrString() { return inet_ntoa(reinterpret_cast<SOCKADDR_IN&>(m_PeerAddress).sin_addr); }
|
||||
|
||||
virtual void OnAccept(int nErrorCode);
|
||||
virtual void OnReceive(int nErrorCode);
|
||||
virtual void OnSend(int nErrorCode);
|
||||
virtual void OnClose(int nErrorCode);
|
||||
virtual void OnConnect(int nErrorCode);
|
||||
|
||||
LONG AddRef();
|
||||
LONG Release();
|
||||
|
||||
protected:
|
||||
|
||||
CBillingAsyncSocket();
|
||||
virtual ~CBillingAsyncSocket();
|
||||
|
||||
private:
|
||||
|
||||
typedef std::deque<HanUnitedBilling::GLTransStruct> SendPacketList;
|
||||
|
||||
SOCKADDR m_PeerAddress;
|
||||
int m_nAddressLen;
|
||||
|
||||
ConnectionMode m_eConnectionMode;
|
||||
LONG m_nRefCount;
|
||||
|
||||
SendPacketList m_SendPacketList;
|
||||
size_t m_nSendBytesFirstPacket;
|
||||
|
||||
enum
|
||||
{
|
||||
MAX_RECV_BUFFER = sizeof(HanUnitedBilling::GLTransStruct) * 10
|
||||
};
|
||||
|
||||
char m_szRecvBuffer[MAX_RECV_BUFFER];
|
||||
size_t m_nBufferUsed;
|
||||
|
||||
};
|
||||
|
||||
|
||||
242
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModule.cpp
Normal file
242
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModule.cpp
Normal file
@@ -0,0 +1,242 @@
|
||||
// BillingTestModule.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "BillingTestModule.h"
|
||||
#include "BillingTestModuleDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
#include <mmsystem.h>
|
||||
#include <algorithm>
|
||||
|
||||
// CBillingTestModuleApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CBillingTestModuleApp, CWinApp)
|
||||
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
|
||||
CBillingTestModuleApp::Packet::Packet(CBillingAsyncSocket& billingAsyncSocket,
|
||||
const HanUnitedBilling::GLTransStruct glTransStruct,
|
||||
unsigned long dwDelayMSec)
|
||||
: m_billingAsyncSocket(billingAsyncSocket),
|
||||
m_glTransStruct(glTransStruct),
|
||||
m_dwPendingTime(timeGetTime()),
|
||||
m_dwDelayMSec(dwDelayMSec)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// CBillingTestModuleApp <20><><EFBFBD><EFBFBD>
|
||||
|
||||
CBillingTestModuleApp::CBillingTestModuleApp()
|
||||
: m_lpBillingTestModule(0), m_lpListenAsyncSocket(0)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
// InitInstance<63><65> <20><><EFBFBD><EFBFBD> <20>߿<EFBFBD><DFBF><EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CBillingTestModuleApp <20><>ü<EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
CBillingTestModuleApp theApp;
|
||||
|
||||
|
||||
// CBillingTestModuleApp <20>ʱ<EFBFBD>ȭ
|
||||
|
||||
BOOL CBillingTestModuleApp::InitInstance()
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>Ŵ<EFBFBD><C5B4>佺Ʈ<E4BDBA><C6AE> ComCtl32.dll <20><><EFBFBD><EFBFBD> 6 <20>̻<EFBFBD><CCBB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>־<EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>, Windows XP <20><EFBFBD> <20>ݵ<EFBFBD><DDB5><EFBFBD> InitCommonControls()<29><> <20>ʿ<EFBFBD><CABF>մϴ<D5B4>.
|
||||
// InitCommonControls()<29><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
InitCommonControls();
|
||||
|
||||
CWinApp::InitInstance();
|
||||
|
||||
if(!AfxSocketInit())
|
||||
{
|
||||
AfxMessageBox("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ <20><><EFBFBD><EFBFBD>!");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_lpListenAsyncSocket = CBillingAsyncSocket::CreateBillingSocket(SOCK_STREAM, LISTEN_PORT);
|
||||
|
||||
if(0 == m_lpListenAsyncSocket
|
||||
|| !m_lpListenAsyncSocket->Listen())
|
||||
{
|
||||
AfxMessageBox("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>!");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
AfxEnableControlContainer();
|
||||
|
||||
// ǥ<><C7A5> <20>ʱ<EFBFBD>ȭ
|
||||
// <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<>⸦ <20><><EFBFBD>̷<EFBFBD><CCB7><EFBFBD>
|
||||
// <20>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> Ư<><C6AF> <20>ʱ<EFBFBD>ȭ <20><>ƾ<EFBFBD><C6BE> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
// <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> Ű<><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// TODO: <20><> <20><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> ȸ<><C8B8> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
SetRegistryKey(_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1>"));
|
||||
|
||||
CBillingTestModuleDlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
INT_PTR nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> Ȯ<><C8AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
// <20>ڵ带 <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD>Ҹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
// <20>ڵ带 <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
m_lpListenAsyncSocket->Close();
|
||||
m_lpListenAsyncSocket->Release();
|
||||
m_lpListenAsyncSocket = 0;
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> FALSE<53><45> <20><>ȯ<EFBFBD>մϴ<D5B4>.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void CBillingTestModuleApp::ProcessPacket()
|
||||
{
|
||||
const int MAX_PROCESS_COUNT = 100;
|
||||
int nProcessCount = 0;
|
||||
|
||||
CBillingTestModuleDlg* lpDlg = GetMainDlg();
|
||||
|
||||
if(0 != lpDlg)
|
||||
{
|
||||
unsigned long dwCurrentTime = timeGetTime();
|
||||
|
||||
while(!m_RecvPacketList.empty() && nProcessCount < MAX_PROCESS_COUNT)
|
||||
{
|
||||
Packet& packet = m_RecvPacketList.front();
|
||||
|
||||
// <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><>Ŷ<EFBFBD><C5B6> ó<><C3B3>.
|
||||
if(0 < static_cast<long>((packet.m_dwDelayMSec + packet.m_dwPendingTime) - dwCurrentTime))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// <20>α<EFBFBD><CEB1><EFBFBD>, <20>αƿ<D7BE><C6BF><EFBFBD> ó<><C3B3><EFBFBD>Ѵ<EFBFBD>.
|
||||
packet.m_glTransStruct.HeaderMsg = ntohs(packet.m_glTransStruct.HeaderMsg);
|
||||
packet.m_glTransStruct.DataSize = ntohs(packet.m_glTransStruct.DataSize);
|
||||
packet.m_glTransStruct.SeqID = ntohl(packet.m_glTransStruct.SeqID);
|
||||
|
||||
const char* szIP = packet.m_glTransStruct.Data;
|
||||
const char* szID = packet.m_glTransStruct.Data + HanUnitedBilling::MAX_IP_LEN;
|
||||
|
||||
switch(packet.m_glTransStruct.HeaderMsg)
|
||||
{
|
||||
case HanUnitedBilling::AUTH:
|
||||
lpDlg->Login(packet.m_billingAsyncSocket, packet.m_glTransStruct.SeqID, szID, szIP);
|
||||
break;
|
||||
|
||||
case HanUnitedBilling::LOGOUT:
|
||||
lpDlg->Logout(packet.m_billingAsyncSocket, packet.m_glTransStruct.SeqID, szID, szIP);
|
||||
break;
|
||||
|
||||
case HanUnitedBilling::BILL_AUTH:
|
||||
lpDlg->BillAuth(packet.m_billingAsyncSocket, packet.m_glTransStruct.SeqID, szID, szIP);
|
||||
break;
|
||||
}
|
||||
|
||||
packet.m_billingAsyncSocket.Release();
|
||||
m_RecvPacketList.pop_front();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingTestModuleApp::AddRecvPacket(CBillingAsyncSocket& billingAsyncSocket,
|
||||
const char* szBuffer, unsigned short usDataLen)
|
||||
{
|
||||
CBillingTestModuleDlg* lpDlg = GetMainDlg();
|
||||
|
||||
HanUnitedBilling::GLTransStruct glTransStruct;
|
||||
memset(&glTransStruct, 0, sizeof(HanUnitedBilling::GLTransStruct));
|
||||
memcpy(&glTransStruct, szBuffer, min(usDataLen, sizeof(HanUnitedBilling::GLTransStruct)));
|
||||
|
||||
if(0 != lpDlg)
|
||||
{
|
||||
unsigned long dwDelayMSec = 0;
|
||||
CBillingTestModuleDlg::Behavior behavior = CBillingTestModuleDlg::NORMAL_PROCESS;
|
||||
|
||||
switch(ntohs(glTransStruct.HeaderMsg))
|
||||
{
|
||||
case HanUnitedBilling::AUTH:
|
||||
{
|
||||
behavior = lpDlg->GetLoginAckType();
|
||||
if(CBillingTestModuleDlg::DELAY_ALL_PROCESS == behavior)
|
||||
{
|
||||
dwDelayMSec = lpDlg->GetLoginAckDelay();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case HanUnitedBilling::BILL_AUTH:
|
||||
{
|
||||
behavior = lpDlg->GetBillAuthAckType();
|
||||
if(CBillingTestModuleDlg::DELAY_ALL_PROCESS == behavior)
|
||||
{
|
||||
dwDelayMSec = lpDlg->GetBillAuthAckDelay();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if(CBillingTestModuleDlg::DROP_ALL_PROCESS != behavior)
|
||||
{
|
||||
billingAsyncSocket.AddRef();
|
||||
|
||||
m_RecvPacketList.push_back(Packet(
|
||||
billingAsyncSocket, glTransStruct, dwDelayMSec));
|
||||
}
|
||||
else
|
||||
{
|
||||
lpDlg->AddLog(NORMAL_LOG, "SS:0x%p/UID_IP:%s/Cmd:%d/SeqID:%d/<2F><>Ŷ<EFBFBD><C5B6> Drop<6F>մϴ<D5B4>.",
|
||||
&billingAsyncSocket, billingAsyncSocket.GetPeerAddrString(),
|
||||
ntohs(glTransStruct.HeaderMsg), ntohl(glTransStruct.SeqID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingTestModuleApp::RegisterSocket(CBillingAsyncSocket& billingAsyncSocket)
|
||||
{
|
||||
if(m_SocketList.end() == std::find(m_SocketList.begin(), m_SocketList.end(), &billingAsyncSocket))
|
||||
{
|
||||
m_SocketList.push_back(&billingAsyncSocket);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CBillingTestModuleApp::RemoveSocket(CBillingAsyncSocket& billingAsyncSocket)
|
||||
{
|
||||
SocketList::iterator pos = std::find(m_SocketList.begin(), m_SocketList.end(), &billingAsyncSocket);
|
||||
|
||||
if(pos != m_SocketList.end())
|
||||
{
|
||||
m_SocketList.erase(pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CBillingTestModuleApp::SendPendingAll(const HanUnitedBilling::GLTransStruct& glTransStruct)
|
||||
{
|
||||
SocketList::iterator pos = m_SocketList.begin();
|
||||
SocketList::iterator end = m_SocketList.end();
|
||||
|
||||
for(; pos != end; ++pos)
|
||||
{
|
||||
(*pos)->SendPending(glTransStruct);
|
||||
}
|
||||
}
|
||||
99
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModule.h
Normal file
99
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModule.h
Normal file
@@ -0,0 +1,99 @@
|
||||
// BillingTestModule.h : PROJECT_NAME <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error PCH<43><48><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> 'stdafx.h'<27><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#include "resource.h" // <20><> <20><>ȣ
|
||||
#include "BillingAsyncSocket.h"
|
||||
#include "HanUnitedBillingPacket.h"
|
||||
|
||||
#include <deque>
|
||||
#include <list>
|
||||
|
||||
class CBillingTestModuleDlg;
|
||||
|
||||
// CBillingTestModuleApp:
|
||||
// <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> BillingTestModule.cpp<70><70> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
//
|
||||
|
||||
class CBillingTestModuleApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CBillingTestModuleApp();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
LISTEN_PORT = 10800
|
||||
};
|
||||
|
||||
void ProcessPacket();
|
||||
void AddRecvPacket(CBillingAsyncSocket& billingAsyncSocket,
|
||||
const char* szBuffer, unsigned short usDataLen);
|
||||
|
||||
void SetMainDlg(CBillingTestModuleDlg& billingTestModule) { m_lpBillingTestModule = &billingTestModule; }
|
||||
void ResetMainDlg(CBillingTestModuleDlg& billingTestModule)
|
||||
{
|
||||
if(m_lpBillingTestModule == &billingTestModule)
|
||||
{
|
||||
m_lpBillingTestModule = 0;
|
||||
}
|
||||
}
|
||||
|
||||
CBillingTestModuleDlg* GetMainDlg() { return m_lpBillingTestModule; }
|
||||
|
||||
size_t GetConnectedSocketNum() { return m_SocketList.size(); }
|
||||
|
||||
void RegisterSocket(CBillingAsyncSocket& billingAsyncSocket);
|
||||
void RemoveSocket(CBillingAsyncSocket& billingAsyncSocket);
|
||||
|
||||
void SendPendingAll(const HanUnitedBilling::GLTransStruct& glTransStruct);
|
||||
|
||||
private:
|
||||
|
||||
bool ProcessLogin(CBillingAsyncSocket& billingAsyncSocket,
|
||||
const HanUnitedBilling::GLTransStruct& glTransStruct);
|
||||
|
||||
bool ProcessLogout(CBillingAsyncSocket& billingAsyncSocket,
|
||||
const HanUnitedBilling::GLTransStruct& glTransStruct);
|
||||
|
||||
bool ProcessBillAuth(CBillingAsyncSocket& billingAsyncSocket,
|
||||
const HanUnitedBilling::GLTransStruct& glTransStruct);
|
||||
|
||||
struct Packet
|
||||
{
|
||||
CBillingAsyncSocket& m_billingAsyncSocket;
|
||||
HanUnitedBilling::GLTransStruct m_glTransStruct;
|
||||
|
||||
unsigned long m_dwPendingTime;
|
||||
unsigned long m_dwDelayMSec;
|
||||
|
||||
explicit Packet(CBillingAsyncSocket& billingAsyncSocket,
|
||||
const HanUnitedBilling::GLTransStruct glTransStruct, unsigned long dwDelayMSec);
|
||||
};
|
||||
|
||||
typedef std::deque<Packet> PacketList;
|
||||
typedef std::list<CBillingAsyncSocket*> SocketList;
|
||||
|
||||
PacketList m_RecvPacketList;
|
||||
SocketList m_SocketList;
|
||||
|
||||
CBillingAsyncSocket* m_lpListenAsyncSocket;
|
||||
CBillingTestModuleDlg* m_lpBillingTestModule;
|
||||
};
|
||||
|
||||
extern CBillingTestModuleApp theApp;
|
||||
243
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModule.rc
Normal file
243
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModule.rc
Normal file
@@ -0,0 +1,243 @@
|
||||
// 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
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(949)
|
||||
#endif //_WIN32
|
||||
|
||||
#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_KOR)\r\n"
|
||||
"LANGUAGE 18, 1\r\n"
|
||||
"#pragma code_page(949)\r\n"
|
||||
"#include ""res\\BillingTestModule.rc2"" // Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>\r\n"
|
||||
"#include ""afxres.rc"" // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>\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\\BillingTestModule.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
CAPTION "BillingTestModule <20><><EFBFBD><EFBFBD>"
|
||||
FONT 9, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
|
||||
LTEXT "BillingTestModule Version 1.0",IDC_STATIC,40,10,119,8,
|
||||
SS_NOPREFIX
|
||||
LTEXT "Copyright (C) 2004",IDC_STATIC,40,25,119,8
|
||||
DEFPUSHBUTTON "Ȯ<><C8AE>",IDOK,178,7,50,16,WS_GROUP
|
||||
END
|
||||
|
||||
IDD_BILLINGTESTMODULE_DIALOG DIALOGEX 0, 0, 599, 373
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE |
|
||||
WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "BillingTestModule"
|
||||
FONT 9, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "",IDC_CURRENT_USER_LIST,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,10,17,257,128
|
||||
CONTROL "",IDC_IP_START,"SysIPAddress32",WS_TABSTOP,24,181,74,13
|
||||
CONTROL "",IDC_IP_END,"SysIPAddress32",WS_TABSTOP,118,181,74,13
|
||||
PUSHBUTTON "IP <20>뿪 <20>߰<EFBFBD>",IDC_IP_ADD,196,181,57,13,BS_FLAT
|
||||
CONTROL "",IDC_LOGIN_IP_LIST,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,10,204,256,122
|
||||
GROUPBOX "<22><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>",IDC_STATIC,4,4,269,147,BS_FLAT
|
||||
GROUPBOX "<22><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> IP <20>뿪",IDC_STATIC,4,158,269,176,BS_FLAT
|
||||
LTEXT "~",IDC_STATIC,105,183,8,9
|
||||
GROUPBOX "<22><> <20><> IP <20><><EFBFBD><EFBFBD>",IDC_STATIC,10,170,256,29
|
||||
LTEXT "<22>α<EFBFBD><CEB1><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>",IDC_STATIC,12,341,54,8
|
||||
COMBOBOX IDC_LOGIN_ACK_TYPE,70,338,48,67,CBS_DROPDOWN | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>",IDC_STATIC,134,341,63,8
|
||||
EDITTEXT IDC_LOGIN_ACK_DELAY,70,352,48,12,ES_AUTOHSCROLL
|
||||
LTEXT "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD>(ms)",IDC_STATIC,9,355,61,8
|
||||
LTEXT "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD>(ms)",IDC_STATIC,135,355,61,8
|
||||
COMBOBOX IDC_BILL_AUTH_ACK_TYPE,199,338,48,69,CBS_DROPDOWN |
|
||||
CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
EDITTEXT IDC_BILL_AUTH_ACK_DELAY,199,352,48,12,ES_AUTOHSCROLL
|
||||
GROUPBOX "<22><> <20>α<EFBFBD>",IDC_STATIC,281,4,314,330,BS_FLAT
|
||||
PUSHBUTTON "<22>α<CEB1> <20><><EFBFBD>Ϸ<EFBFBD> <20><><EFBFBD><EFBFBD>",IDC_SAVELOG,344,344,64,14,BS_FLAT
|
||||
CONTROL "",IDC_LOG_LIST,"SysListView32",LVS_REPORT |
|
||||
LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,289,16,299,310
|
||||
PUSHBUTTON "<22>α<EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>",IDC_CLEARLOG,487,344,50,14,BS_FLAT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
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 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "041203b5"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "TODO: <ȸ<><C8B8> <20≯<EFBFBD>>"
|
||||
VALUE "FileDescription", "TODO: <<3C><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>>"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "BillingTestModule.exe"
|
||||
VALUE "LegalCopyright", "TODO: (c) <ȸ<><C8B8> <20≯<EFBFBD>>. All rights reserved."
|
||||
VALUE "OriginalFilename", "BillingTestModule.exe"
|
||||
VALUE "ProductName", "TODO: <<3C><>ǰ <20≯<EFBFBD>>"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "<22><>ȯ", 0x412, 949
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 228
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 48
|
||||
END
|
||||
|
||||
IDD_BILLINGTESTMODULE_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 4
|
||||
RIGHTMARGIN, 595
|
||||
TOPMARGIN, 4
|
||||
BOTTOMMARGIN, 369
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_CONTEXT_MENU MENU
|
||||
BEGIN
|
||||
POPUP "Menu1(&A)"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(&D)", ID_DISCONNECT_USER
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "<22><EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&M)", ID_SEND_MSG_USER
|
||||
END
|
||||
POPUP "Menu2(&B)"
|
||||
BEGIN
|
||||
MENUITEM "<22><><EFBFBD><EFBFBD>(&D)", ID_IP_DELETE
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ABOUTBOX "BillingTestModule <20><><EFBFBD><EFBFBD>(&A)..."
|
||||
END
|
||||
|
||||
#endif // <20>ѱ<EFBFBD><D1B1><EFBFBD> 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_KOR)
|
||||
LANGUAGE 18, 1
|
||||
#pragma code_page(949)
|
||||
#include "res\BillingTestModule.rc2" // Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>
|
||||
#include "afxres.rc" // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
205
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModule.vcproj
Normal file
205
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModule.vcproj
Normal file
@@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="BillingTestModule"
|
||||
ProjectGUID="{45133C4E-218B-4327-A547-9B64F0CACD5D}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../Executable/$(ConfigurationName)"
|
||||
IntermediateDirectory="../Intermediate/$(ProjectName)/$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\BillingAsyncSocket.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BillingTestModule.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BillingTestModuleDlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\BillingAsyncSocket.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BillingTestModule.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BillingTestModuleDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\HanUnitedBillingPacket.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
<File
|
||||
RelativePath=".\res\BillingTestModule.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BillingTestModule.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\BillingTestModule.rc2">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\res\BillingTestModule.manifest">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="BillingTestModule.rc"/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
802
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModuleDlg.cpp
Normal file
802
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModuleDlg.cpp
Normal file
@@ -0,0 +1,802 @@
|
||||
// BillingTestModuleDlg.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "BillingTestModule.h"
|
||||
#include "BillingTestModuleDlg.h"
|
||||
#include ".\billingtestmoduledlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> CAboutDlg <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
class CAboutDlg : public CDialog
|
||||
{
|
||||
public:
|
||||
CAboutDlg();
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
enum { IDD = IDD_ABOUTBOX };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
|
||||
{
|
||||
}
|
||||
|
||||
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CBillingTestModuleDlg <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
const int ID_PROCESS_PACKET_TIMER = 1000;
|
||||
|
||||
|
||||
CBillingTestModuleDlg::CBillingTestModuleDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CBillingTestModuleDlg::IDD, pParent)
|
||||
, m_LoginAckDelay(0)
|
||||
, m_BillAuthAckDelay(0)
|
||||
, m_nSocketNum(0)
|
||||
{
|
||||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_CURRENT_USER_LIST, m_ctrlCurrentUserList);
|
||||
DDX_Control(pDX, IDC_LOGIN_IP_LIST, m_ctrlLoginIPList);
|
||||
DDX_Control(pDX, IDC_IP_START, m_StartIP);
|
||||
DDX_Control(pDX, IDC_IP_END, m_EndIP);
|
||||
|
||||
DDX_Control(pDX, IDC_LOGIN_ACK_TYPE, m_LoginAckType);
|
||||
DDX_Control(pDX, IDC_BILL_AUTH_ACK_TYPE, m_BillAuthAckType);
|
||||
|
||||
DDX_Text(pDX, IDC_LOGIN_ACK_DELAY, m_LoginAckDelay);
|
||||
DDX_Text(pDX, IDC_BILL_AUTH_ACK_DELAY, m_BillAuthAckDelay);
|
||||
DDX_Control(pDX, IDC_LOG_LIST, m_BillingLog);
|
||||
DDX_Control(pDX, IDC_LOGIN_ACK_DELAY, m_LoginAckDelayDlg);
|
||||
DDX_Control(pDX, IDC_BILL_AUTH_ACK_DELAY, m_BillAuthAckDelayDlg);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CBillingTestModuleDlg, CDialog)
|
||||
ON_WM_SYSCOMMAND()
|
||||
ON_WM_PAINT()
|
||||
ON_WM_QUERYDRAGICON()
|
||||
//}}AFX_MSG_MAP
|
||||
ON_WM_CONTEXTMENU()
|
||||
ON_COMMAND(ID_DISCONNECT_USER, OnDisconnectUser)
|
||||
ON_COMMAND(ID_SEND_MSG_USER, OnSendMsgUser)
|
||||
ON_COMMAND(ID_IP_DELETE, OnIpDelete)
|
||||
ON_BN_CLICKED(IDC_IP_ADD, OnBnClickedIPAdd)
|
||||
ON_BN_CLICKED(IDC_SAVELOG, OnBnClickedSaveLog)
|
||||
ON_BN_CLICKED(IDC_CLEARLOG, OnBnClickedClearLog)
|
||||
ON_WM_TIMER()
|
||||
ON_WM_DESTROY()
|
||||
ON_CBN_SELCHANGE(IDC_LOGIN_ACK_TYPE, OnCbnSelchangeLoginAckType)
|
||||
ON_CBN_SELCHANGE(IDC_BILL_AUTH_ACK_TYPE, OnCbnSelchangeBillAuthAckType)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CBillingTestModuleDlg <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
|
||||
BOOL CBillingTestModuleDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// <20>ý<EFBFBD><C3BD><EFBFBD> <20><EFBFBD><DEB4><EFBFBD> "<22><><EFBFBD><EFBFBD>..." <20><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
// IDM_ABOUTBOX<4F><58> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD> <20>մϴ<D5B4>.
|
||||
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
|
||||
ASSERT(IDM_ABOUTBOX < 0xF000);
|
||||
|
||||
CMenu* pSysMenu = GetSystemMenu(FALSE);
|
||||
if (pSysMenu != NULL)
|
||||
{
|
||||
CString strAboutMenu;
|
||||
strAboutMenu.LoadString(IDS_ABOUTBOX);
|
||||
if (!strAboutMenu.IsEmpty())
|
||||
{
|
||||
pSysMenu->AppendMenu(MF_SEPARATOR);
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// <20><> <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><> â<><C3A2> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20>ƴ<EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>ũ<EFBFBD><C5A9> <20><> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
SetIcon(m_hIcon, TRUE); // ū <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
SetIcon(m_hIcon, FALSE); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
// TODO: <20><><EFBFBD> <20>߰<EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
m_ctrlCurrentUserList.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB);
|
||||
m_ctrlCurrentUserList.InsertColumn( 0, "ID", LVCFMT_LEFT, 200);
|
||||
m_ctrlCurrentUserList.InsertColumn( 1, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP", LVCFMT_LEFT, 200);
|
||||
|
||||
m_ctrlLoginIPList.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB);
|
||||
m_ctrlLoginIPList.InsertColumn( 0, "IP <20>뿪 <20><><EFBFBD><EFBFBD>", LVCFMT_LEFT, 200);
|
||||
m_ctrlLoginIPList.InsertColumn( 1, "IP <20>뿪 <20><>", LVCFMT_LEFT, 200);
|
||||
|
||||
m_BillingLog.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB);
|
||||
m_BillingLog.InsertColumn(0, "<EFBFBD>α<EFBFBD>", LVCFMT_LEFT, 500);
|
||||
|
||||
LoadAddress();
|
||||
|
||||
m_LoginAckType.InsertString(NORMAL_PROCESS, "<EFBFBD>⺻ ó<><C3B3>");
|
||||
m_LoginAckType.InsertString(SUCCESS_ALL_PROCESS, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
m_LoginAckType.InsertString(FAIL_ALL_PROCESS, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
m_LoginAckType.InsertString(DELAY_ALL_PROCESS, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>");
|
||||
m_LoginAckType.InsertString(DROP_ALL_PROCESS, "<EFBFBD><EFBFBD>û <20><><EFBFBD><EFBFBD>");
|
||||
|
||||
m_LoginAckType.SetCurSel(NORMAL_PROCESS);
|
||||
m_LoginAckDelayDlg.SetReadOnly();
|
||||
|
||||
m_BillAuthAckType.InsertString(NORMAL_PROCESS, "<EFBFBD>⺻ ó<><C3B3>");
|
||||
m_BillAuthAckType.InsertString(SUCCESS_ALL_PROCESS, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
m_BillAuthAckType.InsertString(FAIL_ALL_PROCESS, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||
m_BillAuthAckType.InsertString(DELAY_ALL_PROCESS, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>");
|
||||
m_BillAuthAckType.InsertString(DROP_ALL_PROCESS, "<EFBFBD><EFBFBD>û <20><><EFBFBD><EFBFBD>");
|
||||
|
||||
m_BillAuthAckType.SetCurSel(NORMAL_PROCESS);
|
||||
m_BillAuthAckDelayDlg.SetReadOnly();
|
||||
|
||||
m_LoginAckDelay = 0;
|
||||
m_BillAuthAckDelay = 0;
|
||||
|
||||
CString windowName;
|
||||
windowName.Format("BillingTestModule : Port(%u)", CBillingTestModuleApp::LISTEN_PORT);
|
||||
SetWindowText(windowName);
|
||||
|
||||
UpdateData(false);
|
||||
|
||||
theApp.SetMainDlg(*this);
|
||||
|
||||
SetTimer(ID_PROCESS_PACKET_TIMER, 200, 0);
|
||||
return TRUE; // <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> TRUE<55><45> <20><>ȯ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnSysCommand(UINT nID, LPARAM lParam)
|
||||
{
|
||||
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
|
||||
{
|
||||
CAboutDlg dlgAbout;
|
||||
dlgAbout.DoModal();
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnSysCommand(nID, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD>ڿ<EFBFBD> <20>ּ<EFBFBD>ȭ <20><><EFBFBD>߸<EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20>Ʒ<EFBFBD> <20>ڵ尡 <20>ʿ<EFBFBD><CABF>մϴ<D5B4>. <20><><EFBFBD><EFBFBD>/<2F><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> MFC <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>ũ<EFBFBD><C5A9><EFBFBD><EFBFBD> <20><> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
void CBillingTestModuleDlg::OnPaint()
|
||||
{
|
||||
if (IsIconic())
|
||||
{
|
||||
CPaintDC dc(this); // <20><EFBFBD><D7B8>⸦ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD> <20><><EFBFBD>ؽ<EFBFBD>Ʈ
|
||||
|
||||
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
|
||||
|
||||
// Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>簢<EFBFBD><E7B0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EEB5A5> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
int cxIcon = GetSystemMetrics(SM_CXICON);
|
||||
int cyIcon = GetSystemMetrics(SM_CYICON);
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
int x = (rect.Width() - cxIcon + 1) / 2;
|
||||
int y = (rect.Height() - cyIcon + 1) / 2;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8>ϴ<EFBFBD>.
|
||||
dc.DrawIcon(x, y, m_hIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnPaint();
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>ּ<EFBFBD>ȭ<EFBFBD><C8AD> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ȿ<EFBFBD> Ŀ<><C4BF><EFBFBD><EFBFBD> ǥ<>õǵ<C3B5><C7B5><EFBFBD> <20>ý<EFBFBD><C3BD>ۿ<EFBFBD><DBBF><EFBFBD>
|
||||
// <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
HCURSOR CBillingTestModuleDlg::OnQueryDragIcon()
|
||||
{
|
||||
return static_cast<HCURSOR>(m_hIcon);
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnContextMenu(CWnd* pWnd, CPoint point)
|
||||
{
|
||||
if( (pWnd->GetSafeHwnd() == m_ctrlCurrentUserList.GetSafeHwnd())
|
||||
&& (0 < m_ctrlCurrentUserList.GetSelectedCount()) )
|
||||
{
|
||||
CMenu muTemp, *pContextMenu;
|
||||
muTemp.LoadMenu(IDR_CONTEXT_MENU);
|
||||
pContextMenu = muTemp.GetSubMenu(0);
|
||||
pContextMenu->TrackPopupMenu(TPM_LEFTALIGN, point.x, point.y, this);
|
||||
}
|
||||
else if( (pWnd->GetSafeHwnd() == m_ctrlLoginIPList.GetSafeHwnd())
|
||||
&& (0 < m_ctrlLoginIPList.GetSelectedCount()) )
|
||||
{
|
||||
CMenu muTemp, *pContextMenu;
|
||||
muTemp.LoadMenu(IDR_CONTEXT_MENU);
|
||||
pContextMenu = muTemp.GetSubMenu(1);
|
||||
pContextMenu->TrackPopupMenu(TPM_LEFTALIGN, point.x, point.y, this);
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnOK()
|
||||
{
|
||||
//CDialog::OnOK();
|
||||
}
|
||||
|
||||
BOOL CBillingTestModuleDlg::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
if( ( WM_KEYDOWN == pMsg->message ) && ( VK_RETURN == pMsg->wParam ) )
|
||||
{
|
||||
if( (GetFocus() == GetDlgItem(IDC_IP_END)->GetFocus()) )
|
||||
{
|
||||
// <09><><EFBFBD>⼭ IP <20>߰<EFBFBD>
|
||||
}
|
||||
}
|
||||
|
||||
return CDialog::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnDisconnectUser()
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD>
|
||||
POSITION pos = m_ctrlCurrentUserList.GetFirstSelectedItemPosition();
|
||||
|
||||
int nPos = m_ctrlCurrentUserList.GetNextSelectedItem(pos);
|
||||
|
||||
int nLength = 0;
|
||||
|
||||
while(-1 != nPos)
|
||||
{
|
||||
HanUnitedBilling::GLTransStruct glTransStruct;
|
||||
memset(&glTransStruct, 0, sizeof(HanUnitedBilling::GLTransStruct));
|
||||
|
||||
nLength = m_ctrlCurrentUserList.GetItemText(nPos, 1, glTransStruct.Data, HanUnitedBilling::MAX_IP_LEN);
|
||||
glTransStruct.Data[nLength] = 0;
|
||||
|
||||
nLength = m_ctrlCurrentUserList.GetItemText(nPos, 0,
|
||||
glTransStruct.Data + HanUnitedBilling::MAX_IP_LEN, HanUnitedBilling::MAX_ID_LEN);
|
||||
|
||||
glTransStruct.Data[nLength + HanUnitedBilling::MAX_IP_LEN] = 0;
|
||||
|
||||
glTransStruct.HeaderMsg = htons(HanUnitedBilling::CUT_IP);
|
||||
|
||||
glTransStruct.DataSize = htons(
|
||||
HanUnitedBilling::MAX_ID_LEN +
|
||||
HanUnitedBilling::MAX_IP_LEN);
|
||||
|
||||
glTransStruct.SeqID = 0;
|
||||
|
||||
theApp.SendPendingAll(glTransStruct);
|
||||
|
||||
nPos = m_ctrlLoginIPList.GetNextSelectedItem(pos);
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnSendMsgUser()
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD>
|
||||
POSITION pos = m_ctrlCurrentUserList.GetFirstSelectedItemPosition();
|
||||
|
||||
int nPos = m_ctrlCurrentUserList.GetNextSelectedItem(pos);
|
||||
|
||||
int nLength = 0;
|
||||
|
||||
while(-1 != nPos)
|
||||
{
|
||||
HanUnitedBilling::GLTransStruct glTransStruct;
|
||||
memset(&glTransStruct, 0, sizeof(HanUnitedBilling::GLTransStruct));
|
||||
|
||||
nLength = m_ctrlCurrentUserList.GetItemText(nPos, 1, glTransStruct.Data, HanUnitedBilling::MAX_IP_LEN);
|
||||
glTransStruct.Data[nLength] = 0;
|
||||
|
||||
nLength = m_ctrlCurrentUserList.GetItemText(nPos, 0,
|
||||
glTransStruct.Data + HanUnitedBilling::MAX_IP_LEN, HanUnitedBilling::MAX_ID_LEN);
|
||||
glTransStruct.Data[nLength + HanUnitedBilling::MAX_IP_LEN] = 0;
|
||||
|
||||
nLength = _sntprintf(glTransStruct.Data + HanUnitedBilling::MAX_IP_LEN + HanUnitedBilling::MAX_ID_LEN,
|
||||
HanUnitedBilling::MAX_MSG_LEN - 1, "<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>༮, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̴<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
glTransStruct.Data[nLength + HanUnitedBilling::MAX_IP_LEN + HanUnitedBilling::MAX_ID_LEN] = 0;
|
||||
|
||||
glTransStruct.HeaderMsg = htons(HanUnitedBilling::WARNNOTICE);
|
||||
|
||||
glTransStruct.DataSize = htons(
|
||||
HanUnitedBilling::MAX_ID_LEN +
|
||||
HanUnitedBilling::MAX_IP_LEN +
|
||||
HanUnitedBilling::MAX_MSG_LEN);
|
||||
|
||||
glTransStruct.SeqID = 0;
|
||||
|
||||
theApp.SendPendingAll(glTransStruct);
|
||||
|
||||
nPos = m_ctrlLoginIPList.GetNextSelectedItem(pos);
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnIpDelete()
|
||||
{
|
||||
// IP <20>뿪 <20><><EFBFBD><EFBFBD>
|
||||
|
||||
POSITION pos = m_ctrlLoginIPList.GetFirstSelectedItemPosition();
|
||||
|
||||
std::vector<int> deletePos;
|
||||
|
||||
int nPos = m_ctrlLoginIPList.GetNextSelectedItem(pos);
|
||||
while(-1 != nPos)
|
||||
{
|
||||
deletePos.push_back(nPos);
|
||||
nPos = m_ctrlLoginIPList.GetNextSelectedItem(pos);
|
||||
}
|
||||
|
||||
std::sort(deletePos.begin(), deletePos.end(), std::greater<int>());
|
||||
|
||||
std::vector<int>::iterator pos_delete = deletePos.begin();
|
||||
std::vector<int>::iterator end_delete = deletePos.end();
|
||||
|
||||
for(; pos_delete != end_delete; ++pos_delete)
|
||||
{
|
||||
m_ctrlLoginIPList.DeleteItem(*pos_delete);
|
||||
}
|
||||
|
||||
SaveAddress();
|
||||
}
|
||||
|
||||
|
||||
void CBillingTestModuleDlg::OnBnClickedIPAdd()
|
||||
{
|
||||
// IP <20>뿪 <20>߰<EFBFBD>
|
||||
if(!m_StartIP.IsBlank() && !m_EndIP.IsBlank())
|
||||
{
|
||||
DWORD dwStartAddress = 0;
|
||||
DWORD dwEndAddress = 0;
|
||||
|
||||
m_StartIP.GetAddress(dwStartAddress);
|
||||
m_EndIP.GetAddress(dwEndAddress);
|
||||
|
||||
std::pair<in_addr, in_addr> addressPair;
|
||||
|
||||
addressPair.first.S_un.S_addr = htonl(dwStartAddress);
|
||||
addressPair.second.S_un.S_addr = htonl(dwEndAddress);
|
||||
|
||||
AddAddress(addressPair.first, addressPair.second);
|
||||
SaveAddress();
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::AddAddress(in_addr addressStart, in_addr addressEnd)
|
||||
{
|
||||
int nMaxCount = m_ctrlLoginIPList.GetItemCount();
|
||||
m_ctrlLoginIPList.InsertItem(nMaxCount, 0);
|
||||
|
||||
m_ctrlLoginIPList.SetItemText(nMaxCount, 0, inet_ntoa(addressStart));
|
||||
m_ctrlLoginIPList.SetItemText(nMaxCount, 1, inet_ntoa(addressEnd));
|
||||
}
|
||||
|
||||
|
||||
const TCHAR* g_szBillingAddress = "BillingAddress.txt";
|
||||
|
||||
void CBillingTestModuleDlg::SaveAddress()
|
||||
{
|
||||
FILE* file = fopen(g_szBillingAddress, "wt");
|
||||
|
||||
if(0 != file)
|
||||
{
|
||||
int nMaxCount = m_ctrlLoginIPList.GetItemCount();
|
||||
for(int nCount = 0; nCount < nMaxCount; ++nCount)
|
||||
{
|
||||
fprintf(file, "%s\t%s\n",
|
||||
m_ctrlLoginIPList.GetItemText(nCount, 0),
|
||||
m_ctrlLoginIPList.GetItemText(nCount, 1));
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::LoadAddress()
|
||||
{
|
||||
FILE* file = fopen(g_szBillingAddress, "rt");
|
||||
|
||||
if(0 != file)
|
||||
{
|
||||
const int MAX_BUFFER = 4096;
|
||||
char szBuffer[MAX_BUFFER];
|
||||
|
||||
char szIPStart[MAX_BUFFER];
|
||||
char szIPEnd[MAX_BUFFER];
|
||||
|
||||
in_addr addrStart;
|
||||
in_addr addrEnd;
|
||||
|
||||
while(fgets(szBuffer, MAX_BUFFER - 1, file))
|
||||
{
|
||||
szBuffer[MAX_BUFFER - 1] = 0;
|
||||
|
||||
if(EOF != sscanf(szBuffer, "%s\t%s\n", szIPStart, szIPEnd))
|
||||
{
|
||||
addrStart.S_un.S_addr = inet_addr(szIPStart);
|
||||
addrEnd.S_un.S_addr = inet_addr(szIPEnd);
|
||||
|
||||
AddAddress(addrStart, addrEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CBillingTestModuleDlg::OnBnClickedSaveLog()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
const int MAX_LOG_LINE = 4096;
|
||||
TCHAR szLogText[MAX_LOG_LINE];
|
||||
|
||||
const char* szLogFileName = "HanUnitedBillingLog.log";
|
||||
|
||||
FILE* file = fopen(szLogFileName, "at");
|
||||
if(0 != file)
|
||||
{
|
||||
int nMAXCount = m_BillingLog.GetItemCount();
|
||||
for(int nCount = 0; nCount < nMAXCount; ++nCount)
|
||||
{
|
||||
int nLength = m_BillingLog.GetItemText(nCount, 0, szLogText, MAX_LOG_LINE - 1);
|
||||
|
||||
if(0 < nLength && nLength < MAX_LOG_LINE)
|
||||
{
|
||||
szLogText[nLength] = 0;
|
||||
fprintf(file, "%s\n", szLogText);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
m_BillingLog.DeleteAllItems();
|
||||
AfxMessageBox("<EFBFBD>α<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.");
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnBnClickedClearLog()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
m_BillingLog.DeleteAllItems();
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::AddLog(DlgLogType eDlgLogType, const TCHAR* szFormat, ...)
|
||||
{
|
||||
const int MAX_LOG_LINE = 4096;
|
||||
TCHAR szLogText[MAX_LOG_LINE];
|
||||
|
||||
SYSTEMTIME sysTime;
|
||||
GetLocalTime(&sysTime);
|
||||
|
||||
const TCHAR* szLogType = _T("UNK");
|
||||
|
||||
switch(eDlgLogType)
|
||||
{
|
||||
case NORMAL_LOG: szLogType = _T("NOR"); break;
|
||||
case ERROR_LOG: szLogType = _T("ERR"); break;
|
||||
}
|
||||
|
||||
int nTotalLength = _sntprintf(szLogText, MAX_LOG_LINE - 1, _T("[%s][%04d-%02d-%02d %02d:%02d:%02d] "),
|
||||
szLogType, sysTime.wYear, sysTime.wMonth, sysTime.wDay, sysTime.wHour, sysTime.wMinute, sysTime.wSecond);
|
||||
|
||||
va_list arglist;
|
||||
va_start(arglist, szFormat);
|
||||
|
||||
int nLength = _vsntprintf(szLogText + nTotalLength,
|
||||
MAX_LOG_LINE - nTotalLength - 1, szFormat, arglist);
|
||||
|
||||
va_end(arglist);
|
||||
|
||||
if(0 < nLength && nTotalLength + nLength < MAX_LOG_LINE)
|
||||
{
|
||||
nTotalLength += nLength;
|
||||
szLogText[nTotalLength] = 0;
|
||||
|
||||
m_BillingLog.InsertItem(m_BillingLog.GetItemCount(), szLogText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool CBillingTestModuleDlg::Login(CBillingAsyncSocket& billingAsyncSocket,
|
||||
unsigned long dwSeqID, const char* szID, const char* szIP)
|
||||
{
|
||||
HanUnitedBilling::GLTransStruct glTransStruct;
|
||||
memset(&glTransStruct, 0, sizeof(HanUnitedBilling::GLTransStruct));
|
||||
|
||||
unsigned short usSuccess = 0;
|
||||
|
||||
switch(GetLoginAckType())
|
||||
{
|
||||
case SUCCESS_ALL_PROCESS:
|
||||
usSuccess = 1;
|
||||
AddLog(NORMAL_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", szID, szIP, dwSeqID);
|
||||
break;
|
||||
|
||||
case FAIL_ALL_PROCESS:
|
||||
usSuccess = 0;
|
||||
AddLog(NORMAL_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", szID, szIP, dwSeqID);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
if(-1 != FindCurrentUserPos(szID, szIP))
|
||||
{
|
||||
usSuccess = 0;
|
||||
AddLog(ERROR_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD>(<28>ߺ<EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD>)", szID, szIP, dwSeqID);
|
||||
}
|
||||
else if(!CheckIPList(szIP))
|
||||
{
|
||||
usSuccess = 0;
|
||||
AddLog(ERROR_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD>(IP<49><50><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD>)", szID, szIP, dwSeqID);
|
||||
}
|
||||
else
|
||||
{
|
||||
usSuccess = 1;
|
||||
AddLog(NORMAL_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD>", szID, szIP, dwSeqID);
|
||||
|
||||
int nCount = m_ctrlCurrentUserList.GetItemCount();
|
||||
|
||||
m_ctrlCurrentUserList.InsertItem(nCount, "");
|
||||
m_ctrlCurrentUserList.SetItemText(nCount, 0, szID);
|
||||
m_ctrlCurrentUserList.SetItemText(nCount, 1, szIP);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
glTransStruct.HeaderMsg = htons(HanUnitedBilling::AUTH_RESULT);
|
||||
|
||||
glTransStruct.DataSize = htons(
|
||||
HanUnitedBilling::MAX_ID_LEN +
|
||||
HanUnitedBilling::MAX_IP_LEN +
|
||||
sizeof(unsigned short));
|
||||
|
||||
glTransStruct.SeqID = htonl(dwSeqID);
|
||||
|
||||
_snprintf(glTransStruct.Data, HanUnitedBilling::MAX_IP_LEN, "%s", szIP);
|
||||
_snprintf(glTransStruct.Data + HanUnitedBilling::MAX_IP_LEN, HanUnitedBilling::MAX_ID_LEN, "%s", szID);
|
||||
|
||||
usSuccess = htons(usSuccess);
|
||||
memcpy(glTransStruct.Data + HanUnitedBilling::MAX_IP_LEN + HanUnitedBilling::MAX_ID_LEN,
|
||||
&usSuccess, sizeof(unsigned short));
|
||||
|
||||
billingAsyncSocket.SendPending(glTransStruct);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CBillingTestModuleDlg::Logout(CBillingAsyncSocket& billingAsyncSocket,
|
||||
unsigned long dwSeqID, const char* szID, const char* szIP)
|
||||
{
|
||||
int nPos = FindCurrentUserPos(szID, szIP);
|
||||
if(-1 != nPos)
|
||||
{
|
||||
m_ctrlCurrentUserList.DeleteItem(nPos);
|
||||
|
||||
AddLog(NORMAL_LOG, "ID:%s/IP:%s/<2F><><EFBFBD><EFBFBD> <20>αƿ<D7BE> ó<><C3B3> <20><><EFBFBD><EFBFBD>", szID, szIP);
|
||||
return true;
|
||||
}
|
||||
|
||||
AddLog(ERROR_LOG, "ID:%s/IP:%s/<2F><><EFBFBD><EFBFBD> <20>αƿ<D7BE> ó<><C3B3> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.", szID, szIP);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool CBillingTestModuleDlg::BillAuth(CBillingAsyncSocket& billingAsyncSocket,
|
||||
unsigned long dwSeqID, const char* szID, const char* szIP)
|
||||
{
|
||||
HanUnitedBilling::GLTransStruct glTransStruct;
|
||||
memset(&glTransStruct, 0, sizeof(HanUnitedBilling::GLTransStruct));
|
||||
|
||||
unsigned short usSuccess = 0;
|
||||
|
||||
switch(GetLoginAckType())
|
||||
{
|
||||
case SUCCESS_ALL_PROCESS:
|
||||
usSuccess = 1;
|
||||
AddLog(NORMAL_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", szID, szIP, dwSeqID);
|
||||
break;
|
||||
|
||||
case FAIL_ALL_PROCESS:
|
||||
usSuccess = 0;
|
||||
AddLog(NORMAL_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", szID, szIP, dwSeqID);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
if(-1 != FindCurrentUserPos(szID, szIP))
|
||||
{
|
||||
usSuccess = 0;
|
||||
AddLog(ERROR_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ұ<EFBFBD><D2B0><EFBFBD> (<28>ߺ<EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD>)", szID, szIP, dwSeqID);
|
||||
}
|
||||
else if(!CheckIPList(szIP))
|
||||
{
|
||||
usSuccess = 0;
|
||||
AddLog(ERROR_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ұ<EFBFBD><D2B0><EFBFBD> (<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)", szID, szIP, dwSeqID);
|
||||
}
|
||||
else
|
||||
{
|
||||
usSuccess = 1;
|
||||
AddLog(NORMAL_LOG, "ID:%s/IP:%s/SeqID:%u/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>", szID, szIP, dwSeqID);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
glTransStruct.HeaderMsg = htons(HanUnitedBilling::BILL_AUTH_RESULT);
|
||||
|
||||
glTransStruct.DataSize = htons(
|
||||
HanUnitedBilling::MAX_ID_LEN +
|
||||
HanUnitedBilling::MAX_IP_LEN +
|
||||
sizeof(unsigned short));
|
||||
|
||||
glTransStruct.SeqID = htonl(dwSeqID);
|
||||
|
||||
_snprintf(glTransStruct.Data, HanUnitedBilling::MAX_IP_LEN, "%s", szIP);
|
||||
_snprintf(glTransStruct.Data + HanUnitedBilling::MAX_IP_LEN, HanUnitedBilling::MAX_ID_LEN, "%s", szID);
|
||||
|
||||
usSuccess = htons(usSuccess);
|
||||
memcpy(glTransStruct.Data + HanUnitedBilling::MAX_IP_LEN + HanUnitedBilling::MAX_ID_LEN,
|
||||
&usSuccess, sizeof(unsigned short));
|
||||
|
||||
billingAsyncSocket.SendPending(glTransStruct);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int CBillingTestModuleDlg::FindCurrentUserPos(const char* szID, const char* szIP)
|
||||
{
|
||||
int nMaxCount = m_ctrlCurrentUserList.GetItemCount();
|
||||
|
||||
TCHAR szUserID[HanUnitedBilling::MAX_ID_LEN + 1];
|
||||
TCHAR szUserIP[HanUnitedBilling::MAX_IP_LEN + 1];
|
||||
|
||||
int nLength = 0;
|
||||
|
||||
for(int nCount = 0; nCount < nMaxCount; ++nCount)
|
||||
{
|
||||
nLength = m_ctrlCurrentUserList.GetItemText(nCount, 0,
|
||||
szUserID, HanUnitedBilling::MAX_ID_LEN);
|
||||
|
||||
szUserID[nLength] = 0;
|
||||
|
||||
nLength = m_ctrlCurrentUserList.GetItemText(nCount, 1,
|
||||
szUserIP, HanUnitedBilling::MAX_IP_LEN);
|
||||
|
||||
szUserIP[nLength] = 0;
|
||||
|
||||
if(0 == _tcsncmp(szID, szUserID, HanUnitedBilling::MAX_ID_LEN)
|
||||
&& 0 == _tcsncmp(szIP, szUserIP, HanUnitedBilling::MAX_IP_LEN))
|
||||
{
|
||||
return nCount;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool CBillingTestModuleDlg::CheckIPList(const char* szIP)
|
||||
{
|
||||
in_addr address;
|
||||
address.S_un.S_addr = inet_addr(szIP);
|
||||
|
||||
char szIPStart[HanUnitedBilling::MAX_IP_LEN + 1];
|
||||
char szIPEnd[HanUnitedBilling::MAX_IP_LEN + 1];
|
||||
|
||||
in_addr addr_start;
|
||||
in_addr addr_end;
|
||||
|
||||
int nLength = 0;
|
||||
|
||||
int nMaxCount = m_ctrlLoginIPList.GetItemCount();
|
||||
for(int nCount = 0; nCount < nMaxCount; ++nCount)
|
||||
{
|
||||
nLength = m_ctrlLoginIPList.GetItemText(nCount, 0, szIPStart, HanUnitedBilling::MAX_IP_LEN);
|
||||
szIPStart[nLength] = 0;
|
||||
|
||||
nLength = m_ctrlLoginIPList.GetItemText(nCount, 1, szIPEnd, HanUnitedBilling::MAX_IP_LEN);
|
||||
szIPEnd[nLength] = 0;
|
||||
|
||||
addr_start.S_un.S_addr = inet_addr(szIPStart);
|
||||
addr_end.S_un.S_addr = inet_addr(szIPEnd);
|
||||
|
||||
if(addr_start.S_un.S_un_b.s_b1 <= address.S_un.S_un_b.s_b1 &&
|
||||
address.S_un.S_un_b.s_b1 <= addr_end.S_un.S_un_b.s_b1 &&
|
||||
|
||||
addr_start.S_un.S_un_b.s_b2 <= address.S_un.S_un_b.s_b2 &&
|
||||
address.S_un.S_un_b.s_b2 <= addr_end.S_un.S_un_b.s_b2 &&
|
||||
|
||||
addr_start.S_un.S_un_b.s_b3 <= address.S_un.S_un_b.s_b3 &&
|
||||
address.S_un.S_un_b.s_b3 <= addr_end.S_un.S_un_b.s_b3 &&
|
||||
|
||||
addr_start.S_un.S_un_b.s_b3 <= address.S_un.S_un_b.s_b3 &&
|
||||
address.S_un.S_un_b.s_b3 <= addr_end.S_un.S_un_b.s_b3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
void CBillingTestModuleDlg::OnTimer(UINT nIDEvent)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻<EFBFBD><E2BABB><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
if(nIDEvent == ID_PROCESS_PACKET_TIMER)
|
||||
{
|
||||
theApp.ProcessPacket();
|
||||
|
||||
size_t nSocketNum = theApp.GetConnectedSocketNum();
|
||||
|
||||
if(m_nSocketNum != nSocketNum)
|
||||
{
|
||||
CString windowName;
|
||||
windowName.Format("BillingTestModule : Port(%u) - %d Connection now.",
|
||||
CBillingTestModuleApp::LISTEN_PORT, nSocketNum);
|
||||
SetWindowText(windowName);
|
||||
|
||||
m_nSocketNum = nSocketNum;
|
||||
}
|
||||
}
|
||||
|
||||
CDialog::OnTimer(nIDEvent);
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnDestroy()
|
||||
{
|
||||
CDialog::OnDestroy();
|
||||
|
||||
// TODO: <20><><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
KillTimer(ID_PROCESS_PACKET_TIMER);
|
||||
theApp.ResetMainDlg(*this);
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnCbnSelchangeLoginAckType()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
if(DELAY_ALL_PROCESS != GetLoginAckType())
|
||||
{
|
||||
m_LoginAckDelayDlg.SetReadOnly();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_LoginAckDelayDlg.SetReadOnly(false);
|
||||
}
|
||||
}
|
||||
|
||||
void CBillingTestModuleDlg::OnCbnSelchangeBillAuthAckType()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
if(DELAY_ALL_PROCESS != GetBillAuthAckType())
|
||||
{
|
||||
m_BillAuthAckDelayDlg.SetReadOnly();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_BillAuthAckDelayDlg.SetReadOnly(false);
|
||||
}
|
||||
}
|
||||
111
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModuleDlg.h
Normal file
111
Server/Billing/한게임 통합빌링 테스트모듈/BillingTestModuleDlg.h
Normal file
@@ -0,0 +1,111 @@
|
||||
// BillingTestModuleDlg.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include "afxcmn.h"
|
||||
#include "afxwin.h"
|
||||
|
||||
#include <winsock2.h>
|
||||
|
||||
#include <list>
|
||||
#include <utility>
|
||||
#include "BillingAsyncSocket.h"
|
||||
|
||||
// forward decl.
|
||||
class CBillingAsyncSocket;
|
||||
|
||||
|
||||
enum DlgLogType
|
||||
{
|
||||
NORMAL_LOG,
|
||||
ERROR_LOG
|
||||
};
|
||||
|
||||
// CBillingTestModuleDlg <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
class CBillingTestModuleDlg : public CDialog
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
public:
|
||||
CBillingTestModuleDlg(CWnd* pParent = NULL); // ǥ<><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
enum { IDD = IDD_BILLINGTESTMODULE_DIALOG };
|
||||
|
||||
enum Behavior
|
||||
{
|
||||
NORMAL_PROCESS = 0,
|
||||
SUCCESS_ALL_PROCESS = 1,
|
||||
FAIL_ALL_PROCESS = 2,
|
||||
DELAY_ALL_PROCESS = 3,
|
||||
DROP_ALL_PROCESS = 4
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
HICON m_hIcon;
|
||||
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD>
|
||||
virtual void OnOK();
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
||||
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
|
||||
|
||||
private:
|
||||
|
||||
void AddAddress(in_addr addressStart, in_addr addressEnd);
|
||||
void SaveAddress();
|
||||
void LoadAddress();
|
||||
|
||||
int FindCurrentUserPos(const char* szID, const char* szIP);
|
||||
bool CheckIPList(const char* szIP);
|
||||
|
||||
CListCtrl m_ctrlCurrentUserList;
|
||||
CListCtrl m_ctrlLoginIPList;
|
||||
CListCtrl m_BillingLog;
|
||||
|
||||
CIPAddressCtrl m_StartIP;
|
||||
CIPAddressCtrl m_EndIP;
|
||||
|
||||
CComboBox m_LoginAckType;
|
||||
CComboBox m_BillAuthAckType;
|
||||
|
||||
DWORD m_LoginAckDelay;
|
||||
DWORD m_BillAuthAckDelay;
|
||||
|
||||
CEdit m_LoginAckDelayDlg;
|
||||
CEdit m_BillAuthAckDelayDlg;
|
||||
|
||||
size_t m_nSocketNum;
|
||||
|
||||
public:
|
||||
|
||||
void AddLog(DlgLogType eLogType, const TCHAR* szFormat, ...);
|
||||
|
||||
bool Login(CBillingAsyncSocket& billingAsyncSocket, unsigned long dwSeqID, const char* szID, const char* szIP);
|
||||
bool Logout(CBillingAsyncSocket& billingAsyncSocket, unsigned long dwSeqID, const char* szID, const char* szIP);
|
||||
bool BillAuth(CBillingAsyncSocket& billingAsyncSocket, unsigned long dwSeqID, const char* szID, const char* szIP);
|
||||
|
||||
Behavior GetLoginAckType() { return static_cast<Behavior>(m_LoginAckType.GetCurSel()); }
|
||||
Behavior GetBillAuthAckType() { return static_cast<Behavior>(m_BillAuthAckType.GetCurSel()); }
|
||||
|
||||
DWORD GetLoginAckDelay() { UpdateData(true); return m_LoginAckDelay; }
|
||||
DWORD GetBillAuthAckDelay() { UpdateData(true); return m_BillAuthAckDelay; }
|
||||
|
||||
afx_msg void OnDisconnectUser();
|
||||
afx_msg void OnSendMsgUser();
|
||||
afx_msg void OnIpDelete();
|
||||
afx_msg void OnBnClickedIPAdd();
|
||||
afx_msg void OnBnClickedSaveLog();
|
||||
afx_msg void OnBnClickedClearLog();
|
||||
|
||||
afx_msg void OnTimer(UINT nIDEvent);
|
||||
afx_msg void OnDestroy();
|
||||
afx_msg void OnCbnSelchangeLoginAckType();
|
||||
afx_msg void OnCbnSelchangeBillAuthAckType();
|
||||
};
|
||||
41
Server/Billing/한게임 통합빌링 테스트모듈/HanUnitedBillingPacket.h
Normal file
41
Server/Billing/한게임 통합빌링 테스트모듈/HanUnitedBillingPacket.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef _HAN_UNITED_BILLING_PACKET_STRUCT_
|
||||
#define _HAN_UNITED_BILLING_PACKET_STRUCT_
|
||||
|
||||
/********** LK->UID,UID->LK <20>ۼ<EFBFBD><DBBC>ſ<EFBFBD> <20><><EFBFBD><EFBFBD>ü *************************/
|
||||
|
||||
namespace HanUnitedBilling
|
||||
{
|
||||
#pragma pack(1)
|
||||
|
||||
struct GLTransStruct
|
||||
{
|
||||
unsigned short DataSize; // Data <20><> <20><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>
|
||||
unsigned short HeaderMsg; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɸ<C9B8><DEBC><EFBFBD><EFBFBD>κкκ<D0BA>
|
||||
unsigned long SeqID;
|
||||
char Data[120]; //Data
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
//LK->UID , UID->LK <20><EFBFBD><DEBC><EFBFBD>
|
||||
enum CMD
|
||||
{
|
||||
AUTH = 4000, // UID -> LK
|
||||
LOGOUT = 4001, // UID -> LK
|
||||
CUT_IP = 4002, // LK -> UID
|
||||
WARNNOTICE = 4003, // LK -> UID
|
||||
BILL_AUTH = 4004, // UID -> LK
|
||||
AUTH_RESULT = 4005, // LK -> UID
|
||||
BILL_AUTH_RESULT = 4006 // LK -> UID
|
||||
};
|
||||
|
||||
enum LENGTH
|
||||
{
|
||||
MAX_IP_LEN = 17,
|
||||
MAX_ID_LEN = 25,
|
||||
MAX_OUT_TIME_LEN = 18,
|
||||
MAX_MSG_LEN = 70
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
77
Server/Billing/한게임 통합빌링 테스트모듈/ReadMe.txt
Normal file
77
Server/Billing/한게임 통합빌링 테스트모듈/ReadMe.txt
Normal file
@@ -0,0 +1,77 @@
|
||||
================================================================================
|
||||
MFC <20><><EFBFBD>̺귯<CCBA><EAB7AF> : BillingTestModule <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
================================================================================
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> BillingTestModule <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. <20><> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>α<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⺻<EFBFBD><E2BABB><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>ۼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
<EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> BillingTestModule <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>䰡 <20><><EFBFBD>ԵǾ<D4B5>
|
||||
<EFBFBD>ֽ<EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
BillingTestModule.vcproj
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>,
|
||||
<20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
BillingTestModule.h
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>õ<EFBFBD> Resource.h<><68> <20><><EFBFBD><EFBFBD>
|
||||
Ư<><C6AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǸ<D4B5> CBillingTestModuleApp <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
BillingTestModule.cpp
|
||||
CBillingTestModuleApp <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
BillingTestModule.rc
|
||||
<20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> Microsoft Windows <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> RES <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>Ʈ<EFBFBD><C6AE> <20><> Ŀ<><C4BF><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǸ<D4B5>
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
<20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> 1042<34><32> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
res\BillingTestModule.ico
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> BillingTestModule.rc<72><63> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
res\BillingTestModule.rc2
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD>Ե<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>ԵǾ<D4B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȭ <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
BillingTestModuleDlg.h, BillingTestModuleDlg.cpp - <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
CBillingTestModuleDlg Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD>
|
||||
<20><> <20><>ȭ <20><><EFBFBD>ڿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ǵ˴ϴ<CBB4>. <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD> BillingTestModule.rc<72><63>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
ActiveX <20><>Ʈ<EFBFBD><C6AE>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> ActiveX <20><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ ǥ<><C7A5> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
<20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(PCH) BillingTestModule.pch <20><> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> StdAfx.obj<62><6A> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
Resource.h
|
||||
<20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD>ҽ<EFBFBD> ID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>а<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>մϴ<D5B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1><EFBFBD><EFBFBD> "TODO:"<22><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
|
||||
<EFBFBD>ҽ<EFBFBD> <20>ڵ带 <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> DLL<4C><4C> MFC<46><43> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD> <20> ü<><C3BC><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> Microsoft Visual C++ CD-ROM<4F><4D> Win\System <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD> <20>ִ<EFBFBD>
|
||||
<EFBFBD>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> MFC70XXX.DLL<4C><4C> <20><>ǻ<EFBFBD><C7BB><EFBFBD><EFBFBD> system <20>Ǵ<EFBFBD> system32 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> MFCLOC.DLL<4C><4C> <20≯<EFBFBD><CCB8><EFBFBD> <20>ٲپ<D9B2><D9BE><EFBFBD> <20>մϴ<D5B4>. "XXX"<22><> <20>ش<EFBFBD> <20><><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> MFC70DEU.DLL<4C><4C><EFBFBD><EFBFBD> <20><><EFBFBD>Ͼ<EFBFBD><CFBE><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
<EFBFBD>̷<EFBFBD> <20>۾<EFBFBD><DBBE><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>Ϻ<EFBFBD> UI <20><><EFBFBD>Ұ<EFBFBD> <20> ü<><C3BC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD> <20>˴ϴ<CBB4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
BIN
Server/Billing/한게임 통합빌링 테스트모듈/res/BillingTestModule.ico
Normal file
BIN
Server/Billing/한게임 통합빌링 테스트모듈/res/BillingTestModule.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
22
Server/Billing/한게임 통합빌링 테스트모듈/res/BillingTestModule.manifest
Normal file
22
Server/Billing/한게임 통합빌링 테스트모듈/res/BillingTestModule.manifest
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="Microsoft.Windows.BillingTestModule"
|
||||
type="win32"
|
||||
/>
|
||||
<description>여기에 응용 프로그램 설명을 추가합니다.</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
13
Server/Billing/한게임 통합빌링 테스트모듈/res/BillingTestModule.rc2
Normal file
13
Server/Billing/한게임 통합빌링 테스트모듈/res/BillingTestModule.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// BillingTestModule.RC2 - resources Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
37
Server/Billing/한게임 통합빌링 테스트모듈/resource.h
Normal file
37
Server/Billing/한게임 통합빌링 테스트모듈/resource.h
Normal file
@@ -0,0 +1,37 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by BillingTestModule.rc
|
||||
//
|
||||
#define IDM_ABOUTBOX 0x0010
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDS_ABOUTBOX 101
|
||||
#define IDD_BILLINGTESTMODULE_DIALOG 102
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDR_CONTEXT_MENU 129
|
||||
#define IDC_CURRENT_USER_LIST 1000
|
||||
#define IDC_LOGIN_IP_LIST 1001
|
||||
#define IDC_IP_START 1003
|
||||
#define IDC_IP_END 1004
|
||||
#define IDC_IP_ADD 1005
|
||||
#define IDC_LOGIN_ACK_TYPE 1006
|
||||
#define IDC_LOGIN_ACK_DELAY 1007
|
||||
#define IDC_BILL_AUTH_ACK_TYPE 1008
|
||||
#define IDC_BILL_AUTH_ACK_DELAY 1009
|
||||
#define IDC_BUTTON1 1010
|
||||
#define IDC_SAVELOG 1010
|
||||
#define IDC_LOG_LIST 1012
|
||||
#define IDC_CLEARLOG 1013
|
||||
#define ID_DISCONNECT_USER 32774
|
||||
#define ID_SEND_MSG_USER 32775
|
||||
#define ID_IP_DELETE 32776
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 130
|
||||
#define _APS_NEXT_COMMAND_VALUE 32777
|
||||
#define _APS_NEXT_CONTROL_VALUE 1014
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
7
Server/Billing/한게임 통합빌링 테스트모듈/stdafx.cpp
Normal file
7
Server/Billing/한게임 통합빌링 테스트모듈/stdafx.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// BillingTestModule.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
43
Server/Billing/한게임 통합빌링 테스트모듈/stdafx.h
Normal file
43
Server/Billing/한게임 통합빌링 테스트모듈/stdafx.h
Normal file
@@ -0,0 +1,43 @@
|
||||
// stdafx.h : <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>
|
||||
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Windows <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ܽ<EFBFBD>ŵ<EFBFBD>ϴ<EFBFBD>.
|
||||
#endif
|
||||
|
||||
// <20>Ʒ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>켱<EFBFBD>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ǹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// <20>ٸ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MSDN<44><4E> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#ifndef WINVER // Windows 95 <20><> Windows NT 4 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define WINVER 0x0400 // Windows 98<39><38> Windows 2000 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Windows NT 4 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINNT 0x0400 // Windows 98<39><38> Windows 2000 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Windows 98 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINDOWS 0x0410 // Windows Me <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // IE 4.0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_IE 0x0400 // IE 5.0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // <20>Ϻ<EFBFBD> CString <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
// MFC<46><43> <20><><EFBFBD><EFBFBD> <20>κа<CEBA> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⸦ <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC <20>ٽ<EFBFBD> <20><> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
#include <afxext.h> // MFC <20>ͽ<EFBFBD><CDBD>ټ<EFBFBD>
|
||||
#include <afxdisp.h> // MFC <20>ڵ<EFBFBD>ȭ Ŭ<><C5AC><EFBFBD><EFBFBD>
|
||||
|
||||
#include <afxdtctl.h> // Internet Explorer 4 <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD>
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // Windows <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD>
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxsock.h>
|
||||
|
||||
Reference in New Issue
Block a user