问题标签 [win64]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
1810 浏览

matlab - 带 NI 板的 DAQ:Matlab 和 Win64

在不知不觉中,我决定我的新数据采集计算机将是运行 win7 的 x64。我在计算机上运行 matlab 2012a,并使用 NI PCIe6363 卡进行数据采集。我的问题是关于新的 daq.Session 界面以及如何在后台收集数据(我实验的一个关键组成部分)。

我包括一些示例代码。我将尝试解释我认为代码应该做什么。而实际发生的事情......

代码:

预期功能:从卡中连续记录数据约 5 秒。就在扫描最后几个数据点之前,将数据保存在适当的位置。然后停止采集。

实际结果:

没有数据存储在适当的位置。实际上声称 ScansAcquired 的数量为零。就停下来。

怎么了?我应该如何设计我的听众?

=========

\开始{咆哮}

我不敢相信 matlab 网站对于基于会话的 DAQ 的记录是多么糟糕。并且没有定时数字 I/O?嘘!

\结束{咆哮}

=========

-bas

0 投票
2 回答
362 浏览

c++ - 64bit vc++程序似乎在32bit模式下运行

我在 Visual Studio 2010 中创建了一个 64bit c++ 项目(在 Windows 7 64bit 下);

我以为我正在运行一个 64 位应用程序,以下代码返回true

但如果我调用该函数IsWow64Process,它返回FALSE ...

更奇怪的事情:

  • 调用LoadLibrary()加载下的 dllc:\windows\system32\some.dll效果很好
  • 在下加载 dllc:\windows\sysWow64\some.dll将失败(错误代码 193:some.dll 不是有效的 win32 应用程序)

所有这些失败都表明应用程序在 32 位模式下运行,但这与指针类型是 8 字节长度的事实背道而驰

我很困惑,任何帮助将不胜感激!

0 投票
0 回答
112 浏览

python - PDFFileReader 在使用后没有关闭 pdf

可能重复:
如何关闭 pyPDF “PdfFileReader” 类文件句柄

我在 Win 64bit 上运行 Python 2.7。我正在尝试将pdf下载到文件,打开pdf,提取文本,然后最后删除pdf,但是当我尝试删除python时出现错误(使用python代码并手动尝试删除pdf - windows 说该文件正在被 pythonw 使用)。我的简化代码:

返回错误:

有什么建议么?

0 投票
2 回答
1311 浏览

.net - Stumped by VS2012 exception-swallowing nightmare

I started asking this question here, and got very informative answers, but still can't get round the problem. That question has been closed as it's a known issue. I know it's a known issue: my question is what can I possibly do about it?

To summarise:

  1. VS debugger swallows unhandled exceptions occurring in a Form_Load event (or any calls therefrom) when debugging on Windows 64-bit systems (in my case, Win 7 64-bit). As it stands, this makes VS useless as a dev environment
  2. One suggestion was to move code into the constructor rather than the FOrm_Load event. I don't want to do that as it moves code out of sight into "designer-created" modules; those modules are full of code I'm not competent to change yet; and I don't trust the Designers not to wipe out or change code I put there.
  3. Another suggestion was to point unhandled exceptions to dummy empty exception handlers by inserting some code into an initial procedure (e.g. Sub Main). This works. The problem here is that Sub Main can only execute on startup if I switch off the Application Framework. Then I can't run the application with a lifetime of "until the main form or last form closes".
  4. I thought I'd got a Sub Main in a startup form running, and running at the right time (i.e. before Form_Load). Thus I can still use the Application Framework, and have this special code run before anything else. I may be wrong here. In any case, I've changed the code of that form a bit, and Main no longer runs in time - if it ever did (Form_Load runs first, and we have the same problem). Tried moving the code into Form_Load - but it itself causes an error.
  5. There's a supposed hotfix (KB976038). I applied that (restart needed): but now instead of the exception being swallowed, I get a vshost.exe application error, and still can't debug my code. Frustatingly, once I OK the application error, I get a glimpse of the VS debugger showing the usual Unhandled Exception box - but it disappears in about 1/10th of a second.

So what are my options?

The common thread here is that though I'm an experienced programmer, used to getting things done in VB.NET and VB6, and competent to understand the thorough explanations of what's causing this problem;

all the possible measures are really beyond my competence, and introduce too many gotchas that I may not even be aware of. I can't help thinking - why can I not just get down to coding, and deal with the inevitable coding mistakes I'll make, using a debugger that I can trust to break on an exception?

At the moment, I feel that if (with advice from those more expert than me) I somehow get VS to properly catch unhandled exceptions and break on them, this will only be for today. Who knows whether something I do in my code tomorrow, or next week, might not break the carefully-constructed safety-net that is making VS behave itself properly for the moment?

