使用System.Runtime.InteropServices.Marshal.PtrToStructure(IntPtr变量, Struct类型),如:
// DATASTRUCT为struct类型名
// lParam为IntPtr类型的变量
DATASTRUCT myStr = (DATASTRUCT)Marshal.PtrToStructure(lParam, typeof(DATASTRUCT));
标签:IntPtr,Struct,lParam,C#,DATASTRUCT,PtrToStructure From: https://www.cnblogs.com/qq2806933146xiaobai/p/16954798.html