[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 4)]
public struct TC_INI_TYPE
{
public short wCardNo;
public short wCardType;
public short wConnect;
public short wIRQ;
[System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 32)]
public char[] cbDir;
[System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 32)]
public short[] wAddress;
public short wMajorVer;
public short wMinorVer;
[System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 32)]
public short[] wChType;
}
You might also want to change the value of Pack based on what you need.
For GetSysInfo, follow these steps:
[DllImport("")]
private static extern void GetSysInfo([In,Out] ref TC_INI_TYPE tcIniType);
source
share