Tag: 64位

C#在64位操作系统上读取错误的注册表数据

我正在使用64位Windows,我的应用程序以提升的权限运行。 我有一个问题,以下非常简单的代码: myKey = Registry.LocalMachine.OpenSubKey(@”SOFTWARE\Microsoft\Windows\CurrentVersion\Run”); if (myKey != null) { string[] HKLMvaluenames = myKey.GetValueNames(); } 但由于某种原因,HKLMvaluenames数组中填充了以下键中的值: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run 有没有解决这个问题的方法?

.net框架错误(HRESULT 0x8007000B)

我有一个使用Visual Studio 2005在32位Windows XP机器上编写的C#应用​​程序。该应用程序在Windows XP机器上运行良好,但是当我尝试在64位Windows 7专业机器上运行它时,我得到以下对话框在启动时: 以下是详细信息的全文。 See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at ICSNeoCSharp.IcsNeoDll.icsneoTxMessages(Int32 hObject, IcsSpyMessage& pMsg, Int32 lNetworkID, Int32 lNumMessages) […]

x64中的Visual Studio设计器不起作用

在Visual Studio 2010 64位中,我无法设计表单。 我一直收到这个警告(和错误): Warning 18 The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: MainForm — The base class ‘Blah’ could not be loaded. Ensure the assembly has been referenced and that all projects […]

无法在Win7 x64上从32位进程启动屏幕键盘(osk.exe)

90%的时间我无法从Win7 x64上的32位进程启动osk.exe 。 最初代码只是使用: Process.Launch(“osk.exe”); 由于目录虚拟化,这对x64无效。 不是我想的问题,我只是禁用虚拟化,启动应用程序,然后再次启用它,我认为这是正确的做事方式。 我还添加了一些代码,如果它已经被最小化(这可以正常工作)使键盘恢复 – 代码(在示例WPF应用程序中)现在看起来如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation;using System.Diagnostics; using System.Runtime.InteropServices; namespace KeyboardTest { /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : Window { [DllImport(“kernel32.dll”, […]

32位和64位.NET(4)应用程序之间的差异

32位和64位.NET(4)应用程序之间有什么区别? 通常,32位应用程序在64位计算机上运行时会出现问题,反之亦然。 我知道我可以将整数声明为int32和int64(当然32位系统上的int64会产生问题)。 编程32 OR 64位或32位和64位兼容应用程序之间是否存在其他差异?

加载x86或x64程序集

我有两个版本的System.Data.SQLite.DLL – 用于x86和x64平台。 x86版本保留在应用程序文件夹中,x64版本保留在appFolder \ x64文件夹中。 该应用程序编译为AnyCPU。 如何根据Windows平台加载所需的SQLite版本?