forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into darc-master-b26a5f18-f603-49aa-822a-9931db…
…e2063d Commit migrated from dotnet/corefx@1ac555f
- Loading branch information
Showing
71 changed files
with
6,647 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/libraries/Common/src/Interop/Windows/user32/Interop.MessageBeep.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Runtime.InteropServices; | ||
|
||
internal partial class Interop | ||
{ | ||
internal partial class User32 | ||
{ | ||
internal const int MB_OK = 0; | ||
internal const int MB_ICONHAND = 0x10; | ||
internal const int MB_ICONQUESTION = 0x20; | ||
internal const int MB_ICONEXCLAMATION = 0x30; | ||
internal const int MB_ICONASTERISK = 0x40; | ||
|
||
[DllImport(Libraries.User32, ExactSpelling = true)] | ||
internal static extern bool MessageBeep(int type); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/libraries/Common/src/Interop/Windows/winmm/Interop.MMCKINFO.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class WinMM | ||
{ | ||
[StructLayout(LayoutKind.Sequential)] | ||
internal class MMCKINFO | ||
{ | ||
internal int ckID; | ||
internal int cksize; | ||
internal int fccType; | ||
internal int dwDataOffset; | ||
internal int dwFlags; | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/libraries/Common/src/Interop/Windows/winmm/Interop.PlaySound.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class WinMM | ||
{ | ||
internal const int SND_SYNC = 0x0; | ||
internal const int SND_ASYNC = 0x1; | ||
internal const int SND_NODEFAULT = 0x2; | ||
internal const int SND_MEMORY = 0x4; | ||
internal const int SND_LOOP = 0x8; | ||
internal const int SND_PURGE = 0x40; | ||
internal const int SND_FILENAME = 0x20000; | ||
internal const int SND_NOSTOP = 0x10; | ||
|
||
[DllImport(Libraries.WinMM, ExactSpelling = true, CharSet = CharSet.Unicode, EntryPoint = "PlaySoundW")] | ||
internal static extern bool PlaySound(string soundName, IntPtr hmod, int soundFlags); | ||
|
||
[DllImport(Libraries.WinMM, ExactSpelling = true, EntryPoint = "PlaySoundW")] | ||
internal static extern bool PlaySound(byte[] soundName, IntPtr hmod, int soundFlags); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/libraries/Common/src/Interop/Windows/winmm/Interop.mmioAscend.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class WinMM | ||
{ | ||
[DllImport(Libraries.WinMM)] | ||
internal static extern int mmioAscend(IntPtr hMIO, MMCKINFO lpck, int flags); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/libraries/Common/src/Interop/Windows/winmm/Interop.mmioClose.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class WinMM | ||
{ | ||
[DllImport(Interop.Libraries.WinMM)] | ||
internal static extern int mmioClose(IntPtr hMIO, int flags); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/libraries/Common/src/Interop/Windows/winmm/Interop.mmioDescend.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class WinMM | ||
{ | ||
internal const int MMIO_FINDRIFF = 0x00000020; | ||
|
||
[DllImport(Libraries.WinMM)] | ||
internal static extern int mmioDescend(IntPtr hMIO, | ||
[MarshalAs(UnmanagedType.LPStruct)] MMCKINFO lpck, | ||
[MarshalAs(UnmanagedType.LPStruct)] MMCKINFO lcpkParent, | ||
int flags); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/libraries/Common/src/Interop/Windows/winmm/Interop.mmioOpen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class WinMM | ||
{ | ||
internal const int MMIO_READ = 0x00000000; | ||
internal const int MMIO_ALLOCBUF = 0x00010000; | ||
|
||
[DllImport(Libraries.WinMM, CharSet = CharSet.Auto)] | ||
internal static extern IntPtr mmioOpen(string fileName, IntPtr not_used, int flags); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/libraries/Common/src/Interop/Windows/winmm/Interop.mmioRead.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class WinMM | ||
{ | ||
[StructLayout(LayoutKind.Sequential)] | ||
internal class WAVEFORMATEX | ||
{ | ||
internal short wFormatTag; | ||
internal short nChannels; | ||
internal int nSamplesPerSec; | ||
internal int nAvgBytesPerSec; | ||
internal short nBlockAlign; | ||
internal short wBitsPerSample; | ||
internal short cbSize; | ||
} | ||
|
||
internal const int WAVE_FORMAT_PCM = 0x0001; | ||
internal const int WAVE_FORMAT_ADPCM = 0x0002; | ||
internal const int WAVE_FORMAT_IEEE_FLOAT = 0x0003; | ||
|
||
[DllImport(Libraries.WinMM)] | ||
internal static extern int mmioRead(IntPtr hMIO, [MarshalAs(UnmanagedType.LPArray)] byte[] wf, int cch); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.