using System; using System.Runtime.InteropServices; using TDMS.Common; namespace TDMS.Externals { internal partial class DDC : DIAdemConnectivity { /// /// 获取指定文件中的通道组数量。 /// /// 文件 /// 指定文件中通道组的数量 [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetNumChannelGroups")] public static extern Error CountChannelGroups(IntPtr file, out uint numChannelGroups); /// /// 获取指定文件中的通道组。 /// /// 文件 /// 通道组的数组缓冲区 /// 通道组数量 /// 是否成功。除非另有说明,否则零表示执行成功,负数表示错误代码。 [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetChannelGroups")] public static extern Error GetChannelGroups(IntPtr file, IntPtr[] channelGroupsBuffer, uint numberOfChannelGroups); [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetNumChannels")] public static extern Error CountChannels(IntPtr channelGroup, out uint numChannels); [DllImport(DLL, CallingConvention = CallingConvention.StdCall, EntryPoint = "DDC_GetChannels")] public static extern Error GetChannels(IntPtr channelGroup, IntPtr[] channelsBuf, uint numChannels); } }