-
Notifications
You must be signed in to change notification settings - Fork 428
Marshal type #18
Comments
1. Remove TypeLib APIs as they aren't needed or compatible (see #2). 2. Remove System.Runtime.Interop.ComTypes namespace as it is only COM interfaces and structs which aren't applicable to all OS's and we can easily make that a compat library as needed. 3. Removed all obsolete structs that were also in ComTypes. 4. Marshal type was sub-setted to match what Xamarin exposeds (see #18).
1. Remove TypeLib APIs as they aren't needed or compatible (see #2). 2. Remove System.Runtime.Interop.ComTypes namespace as it is only COM interfaces and structs which aren't applicable to all OS's and we can easily make that a compat library as needed. 3. Removed all obsolete structs that were also in ComTypes. 4. Marshal type was sub-setted to match what Xamarin exposeds (see #18).
Another set of interesting APIs on Marshal to consider are the SecureString marshalling APIs. public static System.IntPtr SecureStringToBSTR(System.Security.SecureString s) { throw null; }
public static System.IntPtr SecureStringToCoTaskMemAnsi(System.Security.SecureString s) { throw null; }
public static System.IntPtr SecureStringToCoTaskMemUnicode(System.Security.SecureString s) { throw null; }
public static System.IntPtr SecureStringToGlobalAllocAnsi(System.Security.SecureString s) { throw null; }
public static System.IntPtr SecureStringToGlobalAllocUnicode(System.Security.SecureString s) { throw null; } For .NET Core we have SecureString implemeneted as a standalone library and have introduced SecureStringMarshal (https://github.com/dotnet/corefx/blob/master/src/System.Security.SecureString/ref/System.Security.SecureString.cs#L26) to break this dependency. To help support this factoriziation I'm thinking we will remove the SecureString APIs from Marshal. |
See details at #18. For people that need these they should use SecureStringMarshal type instead. Currently that isn't part of netstandard but should work on any platform.
We should look at usage from NuGet and APIPort to see whether any APIs are affected that have high usage. Our current goal is parity with Xamarin; so we don't need them. However we also want to make porting from .NET FX to .NET Core easier. So I'd say: let's make sure we don't cut highly used ones. Those, we should ask Xamarin to add and throw, if they can't implement it. We should add the methods on |
@terrajobst @weshaggard @yizhang82 Here is Marshal.SecureString usage stat |
Reverted the SecureString Marshal removals with 8fc5b7f. |
The Marshal type currently has lot members which are related to COM and other things which are missing in Xamarin:
We need to decide whether or not we add these to the netstandard or if we make people that want to use them cross-compile to .NET Framework?
cc @yizhang82 @tijoytom
The text was updated successfully, but these errors were encountered: