magnification-api

vista/win7 magnification API in .NET

邮差的信 提交于 2020-01-01 11:49:31
问题 There is magnification.lib in the Win7/Vista SDK for using Magnification API for C++. How can I use this API in a .NET windows forms project? 回答1: 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

jna Pointer in 32 bit JRE

笑着哭i 提交于 2019-12-24 13:30:35
问题 I am using jna to call Magnification api functions in Java. MagImageScalingCallback.java package jna.extra; import com.sun.jna.Callback; import com.sun.jna.Pointer; import com.sun.jna.platform.win32.WinDef.HRGN; import com.sun.jna.platform.win32.WinDef.HWND; import com.sun.jna.platform.win32.WinDef.RECT; public interface MagImageScalingCallback extends Callback{ public Boolean MagImageScalingCallback(HWND hwnd, Pointer srcdata,MAGIMAGEHEADER srcheader, Pointer destdata,MAGIMAGEHEADER

vista/win7 magnification API in .NET

﹥>﹥吖頭↗ 提交于 2019-12-04 12:06:57
There is magnification.lib in the Win7/Vista SDK for using Magnification API for C++. How can I use this API in a .NET windows forms project? 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