[问题] 请教DX一个C/C++和C#的Interoperability问题

sable93

资深人士
VIP
注册
2003-11-11
消息
1,222
荣誉分数
92
声望点数
208
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# doesn't support varargs so all arguments must be explicitly defined.
 
后退
顶部