简体   繁体   English

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

[英]Printer Driver Development - from 32 to 64 bits

I've developed a driver that is compiled for 32 bits system. 我已经开发了针对32位系统编译的驱动程序。 The driver is unidriver based. 该驱动程序基于unidriver。

Does anyone knows what should be needed to get the driver compatible with 64 bits? 有谁知道使驱动程序与64位兼容需要什么? 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? 还是仅用64位版本的DDK进行编译?

Thanks in advance. 提前致谢。

Nuno 努诺

The first step is to open the project with Visual Studio and add x64 configuration. 第一步是使用Visual Studio打开项目并添加x64配置。

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 DWORD-> DWORD_PTR +具有长版本的所有相关Win32 api函数
  • pointer truncation: will issue warnings on msvc, errors on gcc: replace long/int with (u)intptr_t where applicable 指针截断:将在msvc上发出警告,在gcc上出现错误:在适用的情况下,将long / int替换为(u)intptr_t
  • check out this helpful MSDN link 查看此有用的MSDN链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM