Index: /BasicCompiler32/BasicCompiler.vcproj
===================================================================
--- /BasicCompiler32/BasicCompiler.vcproj	(revision 106)
+++ /BasicCompiler32/BasicCompiler.vcproj	(revision 107)
@@ -152,4 +152,5 @@
 				RuntimeLibrary="0"
 				EnableFunctionLevelLinking="true"
+				RuntimeTypeInfo="true"
 				PrecompiledHeaderFile=".\Release/BasicCompiler.pch"
 				AssemblerListingLocation=".\Release/"
@@ -174,5 +175,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+				AdditionalDependencies="comctl32.lib psapi.lib"
 				OutputFile="../ActiveBasic/BasicCompiler32.exe"
 				LinkIncremental="1"
Index: /BasicCompiler64/BasicCompiler.vcproj
===================================================================
--- /BasicCompiler64/BasicCompiler.vcproj	(revision 106)
+++ /BasicCompiler64/BasicCompiler.vcproj	(revision 107)
@@ -79,5 +79,5 @@
 				Name="VCLinkerTool"
 				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib bufferoverflowu.lib"
+				AdditionalDependencies="comctl32.lib psapi.lib bufferoverflowu.lib"
 				OutputFile="../ActiveBasic/BasicCompiler64.exe"
 				LinkIncremental="2"
@@ -351,6 +351,8 @@
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN;_AMD64_;_WIN64"
 				MinimalRebuild="false"
+				ExceptionHandling="1"
 				BasicRuntimeChecks="0"
-				RuntimeLibrary="0"
+				RuntimeLibrary="2"
+				RuntimeTypeInfo="true"
 				UsePrecompiledHeader="0"
 				PrecompiledHeaderFile=".\Release/BasicCompiler.pch"
@@ -379,9 +381,9 @@
 				Name="VCLinkerTool"
 				AdditionalOptions="/MACHINE:AMD64"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib bufferoverflowu.lib"
+				AdditionalDependencies="comctl32.lib psapi.lib bufferoverflowu.lib"
 				OutputFile="../ActiveBasic/BasicCompiler64.exe"
-				LinkIncremental="2"
-				SuppressStartupBanner="true"
-				IgnoreDefaultLibraryNames="libcpmtd"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				IgnoreDefaultLibraryNames="libcpmtd.lib"
 				GenerateDebugInformation="false"
 				ProgramDatabaseFile=".\Release/BasicCompiler64.pdb"
Index: /BasicCompiler64/Compile_Var.cpp
===================================================================
--- /BasicCompiler64/Compile_Var.cpp	(revision 106)
+++ /BasicCompiler64/Compile_Var.cpp	(revision 107)
@@ -380,5 +380,5 @@
 bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss){
 	int i;
-	char variable[VN_SIZE],member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE];
+	char variable[VN_SIZE];
 
 	if(NameBuffer[0]=='.'){
Index: /BasicCompiler_Common/BasicFixed.h
===================================================================
--- /BasicCompiler_Common/BasicFixed.h	(revision 106)
+++ /BasicCompiler_Common/BasicFixed.h	(revision 107)
@@ -178,8 +178,10 @@
 #define ESC_NAMESPACE		'o'		// Namespace
 #define ESC_ENDNAMESPACE	'p'		// End Namespace
+#define ESC_IMPORTS			'q'		// Imports
+#define ESC_CLEARNAMESPACEIMPORTED 'r'	// _ClearNamespaceImported
 //EXEファイル用制御エスケープシーケンス
-#define ESC_USING			'q'		// Print命令語のUsing
-#define ESC_FOR				'r'		// Open命令語のFor
-#define ESC_LINENUM			's'		// 行番号を示す
+#define ESC_USING			's'		// Print命令語のUsing
+#define ESC_FOR				't'		// Open命令語のFor
+#define ESC_LINENUM			'u'		// 行番号を示す
 
 //オブジェクト指向エスケープシーケンス
Index: /BasicCompiler_Common/Compile.cpp
===================================================================
--- /BasicCompiler_Common/Compile.cpp	(revision 106)
+++ /BasicCompiler_Common/Compile.cpp	(revision 107)
@@ -229,4 +229,10 @@
 				}
 				Smoothie::Lexical::liveingNamespaceScopes.pop_back();
+				break;
+			case ESC_IMPORTS:
+				Smoothie::Meta::importedNamespaces.Imports( Command + 2 );
+				break;
+			case ESC_CLEARNAMESPACEIMPORTED:
+				Smoothie::Meta::importedNamespaces.clear();
 				break;
 
