检测到CallbackOnCollectedDelegate C#

时间:2016-09-04 14:49:56

标签: c# visual-studio-2010

我想在我的项目中禁用Alt + Esc,Alt + Tab,Win键,Ctrl + Esc键。经过大量的搜索,我找到了这个源代码。工作正常。但有些时候它给出了一个错误。

“检测到CallbackOnCollectedDelegate 消息:对类型为'over_ride_sort_keys!over_ride_sort_keys.Form1 + LowLevelKeyboardProcDelegate :: Invoke'的垃圾收集委托进行了回调。这可能会导致应用程序崩溃,损坏和数据丢失。将委托传递给非托管代码时,托管应用程序必须将它们保持活动状态,直到确保它们永远不会被调用为止。“

  • 如何过来?
  • 我的源代码如下。
  • 还告诉我如何禁用Alt + f4?

我使用的源代码如下所示

  

代码

function nullStudent(){
    var student1 = new Student("børge1","yeye1","agurk1","tlf1","");
    var student2 = new Student("børge2","yeye2","agurk2","tlf2","");
    var student3 = new Student("børge3","yeye3","agurk3","tlf3","");
    var student4 = new Student("børge4","yeye4","agurk4","tlf4","");
    var student5 = new Student("børge5","yeye5","agurk5","tlf5","");
    var student6 = new Student("børge6","yeye6","agurk6","tlf6","");
    studentArray.push(student1);
    studentArray.push(student2);
    studentArray.push(student3);
    studentArray.push(student4);
    studentArray.push(student5);
    studentArray.push(student6);

}

0 个答案:

没有答案