C#
# 利用技巧
# P/Invoke
Platform Invoke (P/Invoke) 提供了 C# 访问 DLL 中数据结构、回调、函数的能力。基本的使用方式如官方 Platform Invoke 文档中所示。利用 P/Invoke 的能力,C# 程序可以较为容易的调用标准的 Windows API。
using System;using System.Runtime.InteropServices;public class Program{ // Import user32.dll (containing the function we need) and define...
more...