标签: magnification-api

在Windows 8 Pro Tablet中使用WinAPI引发AccessViolationException

我正在尝试使用Magnification API32位Windows 8 Pro平板电脑编写辅助功能应用程序.应用程序可以完美地放大和缩小全屏,但是当放大时,点击事件会被发送到未放大屏幕的错误位置,因此用户无法触摸他所看到的内容.

为了解决这个问题,我试过了MagSetInputTransform(fSetInputTransform, rcSource, rcDest).它适用于64位Windows 8桌面,但当我在平板电脑上测试时,我收到以下错误:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at GTZoom.WinAPIMethods.MagSetInputTransform(Boolean fEnabled, RECT prcSource, RECT prcDest)
   at GTZoom.ZoomControl.SetInput(IntPtr hwndDlg, Boolean fSetInputTransform) in c:\Users\AlpayK\Desktop\GTMagnify\GTMagnify\ZoomControl.cs:line 113
   at GTZoom.ZoomControl.trackBar1_Scroll(Object sender, EventArgs e) in c:\Users\AlpayK\Desktop\GTMagnify\GTMagnify\ZoomControl.cs:line 37
   at System.Windows.Forms.TrackBar.OnScroll(EventArgs e)
   at System.Windows.Forms.TrackBar.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Run Code Online (Sandbox Code Playgroud)

当我尝试为x86目标平台编译项目并在64位机器下测试时,获得了完全相同的错误.

总结一下; …

c# winapi winforms magnification-api windows-8

10
推荐指数
1
解决办法
625
查看次数

Magnification API的问题

我在Microsoft提供Magnification API时遇到问题.这是一个用C++编写的API,所以要在C#中使用它,你必须使用一系列.dll导入,如本问题所述.

我的问题出现在我放大倍率工作之后.我正在使用鼠标放大屏幕的预定义区域,放大倍率设置为矩形,矩形填充WinForm,我将表格放在鼠标顶部(鼠标位于窗体中心),表格将跟随我的鼠标在屏幕上.

大约80%的时间,该应用程序将启动黑屏.我尝试了许多不同类型的更新,但无法找到修复程序.放大倍数不会显示,它只会显示黑屏.from上没有任何东西会出现,只有黑屏.总之,由于Magnification API,只会显示黑屏.

c# magnification-api

6
推荐指数
1
解决办法
1480
查看次数

标签 统计

c# ×2

magnification-api ×2

winapi ×1

windows-8 ×1

winforms ×1