C#调用DLL文件时参数对应表 C#调用DLL文件时参数对应表 Wtypes.h 中的非托管类型非托管 C 语言类型托管类名说明HANDLEvoid*System.IntPtr32 位BYTEunsigned charSystem.Byte8 位SHORTshortSystem.Int1616 位WORDunsigned shortSystem.UInt1616 位INTintSystem.Int3232 位UINTunsigned intSystem.UInt3232 位LONGlongSystem.Int3232 位BOOLlongSystem.Int3232 位DWORDunsigned longSystem.UInt3232 位ULONGunsigned longSystem.UInt3232 位CHARcharSystem.Char用 ANSI 修饰。LPSTRchar*System.String 或 System.StringBuilder用 ANSI 修饰。LPCSTRConst char*System.String 或 System.StringBuilder用 ANSI 修饰。LPWSTRwchar_t*System.String 或 System.StringBuilder用 Unicode 修饰。LPCWSTRConst wchar_t*System.String 或 System.StringBuilder用 Unicode 修饰。FLOATFloatSystem.Single32 位DOUBLEDoubleSystem.Double64 位