尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
C   申明 
 extern    "C "   BOOL   SMEILIB_DECLSPEC   SendMsg(IN   LPCTSTR   sMsgContent,    
                                                                                                                            IN   int   nMsgLength,    
                                                                                                                            IN   LPCTSTR   sSrcAddr,    
                                                                                                                            IN   LPCTSTR   sDestAddr,    
 										   IN   LPCTSTR   sAtTime,    
 										   IN   LPCTSTR   sValidTime);   
 偶在   C#   中的申明 
 [System.Runtime.InteropServices.DllImport(__DllFileName,   EntryPoint   =    "SendMsg ")] 
 public   static   extern   bool   SendMsg(string   content,   short   length,   string   srcAddr,   string   destAddr,   string   atTime,   string   validTime);   
 注:__DllFileName   是常量,DLL   文件名。   
 问题:C#   调用出错,错误信息是“尝试读取或写入受保护的内存。这通常指示其他内存已损坏”。
------解决方案--------------------恭喜楼主解决了问题