Index: /BasicCompiler_Common/Intermediate_Step1.cpp
===================================================================
--- /BasicCompiler_Common/Intermediate_Step1.cpp	(revision 106)
+++ /BasicCompiler_Common/Intermediate_Step1.cpp	(revision 107)
@@ -447,4 +447,11 @@
 
 			switch(temporary[i3]){
+				case '_':
+					if(lstrcmpi(temporary+i3,"_ClearNamespaceImported")==0){
+						i2=i3;
+						temporary[i2++]=1;
+						temporary[i2]=ESC_CLEARNAMESPACEIMPORTED;
+					}
+					break;
 				case 'a':
 				case 'A':
@@ -755,4 +762,9 @@
 						temporary[i2++]=1;
 						temporary[i2]=ESC_IF;
+					}
+					else if(lstrcmpi(temporary+i3,"Imports")==0){
+						i2=i3;
+						temporary[i2++]=1;
+						temporary[i2]=ESC_IMPORTS;
 					}
 					else if(lstrcmpi(temporary+i3,"Inherits")==0){
Index: /BasicCompiler_Common/Intermediate_Step2.cpp
===================================================================
--- /BasicCompiler_Common/Intermediate_Step2.cpp	(revision 106)
+++ /BasicCompiler_Common/Intermediate_Step2.cpp	(revision 107)
@@ -462,4 +462,5 @@
 			case ESC_STATIC:
 			case ESC_NAMESPACE:
+			case ESC_IMPORTS:
 				KillStringSpaces(Command+2);
 				break;
Index: /BasicCompiler_Common/common.h
===================================================================
--- /BasicCompiler_Common/common.h	(revision 106)
+++ /BasicCompiler_Common/common.h	(revision 107)
@@ -47,7 +47,7 @@
 
 #ifdef _AMD64_
-#define VER_INFO		"(x64) β rev.217"
+#define VER_INFO		"(x64) β rev.228"
 #else
-#define VER_INFO		"β rev.217"
+#define VER_INFO		"β rev.228"
 #endif
 
@@ -61,7 +61,4 @@
 
 
-#pragma comment(lib, "psapi.lib")
-
-
 #define PTR_SIZE		sizeof(LONG_PTR)
 
@@ -84,6 +81,17 @@
 
 //未定義の定数情報
-#define IMAGE_FILE_MACHINE_AMD64 0x8664
-
+#ifndef IMAGE_FILE_MACHINE_AMD64
+	#define IMAGE_FILE_MACHINE_AMD64 0x8664
+#endif
+
+#ifdef _AMD64_
+	#ifndef IMAGE_SIZEOF_NT_OPTIONAL64_HEADER
+		#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER    240
+	#endif
+#else
+	#ifndef IMAGE_SIZEOF_NT_OPTIONAL32_HEADER
+		#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER    224
+	#endif
+#endif
 
 
Index: /BasicCompiler_Common/error.cpp
===================================================================
--- /BasicCompiler_Common/error.cpp	(revision 106)
+++ /BasicCompiler_Common/error.cpp	(revision 107)
@@ -152,4 +152,5 @@
 	if(num==62) sprintf(msg,"グローバル領域でのReturnは禁止されています。",tempKeyWord);
 	if(num==63) lstrcpy(msg,"名前空間が正しく閉じられていません。");
+	if(num==64) sprintf(msg,"\"%s\" 無効な名前空間です。",tempKeyWord);
 
 
Index: /BasicCompiler_Common/include/Namespace.h
===================================================================
--- /BasicCompiler_Common/include/Namespace.h	(revision 106)
+++ /BasicCompiler_Common/include/Namespace.h	(revision 107)
@@ -70,9 +70,5 @@
 	}
 
-	bool IsUsing() const
-	{
-		// TODO: 実装
-		return false;
-	}
+	bool IsImported() const;
 
 	bool IsLiving() const;
@@ -98,5 +94,5 @@
 			if( baseNamespaceScopes.size() ){
 				// 名前空間の判断が必要なとき
-				if( baseNamespaceScopes.IsUsing()
+				if( baseNamespaceScopes.IsImported()
 					|| baseNamespaceScopes.IsLiving() ){
 					// Using指定があるとき
@@ -134,4 +130,6 @@
 	void SplitNamespace( const char *fullName, char *namespaceStr, char *simpleName ) const;
 
+	void Imports( const string &namespaceStr );
+
 	static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection );
 };
Index: /BasicCompiler_Common/include/Smoothie.h
===================================================================
--- /BasicCompiler_Common/include/Smoothie.h	(revision 106)
+++ /BasicCompiler_Common/include/Smoothie.h	(revision 107)
@@ -19,15 +19,5 @@
 #endif
 		}
