You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Patrick Duflot <pd...@gmail.com> on 2009/12/30 17:49:18 UTC

DLL loading on Windows XP

Hi List,

I wrote a web service DLL. This DLL is dependant of another DLL that is not
a system DLL, so I put it in the service directory next to my service DLL.
When Axis2c tries to load my service (in axutil_windows.c callLoadLib), it
fails with a 126 error : The specified module cannot be found).
The reason is that it can find the service DLL but it cannot find its
dependant DLL.
I could work around the problem by first calling SetDllDirectory to my
service directory in callLoadLib.

Am I missing something ? Is there a smarter solution ?

NB : I am running Windows XP SP2

Thanks

Patrick

Re: DLL loading on Windows XP

Posted by Sam Carleton <sc...@gmail.com>.
Patrick,

The DLL's that are used by your service should go in the same folder as the
main executable, I use Apache to host my web serves, so I put all the DLL's
in the same folder as httpd.exe, in your case, put them in the same folder
as the Axis2c executable.

Sam

On Wed, Dec 30, 2009 at 11:49 AM, Patrick Duflot <pd...@gmail.com> wrote:

> Hi List,
>
> I wrote a web service DLL. This DLL is dependant of another DLL that is not
> a system DLL, so I put it in the service directory next to my service DLL.
> When Axis2c tries to load my service (in axutil_windows.c callLoadLib), it
> fails with a 126 error : The specified module cannot be found).
> The reason is that it can find the service DLL but it cannot find its
> dependant DLL.
> I could work around the problem by first calling SetDllDirectory to my
> service directory in callLoadLib.
>
> Am I missing something ? Is there a smarter solution ?
>
> NB : I am running Windows XP SP2
>
> Thanks
>
> Patrick
>
>