sable93 资深人士 VIP 注册 2003-11-11 消息 1,222 荣誉分数 92 声望点数 208 2006-03-18 #1 C里有sprintf,怎样在C#调用它。 for example, C DLL: MyDll.dll Function: MySPrintf(char *buf, char *format, [argument], ...) C#: [DllImport("MyDll.dll")] static extern int MySPrintf([In, Out] byte[] buf, byte [] format, ??); 这后面的怎么说明?
C里有sprintf,怎样在C#调用它。 for example, C DLL: MyDll.dll Function: MySPrintf(char *buf, char *format, [argument], ...) C#: [DllImport("MyDll.dll")] static extern int MySPrintf([In, Out] byte[] buf, byte [] format, ??); 这后面的怎么说明?
CXO 资深人士 VIP 注册 2005-11-19 消息 1,585 荣誉分数 216 声望点数 223 2006-03-19 #2 // C# doesn't support varargs so all arguments must be explicitly defined.