代码: [DllImport("MapLicenseXP.dll")] public static extern bool WriteMapLicenseCode(char[] a, Byte[] b, int c); private void button8_Click(object sender, EventArgs e) { string aa = "E:\\NET程序\\开发\\DataManage\\Map.ext"; Byte [] b = new byte[512]; char[] a = aa.ToCharArray(); int c = 512; if (WriteMapLicenseCode(a, b, c)) { MessageBox.Show("T"); } }
public static extern bool WriteMapLicenseCode(char[] a, Byte[] b, int c); private void button8_Click(object sender, EventArgs e)
{
string aa = "E:\\NET程序\\开发\\DataManage\\Map.ext";
Byte [] b = new byte[512];
char[] a = aa.ToCharArray();
int c = 512;
if (WriteMapLicenseCode(a, b, c))
{
MessageBox.Show("T");
}
}
MAPLICENSE_API bool WriteMapLicenseCode(TCHAR * pszMapFile, BYTE * pbyCode, int nCodeLen);
谢谢各位!
a,b的类型不对。