原型:
int  WINAPI CNGPSendSingle( 
   int nNeedReport,
   int nMsgLevel,
   const char* sServiceID, //[11]: this stands for the string has 11B space;
   int nMsgFormat,
   const char* sFeeType, //[3]
   const char* sFeeCode, //[7]
   int nFeeUserType, //[7]
   const char* sValidTime, //[18]
   const char* sAtTime, //[18]
   const char* sChargeTermID, //[22]
   const char* sDestTermID, //[22]
   int nMsgLen,
   const char* sMsgContent,
   char* sMsgID, //[11]
   int* pnErrorCode,
   BYTE* pnCongestionState,
   int nSubType, //[2]
   const char* sSrcTermID //[22]
   );c#声明:
[DllImport("CNGPDll.dll", EntryPoint = "CNGPSendSingle", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        unsafe public  static extern int CNGPSendSingle( 
 int nNeedReport,
   int nMsgLevel,
                    string sServiceID, //[11]: this stands for the string has 11B space;
   int nMsgFormat,
                  string sFeeType, //[3]
                   string sFeeCode, //[7]
   int nFeeUserType, //[7]
                   string sValidTime, //[18]
                   string sAtTime, //[18]
                   string sChargeTermID, //[22]
                   string sDestTermID, //[22]
   int nMsgLen,
                 string sMsgContent,
                  ref string sMsgID, //[11]
                   ref int pnErrorCode,
                   ref byte pnCongestionState,
   int nSubType, //[2]
                   string sSrcTermID //[22]
   );
测试调用:CNGPSendSingle(1, 1, "XXXX", 0, "0", "10", 0, null, null, "232342342342", "232342342342", msgContent.Length, msgContent, ref msgID, ref errCode, ref pnCs, 0, "132123123");这样提示错误,弄得很迷茫。望高手帮忙调整一下