using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Interop.NmxAdptr; [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("CC49CA43-D8CB-11D3-823B-00104B5F96A7")] public interface IMxUserConnection { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] int UserRegisterReference([In][MarshalAs(UnmanagedType.Interface)] MxReference pMxReference, [In] bool IsIndirect, [In] bool IsReadable, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback, [In] int userData); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UserUnregisterReference([In] int hRef); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] [return: MarshalAs(UnmanagedType.Interface)] MxValue UserGetAttribute([In] int hRef, out short pMxDataQuality, out MxStatus pMxStatus, [MarshalAs(UnmanagedType.BStr)] out string pStatusDescription); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void UserSetAttribute([In] int hRef, [In][MarshalAs(UnmanagedType.Interface)] MxValue pMxValue, [In] ref VBGUID userId, [In] ref VBGUID verifier, [In] bool userVerified, [In][MarshalAs(UnmanagedType.LPWStr)] string sourceName, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] [return: MarshalAs(UnmanagedType.BStr)] string UserGetQualityDescription([In] ref short mxDataQuality); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] int UserRegisterPreboundReference([In] int preboundReferenceHandle, [In][MarshalAs(UnmanagedType.Interface)] IMxCallback pMxCallback, [In] int userData); }