日期:2014-05-18 浏览次数:20779 次
C中代码:
void read( char *filename ) { ....... }
[DllImport("myC.dll", EntryPoint = "read", CharSet = CharSet.Auto)] public static extern void read(ref byte filename);调用示例:
string name = @"d:\result\Gaussian_6_0.3.jpg"; byte[] filename = new byte[100]; for (int i = 0; i < name.Length; i++) { filename[i] = (byte)name[i]; } liblept168.read(ref filename[0]);