|
|
using System; using System.Runtime.InteropServices; using System.Security;
namespace Apewer.Internals.Interop {
[SecuritySafeCritical] internal class WinMM {
#region WinMM
[DllImport("winmm.dll")] public static extern long mciGetCreatorTask(long wDeviceID);
[DllImport("winmm.dll")] public static extern long mciGetDeviceID(string lpstrName);
[DllImport("winmm.dll", SetLastError = true)] public static extern long mciSendString(string lpstrCommand, ref string lpstrReturnString, int uReturnLength, IntPtr hwndCallback);
[DllImport("WinMm.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)] public static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback);
[DllImport("winmm.dll", CharSet = CharSet.Auto)] public static extern IntPtr mmioOpen(string fileName, IntPtr not_used, int flags);
[DllImport("winmm.dll", CharSet = CharSet.Auto)] public static extern int mmioAscend(IntPtr hMIO, MMCKINFO lpck, int flags);
[DllImport("winmm.dll", CharSet = CharSet.Auto)] public static extern int mmioDescend(IntPtr hMIO, [MarshalAs(UnmanagedType.LPStruct)] MMCKINFO lpck, [MarshalAs(UnmanagedType.LPStruct)] MMCKINFO lcpkParent, int flags);
[DllImport("winmm.dll", CharSet = CharSet.Auto)] public static extern int mmioRead(IntPtr hMIO, [MarshalAs(UnmanagedType.LPArray)] byte[] wf, int cch);
[DllImport("winmm.dll", CharSet = CharSet.Auto)] public static extern int mmioClose(IntPtr hMIO, int flags);
[DllImport("winmm.dll", CharSet = CharSet.Auto, ExactSpelling = true)] public static extern bool PlaySound(byte[] soundName, IntPtr hmod, int soundFlags);
[DllImport("winmm.dll", CharSet = CharSet.Auto)] public static extern bool PlaySound([MarshalAs(UnmanagedType.LPWStr)] string soundName, IntPtr hmod, int soundFlags);
[DllImport("winmm.dll")] public static extern long sndPlaySound(string lpszSoundName, long uFlags);
#endregion
}
}
|