打印机驱动程序开发 - 从 32 位到 64 位

发布于 2024-09-14 01:43:56 字数 147 浏览 3 评论 0原文

我开发了一个为32位系统编译的驱动程序。该驱动程序是基于 unidriver 的。

有谁知道要使驱动程序兼容 64 位需要什么?如果需要的话,我应该对代码进行哪些更改?或者只是用 64 位版本的 DDK 来编译它?

提前致谢。

努诺

I've developed a driver that is compiled for 32 bits system. The driver is unidriver based.

Does anyone knows what should be needed to get the driver compatible with 64 bits? What changes should I need to do to the code, if any? or is it just a matter of compiling it with a 64 bits version of the DDK?

Thanks in advance.

Nuno

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小猫一只 2024-09-21 01:43:56

第一步是使用 Visual Studio 打开项目并添加 x64 配置。

然后,测试并查看它是否可以构建(可能不会)。

最常见的错误(我遇到过)是这些:

  • DWORD->DWORD_PTR + 所有具有长版本
  • 指针截断的相关 Win32 api 函数:将在 msvc 上发出警告,在 gcc 上发出错误:将 long/int 替换为 (u )intptr_t(如果适用)
  • 请查看此有用的 MSDN 链接

The first step is to open the project with Visual Studio and add x64 configuration.

Then, test and see if it builds (probably not).

The most common errors (I've come across) are these:

  • DWORD->DWORD_PTR + all related Win32 api functions that have a long version
  • pointer truncation: will issue warnings on msvc, errors on gcc: replace long/int with (u)intptr_t where applicable
  • check out this helpful MSDN link
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文