托管与托管数据类型之间的转换
typedef   struct   _LPR_RESULT 
 { 
 	struct   _LPR_RESULT*   pNext;		//头,下一个识别结果的指针   
 	char	license[16];			//车牌 
 	char	color[8];				//颜色 
 	int		nColor; 
 	int		type;	//车牌类型			 
 	int		reliability;		//整牌可信度 
 	RECT	location;			//车牌在整个图像中的位置 
 	int		bright;			//亮度评价   
 	int		msDecode;			//解码图片的时间 
 	int		msDetect;			//车牌检测的时间 
 	int		msLocate;			//定位的时间 
 	int		msRecognise;		//识别的时间 
 	int		msEncode;			//压缩生成图片的时间  	 
 	LPBYTE	pBits;	//整车图片 
 	int		cbBits;	//整车图片图片的大小			DWORD	dwReserved[61];			//保留 
 }LPR_RESULT;   
 typedef   struct   tagRECT 
 { 
             LONG            left; 
             LONG            top; 
             LONG            right; 
             LONG            bottom; 
 }   RECT   
 有这样两个数据结构要转化为C#中托管的数据为型,关键问题是 
    1.   
       LPR_RESULT 结构中的成员   struct   _LPR_RESULT*   pNext;该如何转化,      
    2   .内存 
          LRP_RESULT   结构中的成员   LPBYTE	pBits;   表示一个内存块,该如何转换(在C#) 
------解决方案--------------------帮你顶
------解决方案--------------------1.   
   LPR_RESULT 结构中的成员 struct _LPR_RESULT* pNext;该如何转化,   
 _LPR_RESULT在C#中定义成类就可以了。类是引用类型,封送到非托管内存就是指针了。   
 2 .内存 
    LRP_RESULT 结构中的成员 LPBYTE	pBits; 表示一个内存块,该如何转换(在C#)   
 你可以在C#中直接申请一块非托管内存或用Byte数组实现。
------解决方案--------------------up
------解决方案--------------------//看看这样可以吗 
 public struct LPR_RESULT 
 { 
     IntPtr pNext; //头,下一个识别结果的指针 
     [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] 
     char[] license;			//车牌 
     [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] 
     char[] color;				//颜色 
     int nColor; 
     int type;	//车牌类型			 
     int reliability;		//整牌可信度 
     RECT location;			//车牌在整个图像中的位置 
     int bright;			//亮度评价   
     int msDecode;			//解码图片的时间 
     int msDetect;			//车牌检测的时间 
     int msLocate;			//定位的时间 
     int msRecognise;		//识别的时间 
     int msEncode;			//压缩生成图片的时间   
     IntPtr pBits; //整车图片 
     int cbBits; //整车图片图片的大小			 
     [MarshalAs(UnmanagedType.ByValArray, SizeConst = 61)] 
     uint []	dwReserved;			//保留 
 }; 
------解决方案--------------------转换好像在MSDN上就有,里面有详细的叙述
------解决方案--------------------[MarshalAs(UnmanagedType.ByValArray, SizeConst = 61)]   
 改成: 
 [MarshalAs( UnmanagedType.LPArray)]   
 因为非托管是指针类型的!
------解决方案--------------------UP