I freely admit that I shouldn't be allowed near the constructor/Designer-created code at this stage in my .NET expertise. I just want to get stuff done! So my options look like:

  • Learn all the hardcore stuff so that I never break the solution to this problem. This will take months if not years; or
  • Give up and go back to VS2008 Express on XP; or
  • Persuade the company to bin Windows 7 64 and gives us Windows 7 32 as a development OS.

Any ideas or suggestions welcome!

EDIT: As suggested by @roadwarrior below, here's the suggested workarounds in the answer to the original question, and what I've found with them:

1 Project + Properties, Build tab, change Platform target to AnyCPU

Already is set that way, and I can't change it. Tried changing TargetCPU away from "AnyCPU" to x86 or 64-bit - no effect.

2 Debug + Exceptions, tick the Thrown box for CLR exceptions

Makes running/testing a nightmare as soon as I start deliberately handling exceptions (which I do a lot). Every exception will result in a "stop", whether handled or not.

3 Write try/catch in the Load event handler

This is not going to be much fun either. At this stage of development, I want to see the line that's causing the problem. Always loathed debugging code back in VB6 that was in the scope of an On Error Goto someone had put into a procedure 6 steps up the call stack; I don't want to start out that way in my own projects!

4 Use Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException) in the Main() method so that the exception trap in the message loop isn't disabled in debug mode. This setting however makes all unhandled exceptions hard to debug, the ThreadException event is pretty useless.

I don't understand the comment in the final sentence. But something like this worked. What I did, as suggested by Neolisk in answer to my previous question, was this, in a Sub Main:

This was my version of neolisk's code - had to change it as in my version of VS/.NET (2012, 4.5) the two handlers needed to have different signatures. Two problems with this:

a) I can't get a Sub Main to execute on startup without unticking "Enable application framework". Once I do that, Form1.Show shows the form, we get to the end of Sub Main, and the form immediately disappears again, as the application is closing. I've subverted the application Settings' window's "Shutdown mode" setting, and don't understand how to get it back again.

b) This code works but I have very little idea why, how, whether it covers all exceptions, how it relates to what I may decide to tick/untick in the Debug/Exceptions dialog, or what other gotcha side-effects it might have at debug-time or run-time.

5 Consider if your code really belongs in the Load event handler. It is very rare to need it, it is however popular with VB6 programmers where Load was a big deal. You only ever need Load when you are interested in the actual window size after user preferences and autoscaling is applied. Everything else belongs in the constructor.

Fair enough. As an ex-VB6 programmer I'm used to using Form_Load, but let's progress and learn new things and move the code into the form's New() constructor (Let's hope I never have some code that really has to be in the _Load event). Now at least an exception dialog is shown when execution hits the problem line: but it's on top of a new window "No source available (crlf) The call stack contains only external code". In this particular case, the mistake in the code is debuggable from what I see here (it's a stupid typo) - but debugging like this when things get more complicated is going to be a nightmare: no chance to see what the state of anything is.

General comments:

1. Ran this project on the one Win7 32-bit machine we have (not my machine), and had no problems whatsoever. That's my preferred solution - to simply stop using Win7 64-bit for development.

2. Comments along the lines of "you're lucky you've got a debugger at all" are amusing, but not helpful. This is VS2012, which is supposedly a development environment with a debugger that works, and which we're going to have to pay £££ for. I've programmed for long enough to know when I know what I'm doing, and when I'm messing around with stuff I shouldn't be because I don't understand it. What I specifically don't understand is not the underlying structures (I cut my teeth on ZX81 machine code, don't want to go back there...), but VS itself. I'm happy to learn more about e.g. changing exception handlers in VS, as I need to, but definitely don't want to dive right in there, ignorantly, as a basis for my development environment.

0 投票
0 回答
1172 浏览

python - pyaudio 打印调试消息

我在 Windows 7 上使用此处可用的 64 位 PyAudio 构建。当我导入 pyaudio 并执行pyaudio.PyAudio()时,它工作正常,但大量似乎是调试信息的内容被打印到 stderr。Stackoverflow 上有一个关于此问题的先前问题但它已经一年多没有活动并且似乎未解决。

正如该问题的提问者在对答案的回复中指出的那样,重定向标准错误(通过做sys.stderr = somethingelse)不会阻止错误消息进入标准错误。即使是这样,我也不想重定向所有的 stderr 来处理 PyAudio。

