Hi All, We are facing a critical issue in our application and I need your help in solving this issue:
Currently our application is communicating with Mainframes to get the Statements and we are using AFP2PDF converter to convert the AFP file format from Mainframes to the PDF format. The flow of the application is like : .Net application --> stiSocket dll --> AFP2PDF dll
Existing application in deployed in Windows Server 2003 (32 – bit System) and the stiSocket dll is built for 32 bit and AFP2PDF dll is also built for 32 bit. So there is no problem in the existing application.
Now we are deploying the code in Windows Server 2008 (64 – bit system) and the first problem we faced is the communication between the >net application and the stiSocket.dll. This issue occurs because the 64-bit application tries to call the 32 bit stiSocket.dll. we solved this issue by re-compiling the stiSocket application in a 64 bit system and we changed the setting of the project to work the dll in 64 bit system. (we had the source code of the stiSocket application).
Then the problem comes when the stiSocket.dll communicates with the AFP2PDF dll. This again occurs when the 64 bit stiSocket dll communicates with the 32 bit version of AFP2PDF dll. We could not able to change the settings for this dll as we don’t have the source code for this dll.
Is there any way to call the 32 bit C++ dll in the 64 version of dll?
Well, if you don't have the source for the AFP2PFD.dll and there isn't a 64-bit availble, you have two options.
1) Recompile everything back down to 32-bit because you cannot mix 32- and 64-bit code in the same process.
2) Leave your app as AnyCPU and rework the StiSocket.dll code to load the AFP2PDF.dll in a serperate Process, and write a wrapper around the functionality of the .DLL that will marshal remote calls from your StiSocket.DLL to to the exposed functioanlity of the .DLL.
Frankly, I'd go with number 1.
Unless you've got some 64-bit reason that you absolutely need 64-bit support in your app, your 32-bit-only app will work just fine on a 64-bit machine.