Advertisement
Naohiro19

MIDIIOLib.dll for P/Invoke Wrapper using by CppSharp 0.8.17

Mar 22nd, 2018
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 28.58 KB | None | 0 0
  1. // ----------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This is autogenerated code by CppSharp.
  4. // Do not edit this file or all your changes will be lost after re-generation.
  5. // </auto-generated>
  6. // ----------------------------------------------------------------------------
  7. using System;
  8. using System.Runtime.InteropServices;
  9. using System.Security;
  10.  
  11. namespace MIDIIO
  12. {
  13.     public unsafe partial class TagMIDI : IDisposable
  14.     {
  15.         [StructLayout(LayoutKind.Explicit, Size = 56)]
  16.         public partial struct __Internal
  17.         {
  18.             [FieldOffset(0)]
  19.             internal global::System.IntPtr m_pDeviceHandle;
  20.  
  21.             [FieldOffset(4)]
  22.             internal global::System.IntPtr m_pDeviceName;
  23.  
  24.             [FieldOffset(8)]
  25.             internal int m_lMode;
  26.  
  27.             [FieldOffset(12)]
  28.             internal void* m_pSysxHeader;
  29.  
  30.             [FieldOffset(28)]
  31.             internal int m_bStarting;
  32.  
  33.             [FieldOffset(32)]
  34.             internal global::System.IntPtr m_pBuf;
  35.  
  36.             [FieldOffset(36)]
  37.             internal int m_lBufSize;
  38.  
  39.             [FieldOffset(40)]
  40.             internal int m_lReadPosition;
  41.  
  42.             [FieldOffset(44)]
  43.             internal int m_lWritePosition;
  44.  
  45.             [FieldOffset(48)]
  46.             internal int m_bBufLocked;
  47.  
  48.             [FieldOffset(52)]
  49.             internal byte m_byRunningStatus;
  50.  
  51.             [SuppressUnmanagedCodeSecurity]
  52.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
  53.                 EntryPoint="??0tagMIDI@@QAE@ABU0@@Z")]
  54.             internal static extern global::System.IntPtr cctor(global::System.IntPtr instance, global::System.IntPtr _0);
  55.         }
  56.  
  57.         public global::System.IntPtr __Instance { get; protected set; }
  58.  
  59.         protected int __PointerAdjustment;
  60.         internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::MIDIIO.TagMIDI> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::MIDIIO.TagMIDI>();
  61.         protected void*[] __OriginalVTables;
  62.  
  63.         protected bool __ownsNativeInstance;
  64.  
  65.         internal static global::MIDIIO.TagMIDI __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
  66.         {
  67.             return new global::MIDIIO.TagMIDI(native.ToPointer(), skipVTables);
  68.         }
  69.  
  70.         internal static global::MIDIIO.TagMIDI __CreateInstance(global::MIDIIO.TagMIDI.__Internal native, bool skipVTables = false)
  71.         {
  72.             return new global::MIDIIO.TagMIDI(native, skipVTables);
  73.         }
  74.  
  75.         private static void* __CopyValue(global::MIDIIO.TagMIDI.__Internal native)
  76.         {
  77.             var ret = Marshal.AllocHGlobal(sizeof(global::MIDIIO.TagMIDI.__Internal));
  78.             *(global::MIDIIO.TagMIDI.__Internal*) ret = native;
  79.             return ret.ToPointer();
  80.         }
  81.  
  82.         private TagMIDI(global::MIDIIO.TagMIDI.__Internal native, bool skipVTables = false)
  83.             : this(__CopyValue(native), skipVTables)
  84.         {
  85.             __ownsNativeInstance = true;
  86.             NativeToManagedMap[__Instance] = this;
  87.         }
  88.  
  89.         protected TagMIDI(void* native, bool skipVTables = false)
  90.         {
  91.             if (native == null)
  92.                 return;
  93.             __Instance = new global::System.IntPtr(native);
  94.         }
  95.  
  96.         public TagMIDI()
  97.         {
  98.             __Instance = Marshal.AllocHGlobal(sizeof(global::MIDIIO.TagMIDI.__Internal));
  99.             __ownsNativeInstance = true;
  100.             NativeToManagedMap[__Instance] = this;
  101.         }
  102.  
  103.         public TagMIDI(global::MIDIIO.TagMIDI _0)
  104.         {
  105.             __Instance = Marshal.AllocHGlobal(sizeof(global::MIDIIO.TagMIDI.__Internal));
  106.             __ownsNativeInstance = true;
  107.             NativeToManagedMap[__Instance] = this;
  108.             *((global::MIDIIO.TagMIDI.__Internal*) __Instance) = *((global::MIDIIO.TagMIDI.__Internal*) _0.__Instance);
  109.         }
  110.  
  111.         public void Dispose()
  112.         {
  113.             Dispose(disposing: true);
  114.         }
  115.  
  116.         public virtual void Dispose(bool disposing)
  117.         {
  118.             if (__Instance == IntPtr.Zero)
  119.                 return;
  120.             global::MIDIIO.TagMIDI __dummy;
  121.             NativeToManagedMap.TryRemove(__Instance, out __dummy);
  122.             if (__ownsNativeInstance)
  123.                 Marshal.FreeHGlobal(__Instance);
  124.             __Instance = IntPtr.Zero;
  125.         }
  126.  
  127.         public global::System.IntPtr MPDeviceHandle
  128.         {
  129.             get
  130.             {
  131.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pDeviceHandle;
  132.             }
  133.  
  134.             set
  135.             {
  136.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pDeviceHandle = (global::System.IntPtr) value;
  137.             }
  138.         }
  139.  
  140.         public global::System.IntPtr MPDeviceName
  141.         {
  142.             get
  143.             {
  144.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pDeviceName;
  145.             }
  146.  
  147.             set
  148.             {
  149.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pDeviceName = (global::System.IntPtr) value;
  150.             }
  151.         }
  152.  
  153.         public int MLMode
  154.         {
  155.             get
  156.             {
  157.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lMode;
  158.             }
  159.  
  160.             set
  161.             {
  162.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lMode = value;
  163.             }
  164.         }
  165.  
  166.         private global::System.IntPtr[] __m_pSysxHeader;
  167.  
  168.         private bool __m_pSysxHeaderInitialised;
  169.         public global::System.IntPtr[] MPSysxHeader
  170.         {
  171.             get
  172.             {
  173.                 if (!__m_pSysxHeaderInitialised)
  174.                 {
  175.                     __m_pSysxHeader = null;
  176.                     __m_pSysxHeaderInitialised = true;
  177.                 }
  178.                 return __m_pSysxHeader;
  179.             }
  180.  
  181.             set
  182.             {
  183.                 __m_pSysxHeader = value;
  184.                 if (!__m_pSysxHeaderInitialised)
  185.                 {
  186.                     __m_pSysxHeaderInitialised = true;
  187.                 }
  188.             }
  189.         }
  190.  
  191.         public int MBStarting
  192.         {
  193.             get
  194.             {
  195.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_bStarting;
  196.             }
  197.  
  198.             set
  199.             {
  200.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_bStarting = value;
  201.             }
  202.         }
  203.  
  204.         public byte* MPBuf
  205.         {
  206.             get
  207.             {
  208.                 return (byte*) ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pBuf;
  209.             }
  210.  
  211.             set
  212.             {
  213.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_pBuf = (global::System.IntPtr) value;
  214.             }
  215.         }
  216.  
  217.         public int MLBufSize
  218.         {
  219.             get
  220.             {
  221.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lBufSize;
  222.             }
  223.  
  224.             set
  225.             {
  226.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lBufSize = value;
  227.             }
  228.         }
  229.  
  230.         public int MLReadPosition
  231.         {
  232.             get
  233.             {
  234.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lReadPosition;
  235.             }
  236.  
  237.             set
  238.             {
  239.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lReadPosition = value;
  240.             }
  241.         }
  242.  
  243.         public int MLWritePosition
  244.         {
  245.             get
  246.             {
  247.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lWritePosition;
  248.             }
  249.  
  250.             set
  251.             {
  252.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_lWritePosition = value;
  253.             }
  254.         }
  255.  
  256.         public int MBBufLocked
  257.         {
  258.             get
  259.             {
  260.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_bBufLocked;
  261.             }
  262.  
  263.             set
  264.             {
  265.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_bBufLocked = value;
  266.             }
  267.         }
  268.  
  269.         public byte MByRunningStatus
  270.         {
  271.             get
  272.             {
  273.                 return ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_byRunningStatus;
  274.             }
  275.  
  276.             set
  277.             {
  278.                 ((global::MIDIIO.TagMIDI.__Internal*) __Instance)->m_byRunningStatus = value;
  279.             }
  280.         }
  281.     }
  282.  
  283.     public unsafe partial class MIDIIO
  284.     {
  285.         public partial struct __Internal
  286.         {
  287.             [SuppressUnmanagedCodeSecurity]
  288.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  289.                 EntryPoint="_MIDIOut_GetDeviceNum@0")]
  290.             internal static extern int MIDIOutGetDeviceNum();
  291.  
  292.             [SuppressUnmanagedCodeSecurity]
  293.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  294.                 EntryPoint="_MIDIOut_GetDeviceNameA@12")]
  295.             internal static extern int MIDIOutGetDeviceNameA(int lID, sbyte* pszDeviceName, int lLen);
  296.  
  297.             [SuppressUnmanagedCodeSecurity]
  298.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  299.                 EntryPoint="_MIDIOut_GetDeviceNameW@12")]
  300.             internal static extern int MIDIOutGetDeviceNameW(int lID, char* pszDeviceName, int lLen);
  301.  
  302.             [SuppressUnmanagedCodeSecurity]
  303.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  304.                 EntryPoint="_MIDIOut_OpenA@4")]
  305.             internal static extern global::System.IntPtr MIDIOutOpenA([MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
  306.  
  307.             [SuppressUnmanagedCodeSecurity]
  308.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  309.                 EntryPoint="_MIDIOut_OpenW@4")]
  310.             internal static extern global::System.IntPtr MIDIOutOpenW([MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
  311.  
  312.             [SuppressUnmanagedCodeSecurity]
  313.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  314.                 EntryPoint="_MIDIOut_Close@4")]
  315.             internal static extern int MIDIOutClose(global::System.IntPtr pMIDIDevice);
  316.  
  317.             [SuppressUnmanagedCodeSecurity]
  318.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  319.                 EntryPoint="_MIDIOut_ReopenA@8")]
  320.             internal static extern global::System.IntPtr MIDIOutReopenA(global::System.IntPtr pMIDIOut, [MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
  321.  
  322.             [SuppressUnmanagedCodeSecurity]
  323.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  324.                 EntryPoint="_MIDIOut_ReopenW@8")]
  325.             internal static extern global::System.IntPtr MIDIOutReopenW(global::System.IntPtr pMIDIOut, [MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
  326.  
  327.             [SuppressUnmanagedCodeSecurity]
  328.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  329.                 EntryPoint="_MIDIOut_Reset@4")]
  330.             internal static extern int MIDIOutReset(global::System.IntPtr pMIDIDevice);
  331.  
  332.             [SuppressUnmanagedCodeSecurity]
  333.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  334.                 EntryPoint="_MIDIOut_PutMIDIMessage@12")]
  335.             internal static extern int MIDIOutPutMIDIMessage(global::System.IntPtr pMIDI, byte* pMessage, int lLen);
  336.  
  337.             [SuppressUnmanagedCodeSecurity]
  338.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  339.                 EntryPoint="_MIDIOut_PutByte@8")]
  340.             internal static extern int MIDIOutPutByte(global::System.IntPtr pMIDI, byte cByte);
  341.  
  342.             [SuppressUnmanagedCodeSecurity]
  343.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  344.                 EntryPoint="_MIDIOut_PutBytes@12")]
  345.             internal static extern int MIDIOutPutBytes(global::System.IntPtr pMIDI, byte* pBuf, int lLen);
  346.  
  347.             [SuppressUnmanagedCodeSecurity]
  348.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  349.                 EntryPoint="_MIDIOut_GetThisDeviceNameA@12")]
  350.             internal static extern int MIDIOutGetThisDeviceNameA(global::System.IntPtr pMIDIOut, sbyte* pszDeviceName, int lLen);
  351.  
  352.             [SuppressUnmanagedCodeSecurity]
  353.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  354.                 EntryPoint="_MIDIOut_GetThisDeviceNameW@12")]
  355.             internal static extern int MIDIOutGetThisDeviceNameW(global::System.IntPtr pMIDIOut, char* pszDeviceName, int lLen);
  356.  
  357.             [SuppressUnmanagedCodeSecurity]
  358.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  359.                 EntryPoint="_MIDIIn_GetDeviceNum@0")]
  360.             internal static extern int MIDIInGetDeviceNum();
  361.  
  362.             [SuppressUnmanagedCodeSecurity]
  363.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  364.                 EntryPoint="_MIDIIn_GetDeviceNameA@12")]
  365.             internal static extern int MIDIInGetDeviceNameA(int lID, sbyte* pszDeviceName, int lLen);
  366.  
  367.             [SuppressUnmanagedCodeSecurity]
  368.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  369.                 EntryPoint="_MIDIIn_GetDeviceNameW@12")]
  370.             internal static extern int MIDIInGetDeviceNameW(int lID, char* pszDeviceName, int lLen);
  371.  
  372.             [SuppressUnmanagedCodeSecurity]
  373.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  374.                 EntryPoint="_MIDIIn_OpenA@4")]
  375.             internal static extern global::System.IntPtr MIDIInOpenA([MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
  376.  
  377.             [SuppressUnmanagedCodeSecurity]
  378.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  379.                 EntryPoint="_MIDIIn_OpenW@4")]
  380.             internal static extern global::System.IntPtr MIDIInOpenW([MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
  381.  
  382.             [SuppressUnmanagedCodeSecurity]
  383.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  384.                 EntryPoint="_MIDIIn_Close@4")]
  385.             internal static extern int MIDIInClose(global::System.IntPtr pMIDIDevice);
  386.  
  387.             [SuppressUnmanagedCodeSecurity]
  388.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  389.                 EntryPoint="_MIDIIn_ReopenA@8")]
  390.             internal static extern global::System.IntPtr MIDIInReopenA(global::System.IntPtr pMIDIIn, [MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
  391.  
  392.             [SuppressUnmanagedCodeSecurity]
  393.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  394.                 EntryPoint="_MIDIIn_ReopenW@8")]
  395.             internal static extern global::System.IntPtr MIDIInReopenW(global::System.IntPtr pMIDIIn, [MarshalAs(UnmanagedType.LPStr)] string pszDeviceName);
  396.  
  397.             [SuppressUnmanagedCodeSecurity]
  398.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  399.                 EntryPoint="_MIDIIn_Reset@4")]
  400.             internal static extern int MIDIInReset(global::System.IntPtr pMIDIDevice);
  401.  
  402.             [SuppressUnmanagedCodeSecurity]
  403.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  404.                 EntryPoint="_MIDIIn_GetMIDIMessage@12")]
  405.             internal static extern int MIDIInGetMIDIMessage(global::System.IntPtr pMIDIIn, byte* pMessage, int lLen);
  406.  
  407.             [SuppressUnmanagedCodeSecurity]
  408.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  409.                 EntryPoint="_MIDIIn_GetByte@8")]
  410.             internal static extern int MIDIInGetByte(global::System.IntPtr pMIDIIn, byte* pByte);
  411.  
  412.             [SuppressUnmanagedCodeSecurity]
  413.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  414.                 EntryPoint="_MIDIIn_GetBytes@12")]
  415.             internal static extern int MIDIInGetBytes(global::System.IntPtr pMIDIIn, byte* pBuf, int lLen);
  416.  
  417.             [SuppressUnmanagedCodeSecurity]
  418.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  419.                 EntryPoint="_MIDIIn_GetThisDeviceNameA@12")]
  420.             internal static extern int MIDIInGetThisDeviceNameA(global::System.IntPtr pMIDIIn, sbyte* pszDeviceName, int lLen);
  421.  
  422.             [SuppressUnmanagedCodeSecurity]
  423.             [DllImport("MIDIIO", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.StdCall,
  424.                 EntryPoint="_MIDIIn_GetThisDeviceNameW@12")]
  425.             internal static extern int MIDIInGetThisDeviceNameW(global::System.IntPtr pMIDIIn, char* pszDeviceName, int lLen);
  426.         }
  427.  
  428.         public static int MIDIOutGetDeviceNum()
  429.         {
  430.             var __ret = __Internal.MIDIOutGetDeviceNum();
  431.             return __ret;
  432.         }
  433.  
  434.         public static int MIDIOutGetDeviceNameA(int lID, sbyte* pszDeviceName, int lLen)
  435.         {
  436.             var __ret = __Internal.MIDIOutGetDeviceNameA(lID, pszDeviceName, lLen);
  437.             return __ret;
  438.         }
  439.  
  440.         public static int MIDIOutGetDeviceNameW(int lID, char* pszDeviceName, int lLen)
  441.         {
  442.             var __ret = __Internal.MIDIOutGetDeviceNameW(lID, pszDeviceName, lLen);
  443.             return __ret;
  444.         }
  445.  
  446.         public static global::MIDIIO.TagMIDI MIDIOutOpenA(string pszDeviceName)
  447.         {
  448.             var __ret = __Internal.MIDIOutOpenA(pszDeviceName);
  449.             global::MIDIIO.TagMIDI __result0;
  450.             if (__ret == IntPtr.Zero) __result0 = null;
  451.             else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
  452.                 __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
  453.             else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
  454.             return __result0;
  455.         }
  456.  
  457.         public static global::MIDIIO.TagMIDI MIDIOutOpenW(string pszDeviceName)
  458.         {
  459.             var __ret = __Internal.MIDIOutOpenW(pszDeviceName);
  460.             global::MIDIIO.TagMIDI __result0;
  461.             if (__ret == IntPtr.Zero) __result0 = null;
  462.             else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
  463.                 __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
  464.             else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
  465.             return __result0;
  466.         }
  467.  
  468.         public static int MIDIOutClose(global::MIDIIO.TagMIDI pMIDIDevice)
  469.         {
  470.             var __arg0 = ReferenceEquals(pMIDIDevice, null) ? global::System.IntPtr.Zero : pMIDIDevice.__Instance;
  471.             var __ret = __Internal.MIDIOutClose(__arg0);
  472.             return __ret;
  473.         }
  474.  
  475.         public static global::MIDIIO.TagMIDI MIDIOutReopenA(global::MIDIIO.TagMIDI pMIDIOut, string pszDeviceName)
  476.         {
  477.             var __arg0 = ReferenceEquals(pMIDIOut, null) ? global::System.IntPtr.Zero : pMIDIOut.__Instance;
  478.             var __ret = __Internal.MIDIOutReopenA(__arg0, pszDeviceName);
  479.             global::MIDIIO.TagMIDI __result0;
  480.             if (__ret == IntPtr.Zero) __result0 = null;
  481.             else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
  482.                 __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
  483.             else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
  484.             return __result0;
  485.         }
  486.  
  487.         public static global::MIDIIO.TagMIDI MIDIOutReopenW(global::MIDIIO.TagMIDI pMIDIOut, string pszDeviceName)
  488.         {
  489.             var __arg0 = ReferenceEquals(pMIDIOut, null) ? global::System.IntPtr.Zero : pMIDIOut.__Instance;
  490.             var __ret = __Internal.MIDIOutReopenW(__arg0, pszDeviceName);
  491.             global::MIDIIO.TagMIDI __result0;
  492.             if (__ret == IntPtr.Zero) __result0 = null;
  493.             else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
  494.                 __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
  495.             else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
  496.             return __result0;
  497.         }
  498.  
  499.         public static int MIDIOutReset(global::MIDIIO.TagMIDI pMIDIDevice)
  500.         {
  501.             var __arg0 = ReferenceEquals(pMIDIDevice, null) ? global::System.IntPtr.Zero : pMIDIDevice.__Instance;
  502.             var __ret = __Internal.MIDIOutReset(__arg0);
  503.             return __ret;
  504.         }
  505.  
  506.         public static int MIDIOutPutMIDIMessage(global::MIDIIO.TagMIDI pMIDI, byte* pMessage, int lLen)
  507.         {
  508.             var __arg0 = ReferenceEquals(pMIDI, null) ? global::System.IntPtr.Zero : pMIDI.__Instance;
  509.             var __ret = __Internal.MIDIOutPutMIDIMessage(__arg0, pMessage, lLen);
  510.             return __ret;
  511.         }
  512.  
  513.         public static int MIDIOutPutByte(global::MIDIIO.TagMIDI pMIDI, byte cByte)
  514.         {
  515.             var __arg0 = ReferenceEquals(pMIDI, null) ? global::System.IntPtr.Zero : pMIDI.__Instance;
  516.             var __ret = __Internal.MIDIOutPutByte(__arg0, cByte);
  517.             return __ret;
  518.         }
  519.  
  520.         public static int MIDIOutPutBytes(global::MIDIIO.TagMIDI pMIDI, byte* pBuf, int lLen)
  521.         {
  522.             var __arg0 = ReferenceEquals(pMIDI, null) ? global::System.IntPtr.Zero : pMIDI.__Instance;
  523.             var __ret = __Internal.MIDIOutPutBytes(__arg0, pBuf, lLen);
  524.             return __ret;
  525.         }
  526.  
  527.         public static int MIDIOutGetThisDeviceNameA(global::MIDIIO.TagMIDI pMIDIOut, sbyte* pszDeviceName, int lLen)
  528.         {
  529.             var __arg0 = ReferenceEquals(pMIDIOut, null) ? global::System.IntPtr.Zero : pMIDIOut.__Instance;
  530.             var __ret = __Internal.MIDIOutGetThisDeviceNameA(__arg0, pszDeviceName, lLen);
  531.             return __ret;
  532.         }
  533.  
  534.         public static int MIDIOutGetThisDeviceNameW(global::MIDIIO.TagMIDI pMIDIOut, char* pszDeviceName, int lLen)
  535.         {
  536.             var __arg0 = ReferenceEquals(pMIDIOut, null) ? global::System.IntPtr.Zero : pMIDIOut.__Instance;
  537.             var __ret = __Internal.MIDIOutGetThisDeviceNameW(__arg0, pszDeviceName, lLen);
  538.             return __ret;
  539.         }
  540.  
  541.         public static int MIDIInGetDeviceNum()
  542.         {
  543.             var __ret = __Internal.MIDIInGetDeviceNum();
  544.             return __ret;
  545.         }
  546.  
  547.         public static int MIDIInGetDeviceNameA(int lID, sbyte* pszDeviceName, int lLen)
  548.         {
  549.             var __ret = __Internal.MIDIInGetDeviceNameA(lID, pszDeviceName, lLen);
  550.             return __ret;
  551.         }
  552.  
  553.         public static int MIDIInGetDeviceNameW(int lID, char* pszDeviceName, int lLen)
  554.         {
  555.             var __ret = __Internal.MIDIInGetDeviceNameW(lID, pszDeviceName, lLen);
  556.             return __ret;
  557.         }
  558.  
  559.         public static global::MIDIIO.TagMIDI MIDIInOpenA(string pszDeviceName)
  560.         {
  561.             var __ret = __Internal.MIDIInOpenA(pszDeviceName);
  562.             global::MIDIIO.TagMIDI __result0;
  563.             if (__ret == IntPtr.Zero) __result0 = null;
  564.             else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
  565.                 __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
  566.             else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
  567.             return __result0;
  568.         }
  569.  
  570.         public static global::MIDIIO.TagMIDI MIDIInOpenW(string pszDeviceName)
  571.         {
  572.             var __ret = __Internal.MIDIInOpenW(pszDeviceName);
  573.             global::MIDIIO.TagMIDI __result0;
  574.             if (__ret == IntPtr.Zero) __result0 = null;
  575.             else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
  576.                 __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
  577.             else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
  578.             return __result0;
  579.         }
  580.  
  581.         public static int MIDIInClose(global::MIDIIO.TagMIDI pMIDIDevice)
  582.         {
  583.             var __arg0 = ReferenceEquals(pMIDIDevice, null) ? global::System.IntPtr.Zero : pMIDIDevice.__Instance;
  584.             var __ret = __Internal.MIDIInClose(__arg0);
  585.             return __ret;
  586.         }
  587.  
  588.         public static global::MIDIIO.TagMIDI MIDIInReopenA(global::MIDIIO.TagMIDI pMIDIIn, string pszDeviceName)
  589.         {
  590.             var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
  591.             var __ret = __Internal.MIDIInReopenA(__arg0, pszDeviceName);
  592.             global::MIDIIO.TagMIDI __result0;
  593.             if (__ret == IntPtr.Zero) __result0 = null;
  594.             else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
  595.                 __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
  596.             else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
  597.             return __result0;
  598.         }
  599.  
  600.         public static global::MIDIIO.TagMIDI MIDIInReopenW(global::MIDIIO.TagMIDI pMIDIIn, string pszDeviceName)
  601.         {
  602.             var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
  603.             var __ret = __Internal.MIDIInReopenW(__arg0, pszDeviceName);
  604.             global::MIDIIO.TagMIDI __result0;
  605.             if (__ret == IntPtr.Zero) __result0 = null;
  606.             else if (global::MIDIIO.TagMIDI.NativeToManagedMap.ContainsKey(__ret))
  607.                 __result0 = (global::MIDIIO.TagMIDI) global::MIDIIO.TagMIDI.NativeToManagedMap[__ret];
  608.             else __result0 = global::MIDIIO.TagMIDI.__CreateInstance(__ret);
  609.             return __result0;
  610.         }
  611.  
  612.         public static int MIDIInReset(global::MIDIIO.TagMIDI pMIDIDevice)
  613.         {
  614.             var __arg0 = ReferenceEquals(pMIDIDevice, null) ? global::System.IntPtr.Zero : pMIDIDevice.__Instance;
  615.             var __ret = __Internal.MIDIInReset(__arg0);
  616.             return __ret;
  617.         }
  618.  
  619.         public static int MIDIInGetMIDIMessage(global::MIDIIO.TagMIDI pMIDIIn, byte* pMessage, int lLen)
  620.         {
  621.             var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
  622.             var __ret = __Internal.MIDIInGetMIDIMessage(__arg0, pMessage, lLen);
  623.             return __ret;
  624.         }
  625.  
  626.         public static int MIDIInGetByte(global::MIDIIO.TagMIDI pMIDIIn, byte* pByte)
  627.         {
  628.             var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
  629.             var __ret = __Internal.MIDIInGetByte(__arg0, pByte);
  630.             return __ret;
  631.         }
  632.  
  633.         public static int MIDIInGetBytes(global::MIDIIO.TagMIDI pMIDIIn, byte* pBuf, int lLen)
  634.         {
  635.             var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
  636.             var __ret = __Internal.MIDIInGetBytes(__arg0, pBuf, lLen);
  637.             return __ret;
  638.         }
  639.  
  640.         public static int MIDIInGetThisDeviceNameA(global::MIDIIO.TagMIDI pMIDIIn, sbyte* pszDeviceName, int lLen)
  641.         {
  642.             var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
  643.             var __ret = __Internal.MIDIInGetThisDeviceNameA(__arg0, pszDeviceName, lLen);
  644.             return __ret;
  645.         }
  646.  
  647.         public static int MIDIInGetThisDeviceNameW(global::MIDIIO.TagMIDI pMIDIIn, char* pszDeviceName, int lLen)
  648.         {
  649.             var __arg0 = ReferenceEquals(pMIDIIn, null) ? global::System.IntPtr.Zero : pMIDIIn.__Instance;
  650.             var __ret = __Internal.MIDIInGetThisDeviceNameW(__arg0, pszDeviceName, lLen);
  651.             return __ret;
  652.         }
  653.     }
  654. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement