参考:
http://www.cnblogs.com/liping13599168/archive/2011/03/31/2000320.html
Platform Invoke Tutorial:https://msdn.microsoft.com/en-us/library/aa288468(VS.71).aspx#pinvoke_callingdllexport
http://www.cnblogs.com/warensoft/archive/2011/12/09/warenosoft3d.html
1:基本类型对照表
C/C++ |
C# |
长度 |
short |
short |
2Bytes |
int |
int |
4Bytes |
long(该类型在传递的时候常常会弄混) |
int |
4Bytes |
bool |
bool |
1Byte |
char(Ascii码字符) |
byte |
1Byte |
wchar_t(Unicode字符,该类型与C#中的Char兼容) |
char |
2Bytes |
float |
float |
4Bytes |
double |
double |
8Bytes |