Click here to Skip to main content
15,886,787 members
Articles / Desktop Programming / Win32

Use Lambda Expressions as Unmanaged Callbacks

Rate me:
Please Sign up or sign in to vote.
4.40/5 (5 votes)
5 Nov 2010CPOL 5.8K   1  
// Even more simplifiedclass Program{ [DllImport("user32", ExactSpelling = true)] static extern bool EnumWindows(WNDENUMPROC lpEnumFunc, IntPtr lParam); [UnmanagedFunctionPointer(CallingConvention.Winapi)] delegate bool WNDENUMPROC(IntPtr hwnd, IntPtr lParam); ...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
7 Nov 2010Tsuda Kageyu 1 alternative  
An application of lambda expressions to simplify your code.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions