![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've been experimenting with the x64 version of ASA (10.0.1.3960) and I have been unable to execute external procedures because the server "Could not load dynamic library XXX.dll", even though the dll is on the path. This all works fine on the x86 version under 32bit Windows. Is there something else I should be doing? TIA for any illumination. Dave. |
#3
| |||
| |||
|
|
I've been experimenting with the x64 version of ASA (10.0.1.3960) and I have been unable to execute external procedures because the server "Could not load dynamic library XXX.dll", even though the dll is on the path. This all works fine on the x86 version under 32bit Windows. Is there something else I should be doing? TIA for any illumination. Dave. The 64bit server will not be able to load a 32bit dll and vice versa. |
#4
| |||
| |||
|
|
Dave, What type of external procedures have you been trying to execute? What dll is the server failing to load? From the product support matrix located here: http://www.sybase.com/detail?id=1051965#footnotes_2 there is a footnote saying: The older interface to external stored procedures is available only in 32-bit software. Dave Foulkes wrote: I've been experimenting with the x64 version of ASA (10.0.1.3960) and I have been unable to execute external procedures because the server "Could not load dynamic library XXX.dll", even though the dll is on the path. This all works fine on the x86 version under 32bit Windows. Is there something else I should be doing? TIA for any illumination. Dave. |
#5
| |||
| |||
|
|
Dave Foulkes wrote: I've been experimenting with the x64 version of ASA (10.0.1.3960) and I have been unable to execute external procedures because the server "Could not load dynamic library XXX.dll", even though the dll is on the path. This all works fine on the x86 version under 32bit Windows. Is there something else I should be doing? TIA for any illumination. Dave. The 64bit server will not be able to load a 32bit dll and vice versa. You need to rebuild the dll as 64bit to use it with the 64bit server. Karim |
#6
| |||
| |||
|
|
Karim, Thanks for your reply. I presume then that there's no simple way to wrap up a 32bit dll for use with the 64bit ASA server - it's 64bit or nothing. Dave. ----- Original Message ----- From: "Karim Khamis [Sybase iAnywhere]" kkhamis (AT) sybase (DOT) com Newsgroups: sybase.public.sqlanywhere.general Sent: Friday, January 08, 2010 7:18 PM Subject: Re: External procedures in x64 Dave Foulkes wrote: I've been experimenting with the x64 version of ASA (10.0.1.3960) and I have been unable to execute external procedures because the server "Could not load dynamic library XXX.dll", even though the dll is on the path. This all works fine on the x86 version under 32bit Windows. Is there something else I should be doing? TIA for any illumination. Dave. The 64bit server will not be able to load a 32bit dll and vice versa. You need to rebuild the dll as 64bit to use it with the 64bit server. Karim |
#7
| |||
| |||
|
|
32-bit processes and 64-bit processes look and act completely different and as such 32-bit DLLs cannot be loaded into a 64-bit process (and vice-versa). There is officially only one thing you can do if getting your DLL compiled to 64-bit code is not possible: run a 32-bit SA on your 64-bit windows machine. You would lose the extra address space that 64-bit processes give you, but not much else. That said, I've seen this sort of thing made to "work." I haven't heard of cases with SA, but, for example, there is a plugin for 64-bit Firefox that allows you to load 32-bit plugins. The idea is to create a 64-bit wrapper dll that starts the 32-bit code in a subprocess and uses inter-process communication to pass data. A quick google search found this page that describes the basic idea: http://www.dnjonline.com/article.asp...n07_access3264 Again, I've never heard of somebody doing this with SA. It is *far* easier just to recompile your DLL...unless it's completely impossible. Another option is to try out the external environments in 11.0.0+ which run in a separate process, so you should be able to mix 32- and 64-bit invocations if you're careful with your environment setup. You might be able to wrap your external function DLL in a new external environment function to get this working. I'm just throwing ideas out there for you. In no way have I, or anybody else I've talked to, tried this. So, good luck. Cheers, Phil On 01/09/2010 06:55 AM, Dave Foulkes wrote: Karim, Thanks for your reply. I presume then that there's no simple way to wrap up a 32bit dll for use with the 64bit ASA server - it's 64bit or nothing. Dave. ----- Original Message ----- From: "Karim Khamis [Sybase iAnywhere]" kkhamis (AT) sybase (DOT) com Newsgroups: sybase.public.sqlanywhere.general Sent: Friday, January 08, 2010 7:18 PM Subject: Re: External procedures in x64 Dave Foulkes wrote: I've been experimenting with the x64 version of ASA (10.0.1.3960) and I have been unable to execute external procedures because the server "Could not load dynamic library XXX.dll", even though the dll is on the path. This all works fine on the x86 version under 32bit Windows. Is there something else I should be doing? TIA for any illumination. Dave. The 64bit server will not be able to load a 32bit dll and vice versa. You need to rebuild the dll as 64bit to use it with the 64bit server. Karim |
#8
| |||
| |||
|
|
Many thanks for the full and informative response. I too found the dnjonline article you mention, but as you observe it looks like it's less work to start from scratch in a 64bit environment rather than fiddling about trying to wrap the 32bit dll. Sadly, in this instance, this is not an easy course of action either so it looks like I'll have to stay in the 32bit world a little longer. Meanwhile I'll take a look at the external environment function. As an aside, the reason I was looking at the 64bit version was to see if there was any performance advantage over the 32bit version, but without the dll I cannot run the application at all. Thanks again for your suggestions. Dave. "Phil Mitchell [Sybase]" <firstname.lastname (AT) sybase (DOT) com> wrote in message news:4b48f106$1 (AT) forums-1-dub (DOT) .. 32-bit processes and 64-bit processes look and act completely different and as such 32-bit DLLs cannot be loaded into a 64-bit process (and vice-versa). There is officially only one thing you can do if getting your DLL compiled to 64-bit code is not possible: run a 32-bit SA on your 64-bit windows machine. You would lose the extra address space that 64-bit processes give you, but not much else. That said, I've seen this sort of thing made to "work." I haven't heard of cases with SA, but, for example, there is a plugin for 64-bit Firefox that allows you to load 32-bit plugins. The idea is to create a 64-bit wrapper dll that starts the 32-bit code in a subprocess and uses inter-process communication to pass data. A quick google search found this page that describes the basic idea: http://www.dnjonline.com/article.asp...n07_access3264 Again, I've never heard of somebody doing this with SA. It is *far* easier just to recompile your DLL...unless it's completely impossible. Another option is to try out the external environments in 11.0.0+ which run in a separate process, so you should be able to mix 32- and 64-bit invocations if you're careful with your environment setup. You might be able to wrap your external function DLL in a new external environment function to get this working. I'm just throwing ideas out there for you. In no way have I, or anybody else I've talked to, tried this. So, good luck. Cheers, Phil On 01/09/2010 06:55 AM, Dave Foulkes wrote: Karim, Thanks for your reply. I presume then that there's no simple way to wrap up a 32bit dll for use with the 64bit ASA server - it's 64bit or nothing. Dave. ----- Original Message ----- From: "Karim Khamis [Sybase iAnywhere]" kkhamis (AT) sybase (DOT) com Newsgroups: sybase.public.sqlanywhere.general Sent: Friday, January 08, 2010 7:18 PM Subject: Re: External procedures in x64 Dave Foulkes wrote: I've been experimenting with the x64 version of ASA (10.0.1.3960) and I have been unable to execute external procedures because the server "Could not load dynamic library XXX.dll", even though the dll is on the path. This all works fine on the x86 version under 32bit Windows. Is there something else I should be doing? TIA for any illumination. Dave. The 64bit server will not be able to load a 32bit dll and vice versa. You need to rebuild the dll as 64bit to use it with the 64bit server. Karim |
#9
| |||
| |||
|
|
Dave, If you can do it, upgrade to SA 11.0.1. The external environments in SA 11.0.0 and up support the existing C external function api and you can mix and match 32 bit dlls with 64 bit servers AND vice versa. Changing your existing external function declarations to external environment declarations is trivial since you only need to add one of the C_ODBC32, C_ODBC64, C_ESQL32 or C_ESQL64 language types. Once you do that, your dlls will load in an external environment and will get invoked in exactly the same manner as they currently do within the server. One note though, because the external environments are in a separate process, external environment calls are much slower than in process external function calls. As a result, if performance is the overriding factor, then your best course of action is to see if you can recompile your dll for 64-bit. Karim Dave Foulkes wrote: Many thanks for the full and informative response. I too found the dnjonline article you mention, but as you observe it looks like it's less work to start from scratch in a 64bit environment rather than fiddling about trying to wrap the 32bit dll. Sadly, in this instance, this is not an easy course of action either so it looks like I'll have to stay in the 32bit world a little longer. Meanwhile I'll take a look at the external environment function. As an aside, the reason I was looking at the 64bit version was to see if there was any performance advantage over the 32bit version, but without the dll I cannot run the application at all. Thanks again for your suggestions. Dave. "Phil Mitchell [Sybase]" <firstname.lastname (AT) sybase (DOT) com> wrote in message news:4b48f106$1 (AT) forums-1-dub (DOT) .. 32-bit processes and 64-bit processes look and act completely different and as such 32-bit DLLs cannot be loaded into a 64-bit process (and vice-versa). There is officially only one thing you can do if getting your DLL compiled to 64-bit code is not possible: run a 32-bit SA on your 64-bit windows machine. You would lose the extra address space that 64-bit processes give you, but not much else. That said, I've seen this sort of thing made to "work." I haven't heard of cases with SA, but, for example, there is a plugin for 64-bit Firefox that allows you to load 32-bit plugins. The idea is to create a 64-bit wrapper dll that starts the 32-bit code in a subprocess and uses inter-process communication to pass data. A quick google search found this page that describes the basic idea: http://www.dnjonline.com/article.asp...n07_access3264 Again, I've never heard of somebody doing this with SA. It is *far* easier just to recompile your DLL...unless it's completely impossible. Another option is to try out the external environments in 11.0.0+ which run in a separate process, so you should be able to mix 32- and 64-bit invocations if you're careful with your environment setup. You might be able to wrap your external function DLL in a new external environment function to get this working. I'm just throwing ideas out there for you. In no way have I, or anybody else I've talked to, tried this. So, good luck. Cheers, Phil On 01/09/2010 06:55 AM, Dave Foulkes wrote: Karim, Thanks for your reply. I presume then that there's no simple way to wrap up a 32bit dll for use with the 64bit ASA server - it's 64bit or nothing. Dave. ----- Original Message ----- From: "Karim Khamis [Sybase iAnywhere]" kkhamis (AT) sybase (DOT) com Newsgroups: sybase.public.sqlanywhere.general Sent: Friday, January 08, 2010 7:18 PM Subject: Re: External procedures in x64 Dave Foulkes wrote: I've been experimenting with the x64 version of ASA (10.0.1.3960) and I have been unable to execute external procedures because the server "Could not load dynamic library XXX.dll", even though the dll is on the path. This all works fine on the x86 version under 32bit Windows. Is there something else I should be doing? TIA for any illumination. Dave. The 64bit server will not be able to load a 32bit dll and vice versa. You need to rebuild the dll as 64bit to use it with the 64bit server. Karim |
![]() |
| Thread Tools | |
| Display Modes | |
| |