导入:
using System.Runtime.InteropServices;
/*导入C++动态库*/
public partial class ImportDLL
{
[DllImport(@"F:\XXX\bin\x86\Debug\DVPCamera.dll", EntryPoint = "dvpGetLineRate", CallingConvention = CallingConvention.Cdecl)]
public static extern dvpStatus dvpGetLineRate(uint handle, ref uint pLineRate);
[DllImport(@"F:\XXX\bin\x86\Debug\DVPCamera.dll", EntryPoint = "dvpSetLineRate", CallingConvention = CallingConvention.Cdecl)]
public static extern dvpStatus dvpSetLineRate(uint handle, double LineRate);
[DllImport(@"F:\XXX\bin\x86\Debug\DVPCamera.dll", EntryPoint = "dvpGetConfigString", CallingConvention = CallingConvention.Cdecl)]
public static extern dvpStatus dvpGetConfigString(uint dvpHandle, string canshu1, string canshu2);
[DllImport(@"F:\XXX\bin\x86\Debug\DVPCamera.dll", EntryPoint = "dvpSetConfigString", CallingConvention = CallingConvention.Cdecl)]
public static extern dvpStatus dvpSetConfigString(uint dvpHandle, string canshu1, string canshu2);
}
调用:
ImportDLL.dvpSetLineRate(m_Handle,LR);