Index: trunk/abdev/BasicCompiler32/Compile_Func.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_Func.cpp	(revision 335)
+++ trunk/abdev/BasicCompiler32/Compile_Func.cpp	(revision 336)
@@ -307,48 +307,58 @@
 
 
+	if( userProc.GetMethod().IsDynamic() )
+	{
+		/////////////////////////////////////////////////////////////////
+		// オブジェクト ポインタをpush
+		/////////////////////////////////////////////////////////////////
+
+		// オブジェクト名を取得
+		char objectName[VN_SIZE];
+		char memberName[VN_SIZE];
+		char *thisPtrName = "This";
+		Type type;
+		if( SplitMemberName( methodInstanceName, objectName, memberName ) )
+		{
+			if( GetVarType( objectName, type, false ) )
+			{
+				thisPtrName = objectName;
+			}
+		}
+
+		// オブジェクト ポインタを取得
+		RELATIVE_VAR relativeVar;
+		GetVarOffsetReadOnly( thisPtrName, &relativeVar, type );
+		if( !type.IsObject() )
+		{
+			extern int cp;
+			SetError(1,NULL,cp);
+			return;
+		}
+
+		SetVarPtrToEax( &relativeVar );
+
+		//mov eax,dword ptr[eax]
+		compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EAX, 0, MOD_BASE );
+
+		//push eax
+		compiler.codeGenerator.op_push( REG_EAX );
+	}
+
+
 	/////////////////////////////////////////////////////////////////
-	// オブジェクト ポインタをpush
+	// call _CreateDynamicDelegate/_CreateStaticDelegate
 	/////////////////////////////////////////////////////////////////
 
-	// オブジェクト名を取得
-	char objectName[VN_SIZE];
-	char memberName[VN_SIZE];
-	char *thisPtrName = "This";
-	Type type;
-	if( SplitMemberName( methodInstanceName, objectName, memberName ) )
-	{
-		if( GetVarType( objectName, type, false ) )
-		{
-			thisPtrName = objectName;
-		}
-	}
-
-	// オブジェクト ポインタを取得
-	RELATIVE_VAR relativeVar;
-	GetVarOffsetReadOnly( thisPtrName, &relativeVar, type );
-	if( !type.IsObject() )
-	{
-		extern int cp;
-		SetError(1,NULL,cp);
-		return;
-	}
-
-	SetVarPtrToEax( &relativeVar );
-
-	//mov eax,dword ptr[eax]
-	compiler.codeGenerator.op_mov_RM( sizeof(long), REG_EAX, REG_EAX, 0, MOD_BASE );
-
-	//push eax
-	compiler.codeGenerator.op_push( REG_EAX );
-
-
-	/////////////////////////////////////////////////////////////////
-	// call _System_CreateSimpleDynamicDelegate
-	/////////////////////////////////////////////////////////////////
-
 	std::vector<const UserProc *> subs;
-	dgClass.GetStaticMethods().Enum( "_CreateDelegate", subs );
-
-	// call _System_CreateSimpleDynamicDelegate
+	if( userProc.GetMethod().IsDynamic() )
+	{
+		dgClass.GetStaticMethods().Enum( "_CreateDynamicDelegate", subs );
+	}
+	else
+	{
+		dgClass.GetStaticMethods().Enum( "_CreateStaticDelegate", subs );
+	}
+
+	// call _CreateDynamicDelegate
 	compiler.codeGenerator.op_call( subs[0] );
 }
@@ -496,5 +506,5 @@
 		i = GetOneParameter( paramsStr, i, methodPtrParamStr );
 
-		char objPtrValueStr[VN_SIZE];
+		char objPtrValueStr[VN_SIZE]="";
 		if( isDynamicCall )
 		{
Index: trunk/abdev/BasicCompiler_Common/include/Method.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Method.h	(revision 335)
+++ trunk/abdev/BasicCompiler_Common/include/Method.h	(revision 336)
@@ -55,4 +55,5 @@
 	virtual bool IsVirtual() const = 0;
 	virtual bool IsConst() const = 0;
+	virtual bool IsDynamic() const = 0;
 	virtual bool IsStatic() const = 0;
 	virtual const CClass *GetInheritsClassPtr() const = 0;
@@ -118,4 +119,8 @@
 		return isConst;
 	}
+	virtual bool IsDynamic() const
+	{
+		return true;
+	}
 	virtual bool IsStatic() const
 	{
@@ -159,4 +164,8 @@
 	}
 	virtual bool IsConst() const{SetError();return false;}
+	virtual bool IsDynamic() const
+	{
+		return false;
+	}
 	virtual bool IsStatic() const
 	{
Index: trunk/abdev/BasicCompiler_Common/include/Procedure.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Procedure.h	(revision 335)
+++ trunk/abdev/BasicCompiler_Common/include/Procedure.h	(revision 336)
@@ -348,4 +348,5 @@
 		this->pMethod = pMethod;
 	}
+	const CMethod &GetMethod() const;
 
 	bool SetParamsAndReturnType( const char *sourceOfParams, int nowLine, bool isStatic );
Index: trunk/abdev/BasicCompiler_Common/include/ver.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/ver.h	(revision 335)
+++ trunk/abdev/BasicCompiler_Common/include/ver.h	(revision 336)
@@ -6,6 +6,6 @@
 // バージョン付加文字列
 #ifdef _AMD64_
-#define VER_INFO		"(x64) (rev.338)"
+#define VER_INFO		"(x64) (rev.342)"
 #else
-#define VER_INFO		"(rev.338)"
+#define VER_INFO		"(rev.342)"
 #endif
Index: trunk/abdev/BasicCompiler_Common/src/Procedure.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Procedure.cpp	(revision 335)
+++ trunk/abdev/BasicCompiler_Common/src/Procedure.cpp	(revision 336)
@@ -46,4 +46,12 @@
 	}
 	return ( pMethod->IsVirtual() != 0 );
+}
+const CMethod &UserProc::GetMethod() const
+{
+	if( !HasParentClass() )
+	{
+		Jenga::Throw( "グローバル関数に対してUserProc::GetMethodメソッドが呼ばれた" );
+	}
+	return *pMethod;
 }
 
