Fix warnings in mscorlib's Test suite + bring a couple more tests + fix thread rename...
[mono.git] / mcs / class / corlib / System.Runtime.InteropServices / Marshal.cs
index a66a8dc7ae222b5a49ceca16ac8e6f8334b2c474..e339f94955ad4463ee6de55a20d018c6b0157cd2 100644 (file)
@@ -581,6 +581,13 @@ namespace System.Runtime.InteropServices
                        throw new NotImplementedException ();
                }
 
+#if NET_4_5
+               public static Type GetTypeFromCLSID (Guid clsid)
+               {
+                       throw new NotImplementedException ();                   
+               }
+#endif
+
 #if !FULL_AOT_RUNTIME
                [Obsolete]
                [MonoTODO]
@@ -747,8 +754,8 @@ namespace System.Runtime.InteropServices
                        PtrToStructure (ptr, (object)structure);
                }
 
-               public static object PtrToStructure<T> (IntPtr ptr) {
-                       return PtrToStructure (ptr, typeof (T));
+               public static T PtrToStructure<T> (IntPtr ptr) {
+                       return (T) PtrToStructure (ptr, typeof (T));
                }
 #endif
 
@@ -1354,8 +1361,8 @@ namespace System.Runtime.InteropServices
                }
 
 #if NET_4_5
-               public static Delegate GetDelegateForFunctionPointer<T> (IntPtr ptr) {
-                       return GetDelegateForFunctionPointer (ptr, typeof (T));
+               public static TDelegate GetDelegateForFunctionPointer<TDelegate> (IntPtr ptr) {
+                       return (TDelegate) (object) GetDelegateForFunctionPointer (ptr, typeof (TDelegate));
                }
 #endif