Index: trunk/TestCase/SimpleTestCase/DelegateTest.ab
===================================================================
--- trunk/TestCase/SimpleTestCase/DelegateTest.ab	(revision 341)
+++ trunk/TestCase/SimpleTestCase/DelegateTest.ab	(revision 342)
@@ -5,5 +5,5 @@
 Delegate Sub Callback3( a As Long )
 Delegate Sub Callback4( a As String )
-Delegate Function Callback7() As Long
+Delegate Function Callback7( str As String ) As String
 
 
@@ -59,6 +59,6 @@
 	End Sub
 
-	Function Proc7() As String
-		Return "Proc7 result"
+	Static Function Proc7( str As String ) As String
+		Return "Proc7 result[" + str + "]"
 	End Function
 End Class
@@ -79,8 +79,8 @@
 
 	UnitTest( "Delegate1", testObj.CheckFlags() )
-/*
+
 	Dim dg7 = New Callback7( AddressOf(TestClass.Proc7) )
-	UnitTest( "Delegate2", dg7() = "Proc7 result" )
-*/
+	UnitTest( "Delegate2", dg7( "test value" ) = "Proc7 result[test value]" )
+
 End Sub
 
Index: trunk/bin/SubOperation/templates/delegate_class.tab
===================================================================
--- trunk/bin/SubOperation/templates/delegate_class.tab	(revision 341)
+++ trunk/bin/SubOperation/templates/delegate_class.tab	(revision 342)
@@ -15,5 +15,9 @@
 			For i = 0 To ELM(simpleDelegates.Count)
 				Dim sd = simpleDelegates[i]
-				#result# __delegate_dynamicmethod_call(sd.methodPtr, sd.object, #params#)
+				If sd.hasThisPtr Then
+					#result# __delegate_dynamicmethod_call(sd.methodPtr, sd.object, #params#)
+				Else
+					#result# __delegate_staticmethod_call(sd.methodPtr, #params#)
+				End If
 			Next
 		'End Sub
@@ -30,9 +34,15 @@
 		End Function
 
-		Static Function _CreateDelegate( object As Object, methodPtr As VoidPtr ) As #name#
+		Static Function _CreateDynamicDelegate( object As Object, methodPtr As VoidPtr ) As #name#
 			Dim dg = New #name#
 			dg.simpleDelegates.Add( New System._SimpleDelegate( object, methodPtr ) )
 			Return dg
 		End Function
+
+		Static Function _CreateStaticDelegate( methodPtr As VoidPtr ) As #name#
+			Dim dg = New #name#
+			dg.simpleDelegates.Add( New System._SimpleDelegate( methodPtr ) )
+			Return dg
+		End Function
 	End Class
 #namespace_end#
