Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp	(revision 750)
@@ -99,5 +99,5 @@
 	// 仮想関数になるメソッドに使用チェックをつける
 	const CClass &_class = *this;
-	BOOST_FOREACH( const CMethod *pMethod, _class.GetDynamicMethods() )
+	foreach( const CMethod *pMethod, _class.GetDynamicMethods() )
 	{
 		if( pMethod->IsVirtual() )
@@ -108,7 +108,7 @@
 
 	// インターフェイスメソッドに使用チェックをつける
-	BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() )
-	{
-		BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() )
+	foreach( const ::Interface *pInterface, _class.GetInterfaces() )
+	{
+		foreach( const CMethod *pMethod, pInterface->GetDynamicMethods() )
 		{
 			pMethod->GetUserProc().Using();
@@ -210,5 +210,5 @@
 bool CClass::IsInheritsInterface( const CClass *pInterfaceClass ) const
 {
-	BOOST_FOREACH( const ::Interface *pInterface, interfaces ){
+	foreach( const ::Interface *pInterface, interfaces ){
 		if( pInterfaceClass == &pInterface->GetClass() ){
 			return true;
@@ -223,5 +223,5 @@
 	const Methods& inheritsClassMethods = inheritsClass.GetDynamicMethods();
 	GetDynamicMethods().reserve( inheritsClassMethods.size() );
-	BOOST_FOREACH( const CMethod *pBaseMethod, inheritsClassMethods ){
+	foreach( const CMethod *pBaseMethod, inheritsClassMethods ){
 		CMethod *pMethod = new DynamicMethod( *pBaseMethod );
 
@@ -256,5 +256,5 @@
 	const Interfaces& inheritsClassInterfaces = inheritsClass.GetInterfaces();
 	interfaces.reserve( inheritsClassInterfaces.size() );
-	BOOST_FOREACH( const ::Interface *pInterface, inheritsClassInterfaces )
+	foreach( const ::Interface *pInterface, inheritsClassInterfaces )
 	{
 		interfaces.push_back( new ::Interface( *pInterface ) );
@@ -298,5 +298,5 @@
 
 	//メソッド
-	BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
+	foreach( const CMethod *pMethod, GetDynamicMethods() ){
 		if(  name == pMethod->GetUserProc().GetName() ){
 			return 1;
@@ -320,5 +320,5 @@
 
 	// 動的メンバ
-	BOOST_FOREACH( const Member *pMember, dynamicMembers )
+	foreach( const Member *pMember, dynamicMembers )
 	{
 		if( GetName() == pMember->GetName() )
@@ -329,5 +329,5 @@
 
 	// 静的メンバ
-	BOOST_FOREACH( Member *pMember, staticMembers ){
+	foreach( Member *pMember, staticMembers ){
 		if( GetName() == pMember->GetName() ){
 			return true;
@@ -350,5 +350,5 @@
 	}
 
-	BOOST_FOREACH( Member *pMember, GetDynamicMembers() )
+	foreach( Member *pMember, GetDynamicMembers() )
 	{
 		if( pMember->GetName() == memberName )
@@ -366,5 +366,5 @@
 
 	// インターフェイス メソッド
-	BOOST_FOREACH( ::Interface *pInterface, GetInterfaces() )
+	foreach( ::Interface *pInterface, GetInterfaces() )
 	{
 		pInterface->GetDynamicMethods().Enum( methodName, subs );
@@ -379,5 +379,5 @@
 	{
 		// インターフェイス メソッド
-		BOOST_FOREACH( ::Interface *pInterface, GetInterfaces() )
+		foreach( ::Interface *pInterface, GetInterfaces() )
 		{
 			result = pInterface->GetDynamicMethods().GetMethodPtr( pUserProc );
@@ -446,5 +446,5 @@
 	}
 
-	BOOST_FOREACH( Member *pMember, dynamicMembers )
+	foreach( Member *pMember, dynamicMembers )
 	{
 		const Type& memberType = pMember->GetType();
@@ -553,5 +553,5 @@
 	}
 
-	BOOST_FOREACH( Member *pMember, dynamicMembers )
+	foreach( Member *pMember, dynamicMembers )
 	{
 		// メンバサイズ
@@ -654,5 +654,5 @@
 	}
 
-	BOOST_FOREACH( Member *pMember, dynamicMembers )
+	foreach( Member *pMember, dynamicMembers )
 	{
 		int tempAlignment = pMember->GetType().GetSize();
@@ -678,5 +678,5 @@
 
 	vtblIndex = 0;
-	BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
+	foreach( const CMethod *pMethod, GetDynamicMethods() ){
 		if( &pMethod->GetUserProc() == pUserProc )
 		{
@@ -690,10 +690,10 @@
 	}
 
-	BOOST_FOREACH( const ::Interface *pInterface, interfaces )
+	foreach( const ::Interface *pInterface, interfaces )
 	{
 		vtblMasterListIndex++;
 
 		vtblIndex = 0;
-		BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){
+		foreach( const CMethod *pMethod, pInterface->GetDynamicMethods() ){
 			if( &pMethod->GetUserProc() == pUserProc )
 			{
@@ -715,5 +715,5 @@
 	int result = 0;
 
-	BOOST_FOREACH( const ::Interface *pInterface, interfaces )
+	foreach( const ::Interface *pInterface, interfaces )
 	{
 		result++;
@@ -742,5 +742,5 @@
 	// 未実装(abstract)の仮想関数を持つ場合はtrueを返す
 
-	BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){
+	foreach( const CMethod *pMethod, GetDynamicMethods() ){
 		if(pMethod->IsVirtual()){
 			if(pMethod->IsAbstract()){
@@ -751,7 +751,7 @@
 
 	// インターフェイスのvtbl
-	BOOST_FOREACH( const ::Interface *pInterface, interfaces )
-	{
-		BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){
+	foreach( const ::Interface *pInterface, interfaces )
+	{
+		foreach( const CMethod *pMethod, pInterface->GetDynamicMethods() ){
 			if(pMethod->IsVirtual()){
 				if(pMethod->IsAbstract()){
@@ -791,5 +791,5 @@
 		pClass = classes.front();
 
-		BOOST_FOREACH( const CClass *pTempClass, classes )
+		foreach( const CClass *pTempClass, classes )
 		{
 			if( pClass->GetNamespaceScopes().size() < pTempClass->GetNamespaceScopes().size() )
@@ -837,5 +837,5 @@
 	std::string result;
 
-	BOOST_FOREACH( const Member *pMember, dynamicMembers )
+	foreach( const Member *pMember, dynamicMembers )
 	{
 		if( result.size() )
@@ -853,5 +853,5 @@
 	std::string result;
 
-	BOOST_FOREACH( const Member *pMember, dynamicMembers )
+	foreach( const Member *pMember, dynamicMembers )
 	{
 		if( result.size() )
@@ -874,5 +874,5 @@
 {
 	const CClass &thisClass = *this;
-	BOOST_FOREACH( const Member *pMember, thisClass.GetDynamicMembers() )
+	foreach( const Member *pMember, thisClass.GetDynamicMembers() )
 	{
 		if( pMember->GetType().IsObject() || pMember->GetType().IsPointer() )
@@ -935,5 +935,5 @@
 
 	// 実装するインターフェイス
-	BOOST_FOREACH( ::Interface *pInterface, interfaces )
+	foreach( ::Interface *pInterface, interfaces )
 	{
 		pInterface->Resolve( resolver, resolveErrors );
@@ -941,5 +941,5 @@
 
 	// 動的メンバ
-	BOOST_FOREACH( Member *pMember, dynamicMembers )
+	foreach( Member *pMember, dynamicMembers )
 	{
 		pMember->Resolve( resolver, resolveErrors );
@@ -947,5 +947,5 @@
 
 	// 静的メンバ
-	BOOST_FOREACH( Member *pMember, staticMembers )
+	foreach( Member *pMember, staticMembers )
 	{
 		pMember->Resolve( resolver, resolveErrors );
@@ -953,5 +953,5 @@
 
 	// 動的メソッド
-	BOOST_FOREACH( CMethod *pMethod, GetDynamicMethods() )
+	foreach( CMethod *pMethod, GetDynamicMethods() )
 	{
 		pMethod->Resolve( resolver, resolveErrors );
@@ -959,5 +959,5 @@
 
 	// 静的メソッド
-	BOOST_FOREACH( CMethod *pMethod, staticMethods )
+	foreach( CMethod *pMethod, staticMethods )
 	{
 		pMethod->Resolve( resolver, resolveErrors );
@@ -965,5 +965,5 @@
 
 	// テンプレート展開後のクラス
-	BOOST_FOREACH( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, expandedTemplateClasses )
+	foreach( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, expandedTemplateClasses )
 	{
 		pExpandedTemplateClass->Resolve( resolver, resolveErrors );
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/DataTable.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/DataTable.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/DataTable.cpp	(revision 750)
@@ -59,5 +59,5 @@
 void DataTable::ResetDataSectionBaseOffset( long dataSectionBaseOffset )
 {
-	BOOST_FOREACH( const Schedule &schedule, schedules )
+	foreach( const Schedule &schedule, schedules )
 	{
 		if( schedule.GetType() == Schedule::DataTable )
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Delegate.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Delegate.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Delegate.cpp	(revision 750)
@@ -23,5 +23,5 @@
 	Procedure::Resolve( resolver, resolveErrors );
 
-	BOOST_FOREACH( Parameter *pParameter, dynamicParams )
+	foreach( Parameter *pParameter, dynamicParams )
 	{
 		pParameter->Resolve( resolver, resolveErrors );
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp	(revision 750)
@@ -8,5 +8,5 @@
 {
 	//メソッドをコピー
-	BOOST_FOREACH( const CMethod *pBaseMethod, pInterfaceClass->GetDynamicMethods() )
+	foreach( const CMethod *pBaseMethod, pInterfaceClass->GetDynamicMethods() )
 	{
 		CMethod *pMethod = new DynamicMethod( *pBaseMethod );
@@ -57,5 +57,5 @@
 	{
 		std::string actualGenericTypesName;
-		BOOST_FOREACH( const Type &typeParameter, actualTypeParameters )
+		foreach( const Type &typeParameter, actualTypeParameters )
 		{
 			if( actualGenericTypesName.size() )
@@ -74,5 +74,5 @@
 {
 	// 動的メソッド
-	BOOST_FOREACH( CMethod *pMethod, GetDynamicMethods() )
+	foreach( CMethod *pMethod, GetDynamicMethods() )
 	{
 		pMethod->Resolve( resolver, resolveErrors );
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp	(revision 750)
@@ -99,5 +99,5 @@
 	// グローバル変数
 	long initAreaBaseOffset = this->globalVars.initAreaBuffer.GetSize();
-	BOOST_FOREACH( Variable *pVar, meta.globalVars )
+	foreach( Variable *pVar, meta.globalVars )
 	{
 		if( pVar->IsExternal() )
@@ -186,5 +186,5 @@
 
 	// 関数ポインタ
-	BOOST_FOREACH( ProcPointer *pProcPointer, meta.procPointers )
+	foreach( ProcPointer *pProcPointer, meta.procPointers )
 	{
 		if( pProcPointer->IsExternal() )
@@ -283,5 +283,5 @@
 
 	// グローバル変数
-	BOOST_FOREACH( Variable *pVar, globalVars )
+	foreach( Variable *pVar, globalVars )
 	{
 		pVar->Resolve( resolver, resolveErrors );
@@ -319,5 +319,5 @@
 
 	// 関数ポインタ
-	BOOST_FOREACH( ProcPointer *pProcPointer, procPointers )
+	foreach( ProcPointer *pProcPointer, procPointers )
 	{
 		pProcPointer->Resolve( resolver, resolveErrors );
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp	(revision 750)
@@ -92,5 +92,5 @@
 Methods::Methods( const Methods &methods )
 {
-	BOOST_FOREACH( CMethod *pMethod, methods )
+	foreach( CMethod *pMethod, methods )
 	{
 		this->push_back( new DynamicMethod( dynamic_cast<DynamicMethod &>(*pMethod) ) );
@@ -101,5 +101,5 @@
 {
 	Methods &methods = *this;
-	BOOST_FOREACH( CMethod *pMethod, methods )
+	foreach( CMethod *pMethod, methods )
 	{
 		delete pMethod;
@@ -122,5 +122,5 @@
 	//メソッドのオーバーライド
 	Methods &methods = *this;
-	BOOST_FOREACH( CMethod *pMethod, methods )
+	foreach( CMethod *pMethod, methods )
 	{
 		if( !pMethod->IsNotUse() && pMethod->GetUserProc().IsEqualForOverride( actualTypeParametersForThisMethods, pUserProc ) )
@@ -145,5 +145,5 @@
 {
 	const Methods &methods = *this;
-	BOOST_FOREACH( const CMethod *pMethod, methods ){
+	foreach( const CMethod *pMethod, methods ){
 		if( pMethod->GetUserProc().GetName() == name ) return true;
 	}
@@ -181,5 +181,5 @@
 	int count = 0;
 	const Methods &methods = *this;
-	BOOST_FOREACH( const CMethod *pMethod, methods )
+	foreach( const CMethod *pMethod, methods )
 	{
 		if( pMethod->IsVirtual() )
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/NamespaceSupporter.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/NamespaceSupporter.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/NamespaceSupporter.cpp	(revision 750)
@@ -47,5 +47,5 @@
 
 	// Importsされている名前空間とのマッチングを試みる
-	BOOST_FOREACH( const NamespaceScopes &importedNamespaceScopes, GetImportedNamespaces() )
+	foreach( const NamespaceScopes &importedNamespaceScopes, GetImportedNamespaces() )
 	{
 		if( base.IsEqual( importedNamespaceScopes + entry ) )
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp	(revision 750)
@@ -84,5 +84,5 @@
 
 	// スケジュールを追加
-	BOOST_FOREACH( const Schedule &schedule, nativeCode.schedules )
+	foreach( const Schedule &schedule, nativeCode.schedules )
 	{
 		this->schedules.push_back(
@@ -96,5 +96,5 @@
 
 	// ソースコード行番号とネイティブコード位置の対応情報を追加
-	BOOST_FOREACH( const SourceLine &sourceLine, nativeCode.sourceLines )
+	foreach( const SourceLine &sourceLine, nativeCode.sourceLines )
 	{
 		this->sourceLines.push_back(
@@ -191,5 +191,5 @@
 void NativeCode::ResetDataSectionBaseOffset( long dataSectionBaseOffset )
 {
-	BOOST_FOREACH( const Schedule &schedule, schedules )
+	foreach( const Schedule &schedule, schedules )
 	{
 		if( schedule.GetType() == Schedule::DataTable )
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/ObjectModule.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/ObjectModule.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/ObjectModule.cpp	(revision 750)
@@ -11,18 +11,13 @@
 #include <sstream>
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
-#include <commctrl.h>
 #include <time.h>
 #include <limits.h>
 #include <shlobj.h>
-#include <process.h>
-#include <fcntl.h>
-#include <io.h>
-#include <shlwapi.h>
 #include <tchar.h>
-#include <stdarg.h>
 
 //boost libraries
@@ -52,4 +47,6 @@
 #include <boost/serialization/export.hpp>
 
+#define foreach(v, c) for each (v in c)
+
 #include <jenga/include/jenga.h>
 #include <abdev/ab_common/include/ab_common.h>
@@ -99,5 +96,5 @@
 
 	// リレーションテーブルを構築
-	BOOST_FOREACH( const std::string &oldRelationalObjectModuleName, oldRelationalObjectModuleNames )
+	foreach( const std::string &oldRelationalObjectModuleName, oldRelationalObjectModuleNames )
 	{
 		bool isMatch = false;
@@ -141,5 +138,5 @@
 		isSuccessful = true;
 	}
-	catch( boost::archive::archive_exception e )
+	catch( boost::archive::archive_exception& e )
 	{
 		MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK );
@@ -174,5 +171,5 @@
 		isSuccessful = true;
 	}
-	catch( boost::archive::archive_exception e )
+	catch( boost::archive::archive_exception& e )
 	{
 		MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK );
@@ -209,5 +206,5 @@
 		isSuccessful = true;
 	}
-	catch( boost::archive::archive_exception e )
+	catch( boost::archive::archive_exception& e )
 	{
 		MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK );
@@ -245,5 +242,5 @@
 		isSuccessful = true;
 	}
-	catch( boost::archive::archive_exception e )
+	catch( boost::archive::archive_exception &e )
 	{
 		MessageBox( NULL, e.what(), "XMLシリアライズの例外", MB_OK );
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp	(revision 750)
@@ -14,5 +14,5 @@
 bool Procedure::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors )
 {
-	BOOST_FOREACH( Parameter *pParameter, params )
+	foreach( Parameter *pParameter, params )
 	{
 		pParameter->Resolve( resolver, resolveErrors );
@@ -82,5 +82,5 @@
 UserProc::~UserProc()
 {
-	BOOST_FOREACH( Parameter *pParam, realParams ){
+	foreach( Parameter *pParam, realParams ){
 		delete pParam;
 	}
@@ -219,10 +219,10 @@
 	}
 
-	BOOST_FOREACH( Parameter *pParameter, realParams )
+	foreach( Parameter *pParameter, realParams )
 	{
 		pParameter->Resolve( resolver, resolveErrors );
 	}
 
-	BOOST_FOREACH( Variable *pLocalVar, localVars )
+	foreach( Variable *pLocalVar, localVars )
 	{
 		pLocalVar->Resolve( resolver, resolveErrors );
@@ -270,5 +270,5 @@
 {
 	ProcPointers &procPointers = *this;
-	BOOST_FOREACH( ProcPointer *pProcPointer, procPointers ){
+	foreach( ProcPointer *pProcPointer, procPointers ){
 		delete pProcPointer;
 	}
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp	(revision 750)
@@ -524,5 +524,5 @@
 	{
 		std::string actualGenericTypesName;
-		BOOST_FOREACH( const GenericType &actualGenericType, actualGenericTypes )
+		foreach( const GenericType &actualGenericType, actualGenericTypes )
 		{
 			if( actualGenericTypesName.size() )
Index: trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp
===================================================================
--- trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp	(revision 747)
+++ trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp	(revision 750)
@@ -26,5 +26,5 @@
 {
 	const TypeDefCollection &typeDefs = *this;
-	BOOST_FOREACH( const TypeDef &typeDef, typeDefs )
+	foreach( const TypeDef &typeDef, typeDefs )
 	{
 		if( typeDef.IsEqualSymbol( symbol ) )
