C#下用delegate来实现。你具体指怎么样的调用,API?Event本身也是回调函数呀。如果是API,把API的原型写出来让大家帮你看看。
解决方案 »
- UDP服务器端求助,有时能收到数据,有时不能?
- C# 如何给DataGridView中添加一个时间控件
- 怎么把我设置的系统背景给保存下来,下次登陆的是时候还是这个背景
- C#中有关事件参数object sender, System.EventArgs e没有使用的问题
- 使用WebClient+backGroundWork下载http文件时的问题,再线等,解答马上给分
- Windows程序绑定下拉列表框问题
- 熟悉c#和vc++的高手请进!
- 请指教:类似于表结构设计器中某字段(行)可以上下移动的设计的问题。在线
- 打开Aspx或Xml文档.Net就崩溃!!!
- C# 等值线或者等高线
- winForm中的DataTimePicker空间如何设置空的日期(在线等)
- 请教大家一个内存问题
在C#里面是委托
using System.Runtime.InteropServices;public delegate bool CallBack(int hwnd, int lParam);public class EnumReportApp { [DllImport("user32")]
public static extern int EnumWindows(CallBack x, int y); public static void Main()
{
CallBack myCallBack = new CallBack(EnumReportApp.Report);
EnumWindows(myCallBack, 0);
} public static bool Report(int hwnd, int lParam) {
Console.Write("Window handle is ");
Console.WriteLine(hwnd);
return true;
}
}