summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2018-03-19 19:08:34 +0100
committerJan Kotas <jkotas@microsoft.com>2018-03-19 14:08:10 -0700
commit4b4611b9dd8001de7748878734ee4926c262af5d (patch)
tree81df65070d64426d976646bec82f3f70502b8619
parentd3b818787748f09e63106b9b08d7bd6f5cd171bb (diff)
downloadcoreclr-4b4611b9dd8001de7748878734ee4926c262af5d.tar.gz
coreclr-4b4611b9dd8001de7748878734ee4926c262af5d.tar.bz2
coreclr-4b4611b9dd8001de7748878734ee4926c262af5d.zip
Fix ProjectN build break and work around MCG bug (dotnet/corert#5576)
Unblocks integration to TFS. Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
-rw-r--r--src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs2
-rw-r--r--src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs5
-rw-r--r--src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs12
-rw-r--r--src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempPathW.cs11
4 files changed, 27 insertions, 3 deletions
diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs
index e64129b1cb..2f3aad85cc 100644
--- a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs
+++ b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs
@@ -21,7 +21,7 @@ internal partial class Interop
{
fixed (char* pBuffer = &lpBuffer)
fixed (char* pFileName = &lpFileName)
- return GetFullPathNameW(pFileName, nBufferLength, pBuffer, mustBeZero);
+ return GetFullPathNameW(pFileName, nBufferLength, pBuffer, lpFilePart);
}
#else
internal static extern uint GetFullPathNameW(ref char lpFileName, uint nBufferLength, ref char lpBuffer, IntPtr lpFilePart);
diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs
index 09e98d0c95..ef8fd36aa1 100644
--- a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs
+++ b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs
@@ -14,13 +14,14 @@ internal partial class Interop
/// </summary>
[DllImport(Libraries.Kernel32, SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false, ExactSpelling = true)]
#if PROJECTN
- internal static extern unsafe uint GetLongPathNameW(ref char lpszShortPath, char* lpszLongPath, uint cchBuffer);
+ internal static extern unsafe uint GetLongPathNameW(char* lpszShortPath, char* lpszLongPath, uint cchBuffer);
// Works around https://devdiv.visualstudio.com/web/wi.aspx?pcguid=011b8bdf-6d56-4f87-be0d-0092136884d9&id=575202
internal static unsafe uint GetLongPathNameW(ref char lpszShortPath, ref char lpszLongPath, uint cchBuffer)
{
fixed (char* plpszLongPath = &lpszLongPath)
- return GetLongPathNameW(ref lpszShortPath, plpszLongPath, cchBuffer);
+ fixed (char* plpszShortPath = &lpszShortPath)
+ return GetLongPathNameW(plpszShortPath, plpszLongPath, cchBuffer);
}
#else
internal static extern uint GetLongPathNameW(ref char lpszShortPath, ref char lpszLongPath, uint cchBuffer);
diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs
index 97e1d82847..92da88c5df 100644
--- a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs
+++ b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempFileNameW.cs
@@ -9,6 +9,18 @@ internal partial class Interop
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, SetLastError = true, BestFitMapping = false)]
+#if PROJECTN
+ internal static extern unsafe uint GetTempFileNameW(char* lpPathName, string lpPrefixString, uint uUnique, char* lpTempFileName);
+
+ // Works around https://devdiv.visualstudio.com/web/wi.aspx?pcguid=011b8bdf-6d56-4f87-be0d-0092136884d9&id=575202
+ internal static unsafe uint GetTempFileNameW(ref char lpPathName, string lpPrefixString, uint uUnique, ref char lpTempFileName)
+ {
+ fixed (char* plpPathName = &lpPathName)
+ fixed (char* plpTempFileName = &lpTempFileName)
+ return GetTempFileNameW(plpPathName, lpPrefixString, uUnique, plpTempFileName);
+ }
+#else
internal static extern uint GetTempFileNameW(ref char lpPathName, string lpPrefixString, uint uUnique, ref char lpTempFileName);
+#endif
}
}
diff --git a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempPathW.cs b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempPathW.cs
index 7f7bb775c8..19dbae346b 100644
--- a/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempPathW.cs
+++ b/src/mscorlib/shared/Interop/Windows/Kernel32/Interop.GetTempPathW.cs
@@ -9,6 +9,17 @@ internal partial class Interop
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, BestFitMapping = false)]
+#if PROJECTN
+ internal static extern unsafe uint GetTempPathW(int bufferLen, char* buffer);
+
+ // Works around https://devdiv.visualstudio.com/web/wi.aspx?pcguid=011b8bdf-6d56-4f87-be0d-0092136884d9&id=575202
+ internal static unsafe uint GetTempPathW(int bufferLen, ref char buffer)
+ {
+ fixed (char* pbuffer = &buffer)
+ return GetTempPathW(bufferLen, pbuffer);
+ }
+#else
internal static extern uint GetTempPathW(int bufferLen, ref char buffer);
+#endif
}
}