LosaDev source snapshot 2019
This commit is contained in:
commit
c198676e97
20588 files changed
+8812878
No files matched your search
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IniLibMultiThreadTest", "IniLibMultiThreadTest\IniLibMultiThreadTest.vcxproj", "{61CA3213-4209-43C7-BDCD-FD4899DE0EBD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{61CA3213-4209-43C7-BDCD-FD4899DE0EBD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{61CA3213-4209-43C7-BDCD-FD4899DE0EBD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{61CA3213-4209-43C7-BDCD-FD4899DE0EBD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{61CA3213-4209-43C7-BDCD-FD4899DE0EBD}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,22 @@
|
||||
// IniLibMultiThreadTest.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
const int count = 10;
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
ioINITestThread* testThread = new ioINITestThread[ count ];
|
||||
|
||||
for(int i = 0; i < count; i++)
|
||||
{
|
||||
testThread[i].Begin();
|
||||
}
|
||||
|
||||
cout << "end..." << endl;
|
||||
cin.ignore();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{61CA3213-4209-43C7-BDCD-FD4899DE0EBD}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>IniLibMultiThreadTest</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ioINITestThread.h" />
|
||||
<ClInclude Include="ioThread.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="IniLibMultiThreadTest.cpp" />
|
||||
<ClCompile Include="ioINITestThread.cpp" />
|
||||
<ClCompile Include="ioThread.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="소스 파일">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="헤더 파일">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="리소스 파일">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ioThread.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ioINITestThread.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="IniLibMultiThreadTest.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ioThread.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ioINITestThread.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,38 @@
|
||||
========================================================================
|
||||
콘솔 응용 프로그램 : IniLibMultiThreadTest 프로젝트 개요
|
||||
========================================================================
|
||||
|
||||
응용 프로그램 마법사에서 이 IniLibMultiThreadTest 응용 프로그램을 만들었습니다.
|
||||
|
||||
IniLibMultiThreadTest 응용 프로그램을 구성하는 각 파일에 대한
|
||||
요약 설명이 포함되어 있습니다.
|
||||
|
||||
|
||||
IniLibMultiThreadTest.vcxproj
|
||||
응용 프로그램 마법사를 사용하여 생성한 VC++ 프로젝트의 기본 프로젝트 파일입니다.
|
||||
파일을 생성한 Visual C++ 버전에 대한 정보와 응용 프로그램 마법사를 사용하여 선택한 플랫폼,
|
||||
구성 및 프로젝트 기능에 대한 정보가 포함되어 있습니다.
|
||||
|
||||
IniLibMultiThreadTest.vcxproj.filters
|
||||
응용 프로그램 마법사를 사용하여 생성된 VC++ 프로젝트의 필터 파일입니다.
|
||||
이 파일에는 프로젝트의 파일과 필터 간의 연결 정보가 들어 있습니다.
|
||||
이러한 연결은 특정 노드에서 유사한 확장명으로 그룹화된 파일을 표시하기 위해 IDE에서
|
||||
사용됩니다. 예를 들어 ".cpp" 파일은 "소스 파일" 필터와 연결되어 있습니다.
|
||||
|
||||
IniLibMultiThreadTest.cpp
|
||||
기본 응용 프로그램 소스 파일입니다.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
기타 표준 파일:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
이 파일은 미리 컴파일된 헤더(PCH) 파일 IniLibMultiThreadTest.pch와
|
||||
미리 컴파일된 형식(PCT) 파일 StdAfx.obj를 빌드하는 데 사용됩니다.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
기타 참고:
|
||||
|
||||
응용 프로그램 마법사에서 사용하는 "TODO:" 주석은 사용자가 추가하거나 사용자 지정해야 하는
|
||||
소스 코드 부분을 나타냅니다.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
+164140
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,192 @@
|
||||
#include "StdAfx.h"
|
||||
#include "ioINITestThread.h"
|
||||
|
||||
|
||||
ioINITestThread::ioINITestThread(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ioINITestThread::~ioINITestThread(void)
|
||||
{
|
||||
}
|
||||
|
||||
void ioINITestThread::Run()
|
||||
{
|
||||
DWORD time = GetTickCount();
|
||||
|
||||
int value = 0;
|
||||
int temp[ 65535 ] = { 0, };
|
||||
|
||||
// 게임서버 ini파일 로드
|
||||
ioINILoader kLoader;
|
||||
if( kLoader.LoadFile( "config/sp2_monster_treasure_card.ini" ) == false )
|
||||
//if( kLoader.LoadFile( "config/test.ini" ) == false )
|
||||
{
|
||||
cout << "Ini File Read Error... ThreadID : " << GetCurrentThreadId() << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "success.. " << endl;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
char szKey[MAX_PATH], szBuf[MAX_PATH];
|
||||
kLoader.SetTitle( "common" );
|
||||
|
||||
// 선물 리스트
|
||||
int iMaxTable = kLoader.LoadInt( "max_table", 0 );
|
||||
for(i = 0;i < iMaxTable;i++)
|
||||
{
|
||||
sprintf_s( szKey, "table%d", i + 1 );
|
||||
kLoader.SetTitle( szKey );
|
||||
|
||||
// 공용
|
||||
kLoader.LoadString( "present_name", "", szBuf, MAX_PATH );
|
||||
|
||||
temp[ value++ ] = kLoader.LoadInt( "present_state", 0 );
|
||||
temp[ value++ ] = kLoader.LoadInt( "present_ment", 0 );
|
||||
temp[ value++ ] = kLoader.LoadInt( "present_period", 0 );
|
||||
|
||||
int iMaxPresent = kLoader.LoadInt( "max_present", 0 );
|
||||
for(int k = 0;k < iMaxPresent;k++)
|
||||
{
|
||||
sprintf_s( szKey, "present%d_rand", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "present%d_type", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "present%d_value1", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "present%d_value2", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
// 장비 선물의 기간+강화값 랜덤 리스트
|
||||
kLoader.SetTitle( "common" );
|
||||
iMaxTable = kLoader.LoadInt( "max_extraitem_rand_table", 0 );
|
||||
for(i = 0;i < iMaxTable;i++)
|
||||
{
|
||||
sprintf_s( szKey, "extraitem_rand_table%d", i + 1 );
|
||||
kLoader.SetTitle( szKey );
|
||||
|
||||
int k = 0;
|
||||
int iMaxLimitDate = kLoader.LoadInt( "max_limit_date", 0 );
|
||||
for(k = 0;k < iMaxLimitDate;k++)
|
||||
{
|
||||
sprintf_s( szKey, "limit_date%d_rand", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "limit_date%d_value", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
}
|
||||
|
||||
int iMaxReinforceDate = kLoader.LoadInt( "max_reinforce", 0 );
|
||||
for(k = 0;k < iMaxReinforceDate;k++)
|
||||
{
|
||||
sprintf_s( szKey, "reinforce%d_rand", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "reinforce%d_value", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
cout << "ThreadID : " << GetCurrentThreadId() << " ";
|
||||
cout << "sp2_monster_treasure_card result : " << GetTickCount() - time << endl;
|
||||
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
void ioINITestThread::Test()
|
||||
{
|
||||
DWORD time = GetTickCount();
|
||||
|
||||
int value = 0;
|
||||
int temp[ 65535 ] = { 0, };
|
||||
|
||||
// 게임서버 ini파일 로드
|
||||
ioINILoader kLoader;
|
||||
if( kLoader.LoadFile( "config/sp2_monster_treasure_card.ini" ) == false )
|
||||
//if( kLoader.LoadFile( "config/test.ini" ) == false )
|
||||
{
|
||||
cout << "Ini File Read Error... ThreadID : " << GetCurrentThreadId() << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "success.. " << endl;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
char szKey[MAX_PATH], szBuf[MAX_PATH];
|
||||
kLoader.SetTitle( "common" );
|
||||
|
||||
// 선물 리스트
|
||||
int iMaxTable = kLoader.LoadInt( "max_table", 0 );
|
||||
for(i = 0;i < iMaxTable;i++)
|
||||
{
|
||||
sprintf_s( szKey, "table%d", i + 1 );
|
||||
kLoader.SetTitle( szKey );
|
||||
|
||||
// 공용
|
||||
kLoader.LoadString( "present_name", "", szBuf, MAX_PATH );
|
||||
|
||||
temp[ value++ ] = kLoader.LoadInt( "present_state", 0 );
|
||||
temp[ value++ ] = kLoader.LoadInt( "present_ment", 0 );
|
||||
temp[ value++ ] = kLoader.LoadInt( "present_period", 0 );
|
||||
|
||||
int iMaxPresent = kLoader.LoadInt( "max_present", 0 );
|
||||
for(int k = 0;k < iMaxPresent;k++)
|
||||
{
|
||||
sprintf_s( szKey, "present%d_rand", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "present%d_type", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "present%d_value1", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "present%d_value2", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
// 장비 선물의 기간+강화값 랜덤 리스트
|
||||
kLoader.SetTitle( "common" );
|
||||
iMaxTable = kLoader.LoadInt( "max_extraitem_rand_table", 0 );
|
||||
for(i = 0;i < iMaxTable;i++)
|
||||
{
|
||||
sprintf_s( szKey, "extraitem_rand_table%d", i + 1 );
|
||||
kLoader.SetTitle( szKey );
|
||||
|
||||
int k = 0;
|
||||
int iMaxLimitDate = kLoader.LoadInt( "max_limit_date", 0 );
|
||||
for(k = 0;k < iMaxLimitDate;k++)
|
||||
{
|
||||
sprintf_s( szKey, "limit_date%d_rand", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "limit_date%d_value", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
}
|
||||
|
||||
int iMaxReinforceDate = kLoader.LoadInt( "max_reinforce", 0 );
|
||||
for(k = 0;k < iMaxReinforceDate;k++)
|
||||
{
|
||||
sprintf_s( szKey, "reinforce%d_rand", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
|
||||
sprintf_s( szKey, "reinforce%d_value", k + 1 );
|
||||
temp[ value++ ] = kLoader.LoadInt( szKey, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
cout << "ThreadID : " << GetCurrentThreadId() << " ";
|
||||
cout << "sp2_monster_treasure_card result : " << GetTickCount() - time << endl;
|
||||
|
||||
cout << endl;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
class ioINITestThread : public ioThread
|
||||
{
|
||||
public:
|
||||
ioINITestThread(void);
|
||||
~ioINITestThread(void);
|
||||
|
||||
public:
|
||||
void Run();
|
||||
|
||||
public:
|
||||
void Test();
|
||||
};
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#include "StdAfx.h"
|
||||
#include "ioThread.h"
|
||||
|
||||
|
||||
ioThread::ioThread(void) : m_hThread(0L), m_threadID(0)
|
||||
{
|
||||
}
|
||||
|
||||
ioThread::~ioThread(void)
|
||||
{
|
||||
if(m_hThread)
|
||||
{
|
||||
CloseHandle(m_hThread);
|
||||
m_threadID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned WINAPI ioThread::HandleRunner(LPVOID parameter)
|
||||
{
|
||||
ioThread *pThread = (ioThread *)parameter;
|
||||
if(pThread == NULL)
|
||||
return 0;
|
||||
|
||||
pThread->Run();
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL ioThread::Begin()
|
||||
{
|
||||
HANDLE threadHandle = reinterpret_cast<HANDLE>( _beginthreadex(
|
||||
NULL,
|
||||
0,
|
||||
HandleRunner,
|
||||
this,
|
||||
0,
|
||||
&m_threadID ));
|
||||
if(!threadHandle)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
m_hThread = threadHandle;
|
||||
|
||||
return (m_hThread == 0) ? FALSE : TRUE;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
class ioThread
|
||||
{
|
||||
public:
|
||||
ioThread(void);
|
||||
virtual ~ioThread(void);
|
||||
|
||||
private:
|
||||
static unsigned WINAPI HandleRunner(LPVOID parameter);
|
||||
UINT m_threadID;
|
||||
|
||||
protected:
|
||||
HANDLE m_hThread;
|
||||
BOOL m_threadStart;
|
||||
|
||||
public:
|
||||
virtual void Run() = 0; //상속 받은 클래스가 구현한다.
|
||||
|
||||
public:
|
||||
DWORD GetThread() { return m_threadID; }
|
||||
BOOL Begin();
|
||||
|
||||
BOOL IsStart() const { return m_threadStart; }
|
||||
void SetStart(const BOOL state) { m_threadStart = state; }
|
||||
};
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : 표준 포함 파일만 들어 있는 소스 파일입니다.
|
||||
// IniLibMultiThreadTest.pch는 미리 컴파일된 헤더가 됩니다.
|
||||
// stdafx.obj에는 미리 컴파일된 형식 정보가 포함됩니다.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: 필요한 추가 헤더는
|
||||
// 이 파일이 아닌 STDAFX.H에서 참조합니다.
|
||||
@@ -0,0 +1,27 @@
|
||||
// stdafx.h : 자주 사용하지만 자주 변경되지는 않는
|
||||
// 표준 시스템 포함 파일 및 프로젝트 관련 포함 파일이
|
||||
// 들어 있는 포함 파일입니다.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
|
||||
|
||||
// TODO: 프로그램에 필요한 추가 헤더는 여기에서 참조합니다.
|
||||
#include <process.h>
|
||||
#include <Windows.h>
|
||||
#include "ioThread.h"
|
||||
#include "ioINITestThread.h"
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include "E:\svn\New_SP2\trunk\programming\src\include\common.h"
|
||||
|
||||
#include "E:\svn\New_SP2\trunk\programming\src\ioINILoader\ioINILoader.h"
|
||||
#pragma comment( lib, "E:\\svn\\New_SP2\\trunk\\programming\\lib\\inid.lib" )
|
||||
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// SDKDDKVer.h를 포함하면 최고 수준의 가용성을 가진 Windows 플랫폼이 정의됩니다.
|
||||
|
||||
// 이전 Windows 플랫폼에 대해 응용 프로그램을 빌드하려는 경우에는 SDKDDKVer.h를 포함하기 전에
|
||||
// WinSDKVer.h를 포함하고 _WIN32_WINNT 매크로를 지원하려는 플랫폼으로 설정하십시오.
|
||||
|
||||
#include <SDKDDKVer.h>
|
||||
Reference in new issue
Block a user