用c#写个发短消息的成,用调用dll函数,函数调用参数如下所示:
// SendShortMessage发送短消息,返回值为int
//send_number:目标手机号码字符串
// send_msg:发送内容字符串
// sm_param_temp:短消息参数
//若返回0,则表示发送成功
   
VC++:
int SendShortMessage(const char* send_number,const char* send_msg,SM_PARAM  *sm_param_temp)
 
  其中SM_PARAM如下所示:   
  typedef struct {
char SCA[16]; // 短消息服务中心号码(SMSC地址)
char TPA[16]; // 目标号码或回复号码(TP-DA或TP-RA)
char TP_PID; // 用户信息协议标识(TP-PID)
char TP_DCS; // 用户信息编码方式(TP-DCS)
char TP_SCTS[16]; // 服务时间戳字符串(TP_SCTS), 接收时用到
char TP_UD[161]; // 原始用户信息(编码前或解码后的TP-UD)
char index; // 短消息序号,在读取时用到
} SM_PARAM;  我在   C#中要想调用   SendShortMessage这个函数的话  
   结构我是这么写的 
  [StructLayout(LayoutKind.Sequential)]
        struct SM_PARAM
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
            public char[] SCA;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
            public char[] TPA;
            public char TP_PID;
            public char TP_DCS;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
            public char[] TP_SCTS;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 161)]
            public char[] TP_UD;
            public char index;
        }  
 /////发送消息的代码是这么写的
  SM_PARAM sm_param_temp = new SM_PARAM();
      string m_strNumber = this.tb_dh.Text.Trim();
    string m_strContent = this.tb_message.Text.Trim();    int nResult = SendShortMessage(m_strNumber, m_strContent,sm_param_temp);
程序运行总是保:尝试读取或写入受保护的内存。这通常指示其他内存已损坏 这个错误,请问这个结构体要怎么声明, SM_PARAM该怎么初始化赋值,然后   
  怎样作为参数传进SendShortMessage函数呢