首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏林德熙的博客

    WPF Process.Start 出现 Win32Exception 异常

    我在使用 WPF 其他其他软件的时候,发现出现Win32Exception异常。

    1.3K10发布于 2018-09-18
  • 来自专栏林德熙的博客

    dotnet core 在 MAC 系统下删除应用程序自己后调 Process Start 方法将会抛出 Win32 异常

    在 MAC 系统下,如果在运行过程中,应用程序的文件被删除了,那么此时如果应用程序执行了 Process.Start 方法时,将会抛出 Win32Exception 异常 我写了一个工具 dotnetCampus.UpdateAllDotNetTools dotnetCampus.UpdateAllDotNetTools 更新 dotnetCampus.UpdateAllDotNetTools 到最新版本之后,其他的 dotnet tool 就都不能更新了,将会抛出 Win32Exception startInfo); if (Directory.Exists(filename)) { throw new Win32Exception 这是一个获取传入的进程号拿到对应的文件路径的方法,如果传入的进程号对应的文件被删除了,那么将会抛出 Win32Exception 异常 System.ComponentModel.Win32Exception

    1.1K30发布于 2020-08-14
  • 当前实际内存量:{result.ullAvailPhys / 1000 / 1000}MB")

    当前实际可用内存量:{result.ullAvailPhys / 1000 / 1000}MB"); Console.ReadKey(); } /// <exception cref="<em>Win32Exception</em> Native.GlobalMemor www.laipuhuo.com yStatusEx(ref memoryStatusEx)) throw new <em>Win32Exception</em>("无法获得内存信息

    19400编辑于 2024-08-30
  • 来自专栏AhDung

    DLL/OCX文件的注册与数据执行保护DEP

    GetProcessDEPPolicy(hProcess, out var lpFlags, out permanently)) 20 { 21 throw new Win32Exception SetProcessDEPPolicy((int)flag)) 38 { 39 throw new Win32Exception(); 40 file); 31 32 if (hModuleDLL == IntPtr.Zero) 33 { 34 throw new Win32Exception if (pExportedFunction == IntPtr.Zero) 45 { 46 throw new Win32Exception = 0) 58 { 59 throw new Win32Exception(); 60 } 61

    1.5K20发布于 2020-04-22
  • 来自专栏WPF

    C#如何加载嵌入到资源的非托管dll

    LoadLibrary(dllName); if (h == IntPtr.Zero) { Exception e = new Win32Exception Kernel32.LoadLibrary(dllName); if (h.IsInvalid)//是否是无效的 { Exception e = new Win32Exception

    1.6K20发布于 2021-05-17
  • 来自专栏Java架构师必看

    短信收发类无错版SerialStream.cs

    SETDTR : CLRDTR)) {      throw new Win32Exception();     }    }   }   public bool Rts {    set { SETRTS : CLRRTS)) {      throw new Win32Exception();     }    }   }   public bool Break {    set SETBREAK : CLRBREAK)) {      throw new Win32Exception();     }    }   }   public bool Cts {    get GetCommModemStatus(m_hFile, out status)) {      throw new Win32Exception();     }     return (status GetCommModemStatus(m_hFile, out status)) {      throw new Win32Exception();     }     return (status

    1K21发布于 2020-10-26
  • 来自专栏AhDung

    【手记】调用Process.EnterDebugMode引发异常:并非所有引用的特权或组都分配给呼叫方

    即: Process.EnterDebugMode(); //用来开启本进程调试特权(SeDebugPrivilege) 随即把这句放到一个测试程序中,再把测试程序拷到问题电脑上跑,果然是它,抛异常:Win32Exception

    1.7K20发布于 2018-09-13
  • 来自专栏林德熙的博客

    WPF Frame 的 DataContext 不能被 Page 继承

    我在使用 WPF 其他其他软件的时候,发现出现Win32Exception异常。

    1.1K10发布于 2018-09-18
  • 来自专栏Windows技术交流

    System.ComponentModel.Win32Exception (0x80004005):拒绝访问。——解决办法

    堆栈跟踪:[Win32Exception (0x80004005): 拒绝访问。][ExternalException (0x80004005): 无法执行程序。

    7.2K40编辑于 2023-05-13
  • 来自专栏walterlv - 吕毅的博客

    C#/.NET 如何结束掉一个进程

    process.WaitForExit(); } catch (Win32Exception ex) { // 无法结束进程,可能有很多原因

    1.3K30编辑于 2023-10-22
  • 来自专栏centosDai

    CA1060:将 P/Invoke 移动到 NativeMethods 类

    permission If Not NativeMethods.MessageBeep(-1) Then Throw New Win32Exception NativeMethods.MessageBeep(-1)) throw new Win32Exception(); } } internal static class

    59920编辑于 2022-02-22
  • 来自专栏LMC的摸鱼博客

    极域Killer 1.0代码

    process.WaitForExit(); } catch (Win32Exception ex) {

    1.3K40编辑于 2022-08-09
  • 来自专栏林德熙的博客

    dotnet 通过 WMI 获取指定进程的输入命令行

    try { Console.WriteLine(process.GetCommandLine()); } catch (Win32Exception

    98440发布于 2019-03-13
  • 来自专栏centosDai

    CA1060:将 P/Invoke 移动到 NativeMethods 类

    permission If Not NativeMethods.MessageBeep(-1) Then Throw New Win32Exception NativeMethods.MessageBeep(-1)) throw new Win32Exception(); } } internal static class

    94830编辑于 2022-01-10
  • 来自专栏walterlv - 吕毅的博客

    .NET/C# 将一个命令行参数字符串转换为命令行参数数组 args

    commandLine, out var argc); if (argv == IntPtr.Zero) { throw new Win32Exception

    2.1K10发布于 2020-02-10
  • 来自专栏林德熙的博客

    WPF 使用 DisplayConfigGetDeviceInfo 获取显示器名的方法

    = ERROR_SUCCESS) { throw new Win32Exception((int)result); } { continue; } else { throw new Win32Exception

    22010编辑于 2025-12-24
  • 来自专栏林德熙的博客

    一些好用的开发者工具

    只不过 .NET 里面的 Win32Exception 仅对通用的 Win32 错误码有用,且可能存在一些中文翻译挖坑问题,而 Microsoft Win32Error 错误查找工具 可以帮助大家从更多头文件找到定义

    1.2K10编辑于 2023-04-07
  • 来自专栏AhDung

    【C#】分享基于Win32 API的服务操作类(解决ManagedInstallerClass.InstallHelper不能带参数安装的问题)

    throw new ServiceNotExistException(); } throw new Win32Exception = 0xEA) //仅当错误值不是大小不够(ERROR_MORE_DATA)时才抛异常 { throw new Win32Exception(); , bytesNeeded, ref bytesNeeded, ref numEnumerated)) { throw new Win32Exception

    1.7K20发布于 2018-09-13
  • 来自专栏walterlv - 吕毅的博客

    .NET/C# 获取一个正在运行的进程的命令行参数

    try { return GetCommandLineArgsCore(); } catch (Win32Exception

    2.9K10发布于 2020-02-10
  • 来自专栏C#

    C#的Process类调用第三方插件实现PDF文件转SWF文件

    NativeMethods.TerminateProcess(handle, -1)) throw new Win32Exception(); NativeMethods.DUPLICATE_CLOSE_SOURCE)) { throw new Win32Exception

    2K60发布于 2018-01-04
领券