我怀疑问题在于 PyAudio 和/或 PortAudio 的这个构建是用某种调试标志编译的,导致调试信息在 C 扩展代码中的某处“原始”打印,绕过Python IO 流。所以我要问的是:

  1. 任何人都可以确认这种行为,和/或确认在 Win64 的不同版本的 PyAudio 中不会发生这种情况吗?(我没有编译 PyAudio 的设置。)
  2. 有没有办法在不重新编译 PyAudio 的情况下修复它?通过“修复它”,我的意思是仅从PyAudio 抑制此调试输出(不完全重定向 stderr)。

(如果这只是这个版本的问题,我可能会尝试联系提供这些 64 位版本的人,并询问他是否故意提供调试版本,因为他可能只是在编译时忘记关闭调试。)


编辑:这是我收到的消息。我会尽量压缩它们,因为它们有数百行长。我还应该注意,这些看起来不像错误消息。它们似乎只是有关各种设备的状态消息。我首先得到:

然后是一系列以 WASAPI 开头并提及其他设备(线路输入、麦克风等)的其他类似消息。然后:

. . . 又是一堆关于“枚举调用”和“捕获别名”等的类似消息。然后:

. . . 以及其他设备编号的一系列类似消息块。然后在最后:

这就是我看到的pyaudio.PyAudio()

0 投票
2 回答
589 浏览

windows-7 - 我的注册表项去哪了?视窗 7、win64

Windows7和Win64是我的新平台,编程明智,所以不知道发生了什么,我使用以下命令在windows7 64位的Windows注册表中保存了一个键,问题是相同的代码能够返回REG_OPENED_EXISTING_KEY返回值,这意味着密钥创建成功并且该函数能够在后续调用中读取/打开密钥,但是当我尝试在 regedit.exe 的位置中找到密钥时,我不能它根本没有显示在树既不在 HKLM_LOCAL_MACHINE/Software/MyProject 也不在 HKLM_LOCAL_MACHINE/Software/Wow6432Node/MyProject

有人可以澄清这里发生了什么吗?

0 投票
0 回答
69 浏览

winapi - DLL 不能在可执行文件中使用地址

我正在用 64 位 NASM 编写控制台应用程序,一切都很好,直到我将部分可执行文件移动到我创建的 DLL 中。这是我在程序集级别对 DLL 的第一次实验。我无法在我的 .exe 的数据部分中传递字符串的地址...当我这样做时,该函数失败。但是,如果我在我的 dll 中创建一个 .data 部分,定义字符串,并将其在 RCX 中传递给 SetConsoleTitleA,它就会像魅力一样运行。

我没有传递正确的地址,还是 DLL 无法进入我的 EXE 的数据部分?什么是“优雅”的解决方案?

如果您希望我粘贴代码,请告诉我。

编辑:DLL http://pastebin.com/jpdsihsC EXE http://pastebin.com/KbMTh9Xa

--ignore inc.mac,用于正向开发

0 投票
0 回答
736 浏览

c++ - psapi.h 中缺少 EnumProcessModulesEx

我正在尝试枚举在 Windows 中运行的所有进程,包括 32 位和 64 位,对于 64 位我需要调用 EnumProcessModulesEx,它在我正在使用的 Devc++ 的 psapi.h 中不可用,所以我下载了 Windows8 SDK。

所以现在我定义了 EnumProcessModulesEx 的 psapi.h,但是当我将它包含在我的项目中时,它给了我各种错误。我包含了包含 SDK 附带的所有头文件的目录的路径,我应该做什么?

这是错误列表:

0 投票
1 回答
1153 浏览

delphi - 在 64 位 Delphi 项目中使用 64 位 bass.dll 时如何解决启动时应用程序崩溃的问题?

我无法使用64 位版本的 bass.dll运行我的 64 位 Delphi 应用程序。我正在使用 Delphi XE3 来构建我的应用程序。

应用程序崩溃以开始0xc000007b。调试器消息:

适用于 Win64 (x64) 的低音

我怎样才能让它工作?有没有人遇到过同样的问题?

0 投票
1 回答
486 浏览

c++ - 在 Windows 7 上用 C++ 接收睡眠通知的最简单方法

我正在编写一个本机 C++ 应用程序,如果 Windows 7 系统进入睡眠模式,它需要做一些快速的工作——否则当系统唤醒时它将不可避免地崩溃。

使用本机 C++ 注册系统事件(挂起)的最简单方法是什么?

我真的只是想做这些人所做的事情,但我有一个任意类(不是 gui),我想设置一个事件处理程序并获取 PBT_APMSUSPEND 事件,但我不确定最简单的方法。

Autoitscript显然有一个很好的方式,你可以写

我希望有类似的简单的东西......没有一个完整的消息泵设置。