C# Dllimport的问题
VB中调用了一个dll 我想把它翻译成C#语言原句是Declare Function pci7508check Lib "pci7508.dll" (ByVal dwVendorID%, ByVal dwDeviceID%, ByVal fUseInt As Boolean, ByVal cardNO%) As Long
我翻译的是
[DllImport("pci7508.dll"]
public static extern intPtr pci7508check(?,?,bool fUseInt,?);
我的问题是
原句中的ByVal dwVendorID%,ByVal dwDeviceID%,该怎么翻译??? --------------------编程问答-------------------- [DllImport("pci7508.dll"]
public static extern IntPtr pci7508check(uint uiVendorID,uint uiDeviceID,bool fUseInt,long cardNO);
(如果你的ByVal dwVendorID%, ByVal dwDeviceID%都是DWORD的话) --------------------编程问答-------------------- [DllImport("pci7508.dll")]
public static extern IntPtr pci7508check(short uiVendorID,short uiDeviceID,bool fUseInt,short cardNO);
VB里面%结尾的是16位整数
补充:.NET技术 , C#