X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Reflection%2FMonoMethod.cs;h=a7c66597453323b962c65be5b41c476855ed0453;hb=8dc7ac94b76782c2453c8b7258b3eeda8cec7709;hp=111387296cedafea98868ca522b631c8ff3bfdbe;hpb=381708c6cd7a339c51800ea786881f6474214d5a;p=mono.git diff --git a/mcs/class/corlib/System.Reflection/MonoMethod.cs b/mcs/class/corlib/System.Reflection/MonoMethod.cs index 111387296ce..a7c66597453 100644 --- a/mcs/class/corlib/System.Reflection/MonoMethod.cs +++ b/mcs/class/corlib/System.Reflection/MonoMethod.cs @@ -382,7 +382,7 @@ namespace System.Reflection { } [MethodImplAttribute(MethodImplOptions.InternalCall)] - internal static extern DllImportAttribute GetDllImportAttribute (IntPtr mhandle); + internal extern void GetPInvoke (out PInvokeAttributes flags, out string entryPoint, out string dllName); internal object[] GetPseudoCustomAttributes () { @@ -404,10 +404,7 @@ namespace System.Reflection { if ((info.iattrs & MethodImplAttributes.PreserveSig) != 0) attrs [count ++] = new PreserveSigAttribute (); if ((info.attrs & MethodAttributes.PinvokeImpl) != 0) { - DllImportAttribute attr = GetDllImportAttribute (mhandle); - if ((info.iattrs & MethodImplAttributes.PreserveSig) != 0) - attr.PreserveSig = true; - attrs [count ++] = attr; + attrs [count ++] = DllImportAttribute.GetCustomAttribute (this); } return attrs;