#else
public static bool IsComObject (object o)
{
- throw new PlatformNotSupportedException ();
+ return false;
}
#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static string PtrToStringUni (IntPtr ptr, int len);
-#if !MOBILE
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static string PtrToStringBSTR (IntPtr ptr);
-#else
- public static string PtrToStringBSTR (IntPtr ptr)
- {
- throw new NotImplementedException ();
- }
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[ComVisible (true)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- public extern static IntPtr BufferToBSTR (Array ptr, int slen);
+ extern static IntPtr BufferToBSTR (Array ptr, int slen);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr UnsafeAddrOfPinnedArrayElement (Array arr, int index);
{
}
+#if FEATURE_COMINTEROP || MONO_COM
// Copied from referencesource/mscorlib/system/runtime/interopservices/marshal.cs
//====================================================================
// return the raw IUnknown* for a COM Object not related to current
//========================================================================
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal static extern object GetNativeActivationFactory(Type type);
+#else
+ internal static IntPtr /* IUnknown* */ GetRawIUnknownForComObjectNoAddRef(Object o) {
+ throw new NotSupportedException();
+ }
+
+ internal static int GetHRForException_WinRT(Exception e) {
+ throw new NotSupportedException();
+ }
+
+ internal static object GetNativeActivationFactory(Type type) {
+ throw new NotSupportedException();
+ }
+#endif
}
}