拜求调用C的Dll 在 C#中的写法
C 函数接口如下:
#ifdef __cplusplus
extern "C" {
#endif
/*
参数:
char *pStrIn[in]
long lLenIn[in]
char *pStrOut[out]
long *lLenOut[in,out]
*/
CS_BASEEN_API int BaseEn(char *pStrIn, long lLenIn, char *pStrOut, long *lLenOut);
[DllImport(@"BaseEn.dll")]
protected static extern int BaseEn(string pStrIn, int BaudRate, ref string pStrOut, ref int lLenOut);
[DllImport(@"BaseEn.dll",CallingConvention= CallingConvention.Cdecl)]
protected static extern int BaseEn(string pStrIn, long BaudRate, string pStrOut, ref long lLenOut);