-		static void Put( const string &text ){
-#ifdef _DEBUG
-			log += text + "\r\n";
-
-			{
-				ofstream ofs( ( (string)BasicSystemDir + "Log\\compile.log" ).c_str(), ios_base::app );
-				ofs << text << endl;
-				ofs.close();
-			}
-#endif
-		}
+		static void Put( const string &text );
 		static void PutFile( const string &fileName, const string &buffer ){
 			ofstream ofs( ( (string)BasicSystemDir + "Log\\" + fileName ).c_str() );
@@ -49,4 +39,5 @@
 		static vector<ProcPointer *> procPointers;
 		static NamespaceScopesCollection namespaceScopesCollection;
+		static NamespaceScopesCollection importedNamespaces;
 	};
 };
Index: /BasicCompiler_Common/src/Namespace.cpp
===================================================================
--- /BasicCompiler_Common/src/Namespace.cpp	(revision 106)
+++ /BasicCompiler_Common/src/Namespace.cpp	(revision 107)
@@ -21,4 +21,13 @@
 }
 
+bool NamespaceScopes::IsImported() const
+{
+	BOOST_FOREACH( const NamespaceScopes &namespaceScopes, Smoothie::Meta::importedNamespaces ){
+		if( this->IsEqual( namespaceScopes ) ){
+			return true;
+		}
+	}
+	return false;
+}
 bool NamespaceScopes::IsLiving() const
 {
@@ -90,4 +99,13 @@
 	lstrcpy( simpleName, fullName + lstrlen( namespaceStr ) + dotLength );
 }
+void NamespaceScopesCollection::Imports( const string &namespaceStr ){
+	NamespaceScopes namespaceScopes( namespaceStr );
+	if( !Smoothie::Meta::namespaceScopesCollection.IsExist( namespaceScopes ) ){
+		SetError(64,namespaceStr.c_str(),cp );
+		return;
+	}
+
+	this->push_back( namespaceScopes );
+}
 bool NamespaceScopesCollection::CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection )
 {
Index: /BasicCompiler_Common/src/Smoothie.cpp
===================================================================
--- /BasicCompiler_Common/src/Smoothie.cpp	(revision 106)
+++ /BasicCompiler_Common/src/Smoothie.cpp	(revision 107)
@@ -2,4 +2,17 @@
 
 string Smoothie::Logger::log = "";
+
+void Smoothie::Logger::Put( const string &text )
+{
+//#ifdef _DEBUG
+	log += text + "\r\n";
+
+	{
+		ofstream ofs( ( (string)BasicSystemDir + "Log\\compile.log" ).c_str(), ios_base::app );
+		ofs << text << endl;
+		ofs.close();
+	}
+//#endif
+}
 
 BasicSource Smoothie::Lexical::source;
@@ -9,2 +22,3 @@
 vector<ProcPointer *> Smoothie::Meta::procPointers;
 NamespaceScopesCollection Smoothie::Meta::namespaceScopesCollection;
+NamespaceScopesCollection Smoothie::Meta::importedNamespaces;
Index: /ProjectEditor/ProjectControl.cpp
===================================================================
--- /ProjectEditor/ProjectControl.cpp	(revision 106)
+++ /ProjectEditor/ProjectControl.cpp	(revision 107)
@@ -2318,4 +2318,6 @@
 			sprintf(buffer+i2,"#include \"%s\"\r\n",ProjectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->m_path);
 			i2+=lstrlen(buffer+i2);
+			lstrcpy(buffer+i2,"_ClearNamespaceImported\r\n");
+			i2+=lstrlen(buffer+i2);
 		}
 	}
Index: /ProjectEditor/ProjectEditor.vcproj
===================================================================
--- /ProjectEditor/ProjectEditor.vcproj	(revision 106)
+++ /ProjectEditor/ProjectEditor.vcproj	(revision 107)
@@ -555,5 +555,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib libcp.lib"
 				OutputFile="../ActiveBasic/abdev.exe"
 				LinkIncremental="1"
Index: /ProjectEditor/SubOperation.cpp
===================================================================
--- /ProjectEditor/SubOperation.cpp	(revision 106)
+++ /ProjectEditor/SubOperation.cpp	(revision 107)
@@ -517,4 +517,5 @@
 	else if(str[0]=='i'||str[0]=='I'){
 		if(lstrcmpi(str,"If")==0) return COM_IF;
+		if(lstrcmpi(str,"Imports")==0) return -1;
 		if(lstrcmpi(str,"Inherits")==0) return COM_INHERITS;
 		if(lstrcmpi(str,"Input")==0) return COM_INPUT;
