vista/win7 magnification API in .NET

﹥>﹥吖頭↗ 提交于 2019-12-04 12:06:57

You need to use P/Invoke for this task. Have a look at the below C# code snippet:

[DllImport("Magnification.dll"]
static extern bool MagInitialize();
...
[DllImport("Magnification.dll"]
static extern bool MagUninitialize();

void Main()
{
    if (MagInitialize())
    {
        DoSomething();
    }
    ...
    MagUnitialize();
}

Here you declare all the methods you need to use in you WinForms app and then you call them just as if they were ordinary methods. You can find many useful information and samples on pinvoke.net web site. Please also note that you don't need Magnification.lib at all, it is the library for linking with an unmanaged C/С++ code.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!