using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Interop.NmxAdptr; [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("4422DBBC-3714-487C-81A4-CBA3B3E981A5")] public interface IFMC { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void Initialize([In] int lPlatformID, [In] int lCookie, [In][MarshalAs(UnmanagedType.BStr)] string bstrAddress, [In] int lPort, [In][MarshalAs(UnmanagedType.Interface)] IFMCCallback pCallback, [In][MarshalAs(UnmanagedType.BStr)] string bstrMulticastGroup, [In] int lMultiCastPort = 5001); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void RequestConnection([In] int lSize, [In] ref byte pMsgBody); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void Connect([In][MarshalAs(UnmanagedType.BStr)] string bstrPartnerIP, [In] int lPartnerPort, [In] int lPlatformID, [In] int timeToWaitForConnection = 500); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SendData([In] int lPlatformID, [In] int lMessageID, [In][ComAliasName("Interop.NmxAdptr.ActionTypes")] ActionTypes usType, [In] int lSize, [In] ref byte pMsgBody, [In] int dwTimeOut = 0); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UnInitialize(); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void DisConnect([In] int lPlatformID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void ConnectEx([In][MarshalAs(UnmanagedType.BStr)] string bstrPartnerIP, [In] int lPartnerPort, [In] int timeToWaitForConnection); }