Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ----------------------------------------------------------------------------
- // <auto-generated>
- // This is autogenerated code by CppSharp.
- // Do not edit this file or all your changes will be lost after re-generation.
- // </auto-generated>
- // ----------------------------------------------------------------------------
- using System;
- using System.Runtime.InteropServices;
- using System.Security;
- namespace MIDIIO
- {
- public unsafe partial class TagMIDI : IDisposable
- {
- [StructLayout(LayoutKind.Explicit, Size = 56)]
- public partial struct __Internal
- {
- [FieldOffset(0)]
- internal global::System.IntPtr m_pDeviceHandle;
- [FieldOffset(4)]
- internal global::System.IntPtr m_pDeviceName;
- [FieldOffset(8)]
- internal int m_lMode;
- [FieldOffset(12)]
- internal void* m_pSysxHeader;
- [FieldOffset(28)]
- internal int m_bStarting;
- [FieldOffset(32)]
- internal global::System.IntPtr m_pBuf;
- [FieldOffset(36)]
- internal int m_lBufSize;
- [FieldOffset(40)]
- internal int m_lReadPosition;
- [FieldOffset(44)]
- internal int m_lWritePosition;
- [FieldOffset(48)]
- internal int m_bBufLocked;
- [FieldOffset(52)]
- internal byte m_byRunningStatus;
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
- EntryPoint="??0tagMIDI@@QAE@ABU0@@Z")]
- internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
- }
- public global::System.IntPtr __Instance { get; protected set; }
- protected int __PointerAdjustment;
- internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::MIDIIO.TagMIDI> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::MIDIIO.TagMIDI>();
- protected void*[] __OriginalVTables;
- protected bool __ownsNativeInstance;
- internal static global::MIDIIO.TagMIDI __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
- {
- return new global::MIDIIO.TagMIDI(native.ToPointer(), skipVTables);
- }
- internal static global::MIDIIO.TagMIDI __CreateInstance(global::MIDIIO.TagMIDI.__Internal native, bool skipVTables = false)
- {
- return new global::MIDIIO.TagMIDI(native, skipVTables);
- }
- private static void* __CopyValue(global::MIDIIO.TagMIDI.__Internal native)
- {
- var ret = Marshal.AllocHGlobal(sizeof(global::MIDIIO.TagMIDI.__Internal));
- *(global::MIDIIO.TagMIDI.__Internal*) ret = native;
- return ret.ToPointer();
- }
- private TagMIDI(global::MIDIIO.TagMIDI.__Internal native, bool skipVTables = false)
- : this(__CopyValue(native), skipVTables)
- {
- __ownsNativeInstance = true;
- NativeToManagedMap[__Instance] = this;
- }
- protected TagMIDI(void* native, bool skipVTables = false)
- {
- if (native == null)
- return;
- __Instance = new global::System.IntPtr(native);
- }
- public TagMIDI()
- {
- __Instance = Marshal.AllocHGlobal(sizeof(global::MIDIIO.TagMIDI.__Internal));
- __ownsNativeInstance = true;
- NativeToManagedMap[__Instance] = this;
- }
- public TagMIDI(global::MIDIIO.TagMIDI _0)
- {
- __Instance = Marshal.AllocHGlobal(sizeof(global::MIDIIO.TagMIDI.__Internal));
- __ownsNativeInstance = true;
- NativeToManagedMap[__Instance] = this;
- *((global::MIDIIO.TagMIDI.__Internal*) __Instance) = *((global::MIDIIO.TagMIDI.__Internal*) _0.__Instance);
- }
- public void Dispose()
- {
- Dispose(disposing: true);
- }
- public virtual void Dispose(bool disposing)
- {
- if (__Instance == IntPtr.Zero)
- return;
- global::MIDIIO.TagMIDI __dummy;
- NativeToManagedMap.TryRemove(__Instance, out __dummy);
- if (__ownsNativeInstance)
- Marshal.FreeHGlobal(__Instance);
- __Instance = IntPtr.Zero;
- }
- public global::System.IntPtr MPDeviceHandle
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pDeviceHandle;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pDeviceHandle = (global::System.IntPtr) value;
- }
- }
- public global::System.IntPtr MPDeviceName
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pDeviceName;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pDeviceName = (global::System.IntPtr) value;
- }
- }
- public int MLMode
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lMode;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lMode = value;
- }
- }
- private global::System.IntPtr[] __m_pSysxHeader;
- private bool __m_pSysxHeaderInitialised;
- public global::System.IntPtr[] MPSysxHeader
- {
- get
- {
- if (!__m_pSysxHeaderInitialised)
- {
- __m_pSysxHeader = null;
- __m_pSysxHeaderInitialised = true;
- }
- return __m_pSysxHeader;
- }
- set
- {
- __m_pSysxHeader = value;
- if (!__m_pSysxHeaderInitialised)
- {
- __m_pSysxHeaderInitialised = true;
- }
- }
- }
- public int MBStarting
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_bStarting;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_bStarting = value;
- }
- }
- public byte* MPBuf
- {
- get
- {
- return (byte*) ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pBuf;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pBuf = (global::System.IntPtr) value;
- }
- }
- public int MLBufSize
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lBufSize;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lBufSize = value;
- }
- }
- public int MLReadPosition
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lReadPosition;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lReadPosition = value;
- }
- }
- public int MLWritePosition
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lWritePosition;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lWritePosition = value;
- }
- }
- public int MBBufLocked
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_bBufLocked;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_bBufLocked = value;
- }
- }
- public byte MByRunningStatus
- {
- get
- {
- return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_byRunningStatus;
- }
- set
- {
- ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_byRunningStatus = value;
- }
- }
- }
- public unsafe partial class MIDIIO
- {
- public partial struct __Internal
- {
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_GetDeviceNum@0")]
- internal static extern int MIDIOutGetDeviceNum();
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_GetDeviceNameA@12")]
- internal static extern int MIDIOutGetDeviceNameA(int lID, sbyte* pszDeviceName, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_GetDeviceNameW@12")]
- internal static extern int MIDIOutGetDeviceNameW(int lID, char* pszDeviceName, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_OpenA@4")]
- internal static extern global::System.IntPtr MIDIOutOpenA([MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_OpenW@4")]
- internal static extern global::System.IntPtr MIDIOutOpenW([MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_Close@4")]
- internal static extern int MIDIOutClose(global::System.IntPtr pMIDIDevice);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_ReopenA@8")]
- internal static extern global::System.IntPtr MIDIOutReopenA(global::System.IntPtr pMIDIOut, [MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_ReopenW@8")]
- internal static extern global::System.IntPtr MIDIOutReopenW(global::System.IntPtr pMIDIOut, [MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_Reset@4")]
- internal static extern int MIDIOutReset(global::System.IntPtr pMIDIDevice);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_PutMIDIMessage@12")]
- internal static extern int MIDIOutPutMIDIMessage(global::System.IntPtr pMIDI, byte* pMessage, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_PutByte@8")]
- internal static extern int MIDIOutPutByte(global::System.IntPtr pMIDI, byte cByte);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_PutBytes@12")]
- internal static extern int MIDIOutPutBytes(global::System.IntPtr pMIDI, byte* pBuf, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_GetThisDeviceNameA@12")]
- internal static extern int MIDIOutGetThisDeviceNameA(global::System.IntPtr pMIDIOut, sbyte* pszDeviceName, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIOut_GetThisDeviceNameW@12")]
- internal static extern int MIDIOutGetThisDeviceNameW(global::System.IntPtr pMIDIOut, char* pszDeviceName, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_GetDeviceNum@0")]
- internal static extern int MIDIInGetDeviceNum();
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_GetDeviceNameA@12")]
- internal static extern int MIDIInGetDeviceNameA(int lID, sbyte* pszDeviceName, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_GetDeviceNameW@12")]
- internal static extern int MIDIInGetDeviceNameW(int lID, char* pszDeviceName, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_OpenA@4")]
- internal static extern global::System.IntPtr MIDIInOpenA([MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_OpenW@4")]
- internal static extern global::System.IntPtr MIDIInOpenW([MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_Close@4")]
- internal static extern int MIDIInClose(global::System.IntPtr pMIDIDevice);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_ReopenA@8")]
- internal static extern global::System.IntPtr MIDIInReopenA(global::System.IntPtr pMIDIIn, [MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_ReopenW@8")]
- internal static extern global::System.IntPtr MIDIInReopenW(global::System.IntPtr pMIDIIn, [MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_Reset@4")]
- internal static extern int MIDIInReset(global::System.IntPtr pMIDIDevice);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_GetMIDIMessage@12")]
- internal static extern int MIDIInGetMIDIMessage(global::System.IntPtr pMIDIIn, byte* pMessage, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_GetByte@8")]
- internal static extern int MIDIInGetByte(global::System.IntPtr pMIDIIn, byte* pByte);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_GetBytes@12")]
- internal static extern int MIDIInGetBytes(global::System.IntPtr pMIDIIn, byte* pBuf, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_GetThisDeviceNameA@12")]
- internal static extern int MIDIInGetThisDeviceNameA(global::System.IntPtr pMIDIIn, sbyte* pszDeviceName, int lLen);
- [SuppressUnmanagedCodeSecurity]
- [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
- EntryPoint="_MIDIIn_GetThisDeviceNameW@12")]
- internal static extern int MIDIInGetThisDeviceNameW(global::System.IntPtr pMIDIIn, char* pszDeviceName, int lLen);
- }
- public static int MIDIOutGetDeviceNum()
- {
- var __ret = __Internal.MIDIOutGetDeviceNum();
- return __ret;
- }
- public static int MIDIOutGetDeviceNameA(int lID, sbyte* pszDeviceName, int lLen)
- {
- var __ret = __Internal.MIDIOutGetDeviceNameA(lID, pszDeviceName, lLen);
- return __ret;
- }
- public static int MIDIOutGetDeviceNameW(int lID, char* pszDeviceName, int lLen)
- {
- var __ret = __Internal.MIDIOutGetDeviceNameW(lID, pszDeviceName, lLen);
- return __ret;
- }
- public static global::MIDIIO.TagMIDI MIDIOutOpenA(string pszDeviceName)
- {
- var __ret = __Internal.MIDIOutOpenA(pszDeviceName);
- global::MIDIIO.TagMIDI __result0;
- if (__ret == IntPtr.Zero) __result0 = null;
- else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
- __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
- else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
- return __result0;
- }
- public static global::MIDIIO.TagMIDI MIDIOutOpenW(string pszDeviceName)
- {
- var __ret = __Internal.MIDIOutOpenW(pszDeviceName);
- global::MIDIIO.TagMIDI __result0;
- if (__ret == IntPtr.Zero) __result0 = null;
- else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
- __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
- else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
- return __result0;
- }
- public static int MIDIOutClose(global::MIDIIO.TagMIDI pMIDIDevice)
- {
- var __arg0 = ReferenceEquals(pMIDIDevice, null) ? global::System.IntPtr.Zero : pMIDIDevice.__Instance;
- var __ret = __Internal.MIDIOutClose(__arg0);
- return __ret;
- }
- public static global::MIDIIO.TagMIDI MIDIOutReopenA(global::MIDIIO.TagMIDI pMIDIOut, string pszDeviceName)
- {
- var __arg0 = ReferenceEquals(pMIDIOut, null) ? global::System.IntPtr.Zero : pMIDIOut.__Instance;
- var __ret = __Internal.MIDIOutReopenA(__arg0, pszDeviceName);
- global::MIDIIO.TagMIDI __result0;
- if (__ret == IntPtr.Zero) __result0 = null;
- else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
- __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
- else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
- return __result0;
- }
- public static global::MIDIIO.TagMIDI MIDIOutReopenW(global::MIDIIO.TagMIDI pMIDIOut, string pszDeviceName)
- {
- var __arg0 = ReferenceEquals(pMIDIOut, null) ? global::System.IntPtr.Zero : pMIDIOut.__Instance;
- var __ret = __Internal.MIDIOutReopenW(__arg0, pszDeviceName);
- global::MIDIIO.TagMIDI __result0;
- if (__ret == IntPtr.Zero) __result0 = null;
- else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
- __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
- else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
- return __result0;
- }
- public static int MIDIOutReset(global::MIDIIO.TagMIDI pMIDIDevice)
- {
- var __arg0 = ReferenceEquals(pMIDIDevice, null) ? global::System.IntPtr.Zero : pMIDIDevice.__Instance;
- var __ret = __Internal.MIDIOutReset(__arg0);
- return __ret;
- }
- public static int MIDIOutPutMIDIMessage(global::MIDIIO.TagMIDI pMIDI, byte* pMessage, int lLen)
- {
- var __arg0 = ReferenceEquals(pMIDI, null) ? global::System.IntPtr.Zero : pMIDI.__Instance;
- var __ret = __Internal.MIDIOutPutMIDIMessage(__arg0, pMessage, lLen);
- return __ret;
- }
- public static int MIDIOutPutByte(global::MIDIIO.TagMIDI pMIDI, byte cByte)
- {
- var __arg0 = ReferenceEquals(pMIDI, null) ? global::System.IntPtr.Zero : pMIDI.__Instance;
- var __ret = __Internal.MIDIOutPutByte(__arg0, cByte);
- return __ret;
- }
- public static int MIDIOutPutBytes(global::MIDIIO.TagMIDI pMIDI, byte* pBuf, int lLen)
- {
- var __arg0 = ReferenceEquals(pMIDI, null) ? global::System.IntPtr.Zero : pMIDI.__Instance;
- var __ret = __Internal.MIDIOutPutBytes(__arg0, pBuf, lLen);
- return __ret;
- }
- public static int MIDIOutGetThisDeviceNameA(global::MIDIIO.TagMIDI pMIDIOut, sbyte* pszDeviceName, int lLen)
- {
- var __arg0 = ReferenceEquals(pMIDIOut, null) ? global::System.IntPtr.Zero : pMIDIOut.__Instance;
- var __ret = __Internal.MIDIOutGetThisDeviceNameA(__arg0, pszDeviceName, lLen);
- return __ret;
- }
- public static int MIDIOutGetThisDeviceNameW(global::MIDIIO.TagMIDI pMIDIOut, char* pszDeviceName, int lLen)
- {
- var __arg0 = ReferenceEquals(pMIDIOut, null) ? global::System.IntPtr.Zero : pMIDIOut.__Instance;
- var __ret = __Internal.MIDIOutGetThisDeviceNameW(__arg0, pszDeviceName, lLen);
- return __ret;
- }
- public static int MIDIInGetDeviceNum()
- {
- var __ret = __Internal.MIDIInGetDeviceNum();
- return __ret;
- }
- public static int MIDIInGetDeviceNameA(int lID, sbyte* pszDeviceName, int lLen)
- {
- var __ret = __Internal.MIDIInGetDeviceNameA(lID, pszDeviceName, lLen);
- return __ret;
- }
- public static int MIDIInGetDeviceNameW(int lID, char* pszDeviceName, int lLen)
- {
- var __ret = __Internal.MIDIInGetDeviceNameW(lID, pszDeviceName, lLen);
- return __ret;
- }
- public static global::MIDIIO.TagMIDI MIDIInOpenA(string pszDeviceName)
- {
- var __ret = __Internal.MIDIInOpenA(pszDeviceName);
- global::MIDIIO.TagMIDI __result0;
- if (__ret == IntPtr.Zero) __result0 = null;
- else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
- __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
- else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
- return __result0;
- }
- public static global::MIDIIO.TagMIDI MIDIInOpenW(string pszDeviceName)
- {
- var __ret = __Internal.MIDIInOpenW(pszDeviceName);
- global::MIDIIO.TagMIDI __result0;
- if (__ret == IntPtr.Zero) __result0 = null;
- else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
- __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
- else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
- return __result0;
- }
- public static int MIDIInClose(global::MIDIIO.TagMIDI pMIDIDevice)
- {
- var __arg0 = ReferenceEquals(pMIDIDevice, null) ? global::System.IntPtr.Zero : pMIDIDevice.__Instance;
- var __ret = __Internal.MIDIInClose(__arg0);
- return __ret;
- }
- public static global::MIDIIO.TagMIDI MIDIInReopenA(global::MIDIIO.TagMIDI pMIDIIn, string pszDeviceName)
- {
- var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
- var __ret = __Internal.MIDIInReopenA(__arg0, pszDeviceName);
- global::MIDIIO.TagMIDI __result0;
- if (__ret == IntPtr.Zero) __result0 = null;
- else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
- __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
- else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
- return __result0;
- }
- public static global::MIDIIO.TagMIDI MIDIInReopenW(global::MIDIIO.TagMIDI pMIDIIn, string pszDeviceName)
- {
- var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
- var __ret = __Internal.MIDIInReopenW(__arg0, pszDeviceName);
- global::MIDIIO.TagMIDI __result0;
- if (__ret == IntPtr.Zero) __result0 = null;
- else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
- __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
- else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
- return __result0;
- }
- public static int MIDIInReset(global::MIDIIO.TagMIDI pMIDIDevice)
- {
- var __arg0 = ReferenceEquals(pMIDIDevice, null) ? global::System.IntPtr.Zero : pMIDIDevice.__Instance;
- var __ret = __Internal.MIDIInReset(__arg0);
- return __ret;
- }
- public static int MIDIInGetMIDIMessage(global::MIDIIO.TagMIDI pMIDIIn, byte* pMessage, int lLen)
- {
- var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
- var __ret = __Internal.MIDIInGetMIDIMessage(__arg0, pMessage, lLen);
- return __ret;
- }
- public static int MIDIInGetByte(global::MIDIIO.TagMIDI pMIDIIn, byte* pByte)
- {
- var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
- var __ret = __Internal.MIDIInGetByte(__arg0, pByte);
- return __ret;
- }
- public static int MIDIInGetBytes(global::MIDIIO.TagMIDI pMIDIIn, byte* pBuf, int lLen)
- {
- var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
- var __ret = __Internal.MIDIInGetBytes(__arg0, pBuf, lLen);
- return __ret;
- }
- public static int MIDIInGetThisDeviceNameA(global::MIDIIO.TagMIDI pMIDIIn, sbyte* pszDeviceName, int lLen)
- {
- var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
- var __ret = __Internal.MIDIInGetThisDeviceNameA(__arg0, pszDeviceName, lLen);
- return __ret;
- }
- public static int MIDIInGetThisDeviceNameW(global::MIDIIO.TagMIDI pMIDIIn, char* pszDeviceName, int lLen)
- {
- var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
- var __ret = __Internal.MIDIInGetThisDeviceNameW(__arg0, pszDeviceName, lLen);
- return __ret;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement