using System;
using System.Collections.Generic;
using System.Windows.Forms;
//[structlayout(layoutkind.sequential)]
public struct hscan_msg
{

    // unmanagedtype.byvalarray， [marshalas(unmanagedtype.u1)]这个非常重要，就是申明对应类型和长度的

   // [marshalas(unmanagedtype.u1)]

    public byte port;

   // [marshalas(unmanagedtype.u4)]

    public uint nid;

   // [marshalas(unmanagedtype.u1)]

    public byte nctrl;

   // [marshalas(unmanagedtype.byvalarray, sizeconst = 8)]

    public char[] pdata;

};
namespace MSRDemo
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            Application.Run(new Form1());
        }
    }
}