草庐IT

AccessViolation

全部标签

c# - 异步 TCP 操作期间的 AccessViolation

在各种异步TCP操作期间,我不断收到未处理的AccessViolationException。该异常仅出现在内置函数的反汇编窗口中System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32errorCode,UInt32numBytes,NativeOverlapped*pOVERLAP)。异常的堆栈跟踪仅包含此函数。流水线是:cmpdwordptr[ecx],ecx.最烦人的是异常不规则地到达(程序可以在它之前执行30分钟或6小时或15秒)。这里是完整的异常描述:System.AccessViol

c# - 来自 C# 的 Windows Defender 防病毒扫描 [AccessViolation 异常]

我们正在编写代码,使用WindowsDefenderAPI从C#中按需扫描文件。[DllImport(@"C:\ProgramFiles\WindowsDefender\MpClient.dll")]publicstaticexternintWDStatus(outboolpfEnabled);[DllImport(@"C:\ProgramFiles\WindowsDefender\MpClient.dll")]publicstaticexternintMpManagerOpen(uintdwReserved,outIntPtrphMpHandle);[DllImport(@"C:\P