Windows 10错误 - 尝试读取或写入受保护的内存。这通常表明其他内存已损坏 [英] Windows 10 error - attempted to read or write protected memory. This is often an indication that other memory is corrupt

查看:1671
本文介绍了Windows 10错误 - 尝试读取或写入受保护的内存。这通常表明其他内存已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在windows 10机器上运行我的应用程序时,winspool.drv中的SetPrinter方法出现此错误。升级到4.6.1 .net框架工作后发现此问题。



I am getting this error for SetPrinter method in winspool.drv while running my application in windows 10 machine. This issue found after upgrading to 4.6.1 .net frame work.

Public Declare Function SetPrinter Lib "winspool.drv" Alias "SetPrinterA" _
   (ByVal hPrinter As IntPtr, _
    ByVal Level As Integer, _
    ByVal pPrinter As IntPtr, _
    ByVal Command As Integer) _
    As Long







但这在Windows 7机器上运行良好。



我尝试过:



升级到4.6.1 .net框架后找到此问题。




But this works fine on Windows 7 machines.

What I have tried:

This issue found after upgrading to 4.6.1 .net frame work.

推荐答案

我通过将目标CPU更改为x86来解决此问题。
I got this issue resolved by changing the target CPU as x86.


这篇关于Windows 10错误 - 尝试读取或写入受保护的内存。这通常表明其他内存已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