using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Interop.NmxAdptr; [ComImport] [TypeLibType(TypeLibTypeFlags.FCanCreate)] [Guid("AE24BD51-2E80-44CC-905B-E5446C942BEB")] [ClassInterface(ClassInterfaceType.None)] public class NmxServiceClass : INmxService2, NmxService, INmxService, INmxSvcStatistics, INmxStatus { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void RegisterEngine([In] int lEngineID, [In][MarshalAs(UnmanagedType.BStr)] string bstrEngineName, [In][MarshalAs(UnmanagedType.Interface)] INmxSvcCallback pNmxCallback); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void UnRegisterEngine([In] int lEngineID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void Connect([In] int lLocalEngineID, [In] int lRemoteGalaxyID, [In] int lRemotePlatformID, [In] int lRemoteEngineID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void TransferData([In] int lRemoteGalaxyID, [In] int lRemotePlatformID, [In] int lRemoteEngineID, [In] int lSize, [In] ref byte pMsgBody); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void AddSubscriberEngine([In] int lLocalEngineID, [In] int lSubscriberGalaxyID, [In] int lSubscriberPlatformID, [In] int lSubscriberEngineID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void RemoveSubscriberEngine([In] int lLocalEngineID, [In] int lSubscriberGalaxyID, [In] int lSubscriberPlatformID, [In] int lSubscriberEngineID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void SetHeartbeatSendInterval([In] int lTicksPerBeat, [In] int lMaxMissedTicks); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void RegisterEngine2([In] int lEngineID, [In][MarshalAs(UnmanagedType.BStr)] string bstrEngineName, [In] int lVersion, [In][MarshalAs(UnmanagedType.Interface)] INmxSvcCallback pCallback); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void GetPartnerVersion([In] int lGalaxyID, [In] int lPlatformID, [In] int lEngineID, out int plVersion); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void INmxService_RegisterEngine([In] int lEngineID, [In][MarshalAs(UnmanagedType.BStr)] string bstrEngineName, [In][MarshalAs(UnmanagedType.Interface)] INmxSvcCallback pNmxCallback); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void INmxService_UnRegisterEngine([In] int lEngineID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void INmxService_Connect([In] int lLocalEngineID, [In] int lRemoteGalaxyID, [In] int lRemotePlatformID, [In] int lRemoteEngineID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void INmxService_TransferData([In] int lRemoteGalaxyID, [In] int lRemotePlatformID, [In] int lRemoteEngineID, [In] int lSize, [In] ref byte pMsgBody); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void INmxService_AddSubscriberEngine([In] int lLocalEngineID, [In] int lSubscriberGalaxyID, [In] int lSubscriberPlatformID, [In] int lSubscriberEngineID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void INmxService_RemoveSubscriberEngine([In] int lLocalEngineID, [In] int lSubscriberGalaxyID, [In] int lSubscriberPlatformID, [In] int lSubscriberEngineID); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void INmxService_SetHeartbeatSendInterval([In] int lTicksPerBeat, [In] int lMaxMissedTicks); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void GetNmxSvcStatistics(out tagNmxSvcStatsInfo pNmxSvcStats); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void ResetSvcStatistics(); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void OPENCONNECTION([In] int lPlatformID, [In][MarshalAs(UnmanagedType.Interface)] INmxNotify pNotify, [In] int lReference, [In] int lProcessId, out int plCookie, out tagNmxSvcConnectionStatus peStatus); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void CloseConnection([In] int lCookie, out tagNmxSvcConnectionStatus peStatus); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] public virtual extern void GetConnectionStatus([In] int lPlatformID, out tagNmxSvcConnectionStatus peConnState); }