小编Gab*_*her的帖子

C#安全例外

运行此程序时,我一直收到错误:出现类型为"System.Security.SecurityException"的未处理异常附加信息:必须将ECall方法打包到系统模块中.

 class Program{
        public static void Main()
        {
            Brekel_ProBody2_TCP_Streamer s = new Brekel_ProBody2_TCP_Streamer();
            s.Start();
            s.Update();
            s.OnDisable();
        }
    }
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?

布雷克尔图书馆的重要部分如下:

//======================================
    // Connect to Brekel TCP network socket
    //======================================
    private bool Connect()
    {
        // try to connect to the Brekel Kinect Pro Body TCP network streaming port
        try
        {
            // instantiate new TcpClient
            client = new TcpClient(host, port);

            // Start an asynchronous read invoking DoRead to avoid lagging the user interface.
            client.GetStream().BeginRead(readBuffer, 0, READ_BUFFER_SIZE, new AsyncCallback(FetchFrame), null);

            Debug.Log("Connected to Brekel …
Run Code Online (Sandbox Code Playgroud)

c# securityexception visual-studio

10
推荐指数
1
解决办法
6996
查看次数

标签 统计

c# ×1

securityexception ×1

visual-studio ×1