32-bit CDINTF behaves differently under 64-bit systems

This forum contains a series of Technical Newsletters designed to share with our customers valuable information about implementing or using our products.
Post Reply
Posts: 121
Joined: Fri Oct 14 2005
Location: Montreal

32-bit CDINTF behaves differently under 64-bit systems

Post by Devteam »

Related Products and Platforms
This newsletter relates to the 64-bit Amyuni Document Converter printer driver, versions 3 and 4, running under XP, 2003, Vista, 2008 and Windows 7 64-bit editions only.

Problem Description
After installing the Amyuni printer driver, a 32-bit application running under Windows XP or 2003 64-bit editions fails to instantiate the CDINTFEx ActiveX control and printing to the Document Converter printer driver fails. The same application running under Vista, 2008 or Windows 7 would work properly.

Background Information
The 64-bit version of the Amyuni printer driver ships with a 32-bit version of CDINTF.DLL, this is because most applications running under 64-bit OSes are still 32-bit applications which can only make use of a 32-bit DLL. By default, CDINTF.DLL is renamed to CDINTF300.DLL (version 3) or CDINTF400.DLL (version 4) and copied to two locations: "windows\syswow64" and "windows\system32\spool\drivers\x64\3". The ActiveX control is then registered from "windows\system32\spool\drivers\x64\3".

The problem happens because the registry API replaces system32 by syswow64. So the location of the control is set to "windows\syswow64\spool\drivers\x64\3" in the registry, which is an invalid path. The application fails to load the control because it cannot locate it in this invalid path.

Starting with Vista, and including Windows 2008 and Windows 7, the ActiveX control gets registered from "windows\syswow64" which is a valid path containing a valid CDINTF DLL, this is why the problem does not occur under these platforms.

To check if your application is not working because of this specific issue, open regedit and search for the string "syswow64\spool\drivers". If this string is found, the you have a problem with the CDINTF registration.

Solutions and Workarounds
1) After the printer driver installation, make sure your application re-registers the right version of CDINTF from windows\syswow64.
2) If your application is a 64-bit application, request a 64-bit version of CDINTF from our support team and use the 64-bit version. Note that the 64-bit DLL is only available with version 4.
3) Use the technique described in http://www.amyuni.com/forum/viewtopic.php?f=13&t=2438 to load the ActiveX control without having to register the DLL.
4) Wait for an upcoming release of CDINTF where we have changed the way the DLL is registered in order to avoid the substitution of system32 into syswow64.
Amyuni Development Team

Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - https://www.amyuni.com
Post Reply