summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2015-10-09 08:21:00 -0400
committerStephen Toub <stoub@microsoft.com>2015-10-09 08:21:00 -0400
commita717bb49a6e45f162367dcb303eb94eafb7491e5 (patch)
tree2d2c56a43779a28516e80c149a665035f3fd4649 /src
parent3a0f23d6308b396bf135ce586bfd23fc31f3a83d (diff)
parente25567bf1f2ecd0ecde6dcffc29c519fa941d3c7 (diff)
downloadcoreclr-a717bb49a6e45f162367dcb303eb94eafb7491e5.tar.gz
coreclr-a717bb49a6e45f162367dcb303eb94eafb7491e5.tar.bz2
coreclr-a717bb49a6e45f162367dcb303eb94eafb7491e5.zip
Merge pull request #1719 from stephentoub/sb_direction
Add [Out] to a couple of StringBuilders in DllImports
Diffstat (limited to 'src')
-rw-r--r--src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs2
-rw-r--r--src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Locale.cs6
-rw-r--r--src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs2
-rw-r--r--src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs b/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs
index f0b63b6c7f..43dd500319 100644
--- a/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs
+++ b/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Calendar.cs
@@ -18,7 +18,7 @@ internal static partial class Interop
internal static extern int GetCalendars(string localeName, CalendarId[] calendars, int calendarsCapacity);
[DllImport(Libraries.GlobalizationInterop, CharSet = CharSet.Unicode)]
- internal static extern CalendarDataResult GetCalendarInfo(string localeName, CalendarId calendarId, CalendarDataType calendarDataType, StringBuilder result, int resultCapacity);
+ internal static extern CalendarDataResult GetCalendarInfo(string localeName, CalendarId calendarId, CalendarDataType calendarDataType, [Out] StringBuilder result, int resultCapacity);
[DllImport(Libraries.GlobalizationInterop, CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
diff --git a/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Locale.cs b/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Locale.cs
index d719a421cf..e8dfe739a0 100644
--- a/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Locale.cs
+++ b/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.Locale.cs
@@ -11,15 +11,15 @@ internal static partial class Interop
{
[DllImport(Libraries.GlobalizationInterop, CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal unsafe static extern bool GetLocaleName(string localeName, StringBuilder value, int valueLength);
+ internal unsafe static extern bool GetLocaleName(string localeName, [Out] StringBuilder value, int valueLength);
[DllImport(Libraries.GlobalizationInterop, CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal unsafe static extern bool GetLocaleInfoString(string localeName, uint localeStringData, StringBuilder value, int valueLength);
+ internal unsafe static extern bool GetLocaleInfoString(string localeName, uint localeStringData, [Out] StringBuilder value, int valueLength);
[DllImport(Libraries.GlobalizationInterop, CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal unsafe static extern bool GetLocaleTimeFormat(string localeName, bool shortFormat, StringBuilder value, int valueLength);
+ internal unsafe static extern bool GetLocaleTimeFormat(string localeName, bool shortFormat, [Out] StringBuilder value, int valueLength);
[DllImport(Libraries.GlobalizationInterop, CharSet = CharSet.Unicode)]
[return: MarshalAs(UnmanagedType.Bool)]
diff --git a/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs b/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs
index 40389848fd..98829b6d91 100644
--- a/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs
+++ b/src/mscorlib/corefx/Interop/Unix/System.Globalization.Native/Interop.TimeZoneInfo.cs
@@ -10,6 +10,6 @@ internal static partial class Interop
{
[DllImport(Libraries.GlobalizationInterop, CharSet = CharSet.Ansi)] // readlink requires char*
[return: MarshalAs(UnmanagedType.Bool)]
- internal static extern bool ReadLink(string filePath, StringBuilder result, uint resultCapacity);
+ internal static extern bool ReadLink(string filePath, [Out] StringBuilder result, uint resultCapacity);
}
}
diff --git a/src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs b/src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs
index 624f8aa18b..fdd06e2914 100644
--- a/src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs
+++ b/src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs
@@ -45,14 +45,14 @@ namespace Microsoft.Win32 {
[MarshalAs(UnmanagedType.LPWStr)]
StringBuilder language,
ref int languageLength,
- [MarshalAs(UnmanagedType.LPWStr)]
+ [Out, MarshalAs(UnmanagedType.LPWStr)]
StringBuilder fileMuiPath,
ref int fileMuiPathLength,
ref Int64 enumerator);
[DllImport(Win32Native.USER32, EntryPoint="LoadStringW", SetLastError=true, CharSet=CharSet.Unicode, ExactSpelling=true, CallingConvention=CallingConvention.StdCall)]
- internal static extern int LoadString(SafeLibraryHandle handle, int id, StringBuilder buffer, int bufferLength);
+ internal static extern int LoadString(SafeLibraryHandle handle, int id, [Out] StringBuilder buffer, int bufferLength);
[DllImport(Win32Native.KERNEL32, CharSet=System.Runtime.InteropServices.CharSet.Unicode, SetLastError=true)]
internal static extern SafeLibraryHandle LoadLibraryEx(string libFilename, IntPtr reserved, int flags);