本文介绍了C# System.Diagnostics.Process:无法在 64 位操作系统中启动 32 位 exe 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用 Turbo Pascal 编译的 32 位 exe 文件.我需要启动它.当我使用 Windows 7 32 位时它运行良好,但现在我使用的是 Windows 7 64 位,并且出现以下异常:

I have a 32 bit exe file compiled with Turbo Pascal. I need to launch it. It worked well when I had Windows 7 32 bit, but now I'm on Windows 7 64 bit, and I get the following exception:

指定的可执行文件不是此操作系统平台的有效应用程序.

为了确保它可以在 32 位系统上运行,我在 32 位平台上启动了 C# 程序 - 它可以运行.

To make sure it works on 32 bit systems, I launched the C# program in a 32 bit platform - it works.

那么如何在 64 位操作系统中启动 32 位 exe 文件?

So how can I launch a 32 bit exe file in 64 bit OS?

谢谢

推荐答案

Turbo Pascal 只能生成 16 位代码,从来没有一个版本可以创建 32 位可执行文件.运行 16 位代码需要使用 CPU 中实模式仿真支持的虚拟机(虚拟 8086 模式).如果处理器在 64 位模式下运行,则此仿真不可用.

Turbo Pascal could only generate 16-bit code, there was never a version that could create 32-bit executables. Running 16-bit code requires a virtual machine that uses the real-mode emulation support in the CPU (virtual 8086 mode). This emulation is not available if the processor is running in 64-bit mode.

您不能在 64 位操作系统上运行 16 位进程.您可能会尝试使用 DOSBox 模拟器.

You cannot run 16-bit processes on a 64-bit operating system. You may have a shot at getting it going with the DOSBox emulator.

这篇关于C# System.Diagnostics.Process:无法在 64 位操作系统中启动 32 位 exe 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 09:30