Hi all,
I try to use some of the ADS X# functions. For example : AdsMgConnect().
An error message occurs at runtime when calling the function :
Unable to load DLL 'ace32.dll': The specified module is not found (Exception de HRESULT : 0x8007007E)
All the ADS dll (ace32, axcws32, etc.. v8.10) are present in the application folder.
The startup application is a C# webservice calling the X# librairy.
Am I missing something in the references or in the properties of the librairy ?
There is no previous call to some other ADS function before AdsMgConnect(), neither dbf opening..
Is there something to call before ?
Similar code was working correctly in Vulcan calling the Ace32.dll directly, prototyping the functions with _DLL FUNC, PSZ and VOSTRUCT parameters, like in VO.
I tried like this in X#, but an System.AccessViolationException : 'Try to read or write protected memory". occurs converting using Strin2Psz() functions.
Thanks for help,
Thierry
Unable to load DLL 'ace32.dll': The specified module is not found.
Unable to load DLL 'ace32.dll': The specified module is not found.
Thierry,
The ADS functions in the XSharp.RDD.DLL do not expect PSZ values. You can send in "normal" .Net strings. We take care of the conversion to the Ansi strings internally.
Can you show the code from which you are calling the function ?
And is your Webserver running in 32 bits or 64 bits mode ?
Robert
The ADS functions in the XSharp.RDD.DLL do not expect PSZ values. You can send in "normal" .Net strings. We take care of the conversion to the Ansi strings internally.
Can you show the code from which you are calling the function ?
And is your Webserver running in 32 bits or 64 bits mode ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Unable to load DLL 'ace32.dll': The specified module is not found.
Hello Thierry,
Do you use
(See https://devzone.advantagedatabase.com/d ... onnect.htm)
You also might want to read this, some ADS methods are not available in the X# runtime, Chris wrote there how to accesss these.
https://www.xsharp.eu/forum/public-prod ... ll-s#17922
Dick
Do you use
Code: Select all
ACE.AdsMgConnect
You also might want to read this, some ADS methods are not available in the X# runtime, Chris wrote there how to accesss these.
https://www.xsharp.eu/forum/public-prod ... ll-s#17922
Dick
Unable to load DLL 'ace32.dll': The specified module is not found.
Robert,
Thanks for your answer.
I saw that strings are now expected in X# rather than psz in VO. My remark about psz was about additional tests I did to deal directly with Ace32.dll with my own Ads functions, not those from X#.
The application is running in 32 bits. I sent you a small solution with only few lines of code in 2 projects to reproduce the problem. The webservice has only one method returning some environment informations and the error message catched when calling the X# AdsMgConnect() in the X# project.
Thanks again,
Thierry
Thanks for your answer.
I saw that strings are now expected in X# rather than psz in VO. My remark about psz was about additional tests I did to deal directly with Ace32.dll with my own Ads functions, not those from X#.
The application is running in 32 bits. I sent you a small solution with only few lines of code in 2 projects to reproduce the problem. The webservice has only one method returning some environment informations and the error message catched when calling the X# AdsMgConnect() in the X# project.
Thanks again,
Thierry
- Attachments
-
- Webservice Test XSharp.zip
- (4.09 MiB) Downloaded 105 times
Unable to load DLL 'ace32.dll': The specified module is not found.
Hi Dick,
Thanks for your help.
The AdsMgConnect() method is available in the XSharp.rdd module. My project compiles without any error. The problem occurs at runtime and the message show that ace32.dll was not found, even if the file is present in the application folder.
Thierry
Thanks for your help.
The AdsMgConnect() method is available in the XSharp.rdd module. My project compiles without any error. The problem occurs at runtime and the message show that ace32.dll was not found, even if the file is present in the application folder.
Thierry
Unable to load DLL 'ace32.dll': The specified module is not found.
Thierry,
When I run your test in the debugger then the call to the AdsMgConnect works and returns the number 5033.
That correspondents to the error message "Error 5033: No connected server was found for the given drive letter."
Robert
When I run your test in the debugger then the call to the AdsMgConnect works and returns the number 5033.
That correspondents to the error message "Error 5033: No connected server was found for the given drive letter."
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Unable to load DLL 'ace32.dll': The specified module is not found.
Robert,
Thanks for your test.
It works also for me when I copy ace32.dll in a search path, for example c:Windows.
As if X# was not looking the dll in the application folder..
Thanks for your test.
It works also for me when I copy ace32.dll in a search path, for example c:Windows.
As if X# was not looking the dll in the application folder..
Unable to load DLL 'ace32.dll': The specified module is not found.
Thierry,
You will have to have the ace32.dll and the other support dlls in the search path or in the folder where the webservice runs.
X# does nothing special w.r.t. the ace32.dll.
It has marked the function calls as an imported native functions from a native dll and that is it.
The rest is handled by the .Net framework.
Robert
You will have to have the ace32.dll and the other support dlls in the search path or in the folder where the webservice runs.
X# does nothing special w.r.t. the ace32.dll.
It has marked the function calls as an imported native functions from a native dll and that is it.
The rest is handled by the .Net framework.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Unable to load DLL 'ace32.dll': The specified module is not found.
Robert,
This is very strange. The ace32.dll is present in the folder where the webservice runs. In the result of the webmethod, you can see the AppPath property which is the folder returns by : Path.GetDirectoryName(Assembly.GetAssembly(typeof(WebServiceTest)).CodeBase).
Then the property IsAce32dll returning if the ace32.dll is present in this folder (File.Exists(...)).
By digging a little more, it seems that the XSharp.rdd.dll referenced on the project is loaded from the GAC folder :
c:WindowsMicrosoft.NETassemblyGAC_MSILXSharp.Rddv4.0_2.6.0.0__ed555a0467764586)
but not from the folder where the webservice is run, despite the "CopyToLocal=True" in the Reference properties.
When the ADS dll is copied in the XSharp.rdd.dll GAC folder, the problem disapears.
As I have a workaround with a search path, I will be able to go further in my development. Hope the same problem will not appear in the release version.
Thanks again for your help,
Thierry
This is very strange. The ace32.dll is present in the folder where the webservice runs. In the result of the webmethod, you can see the AppPath property which is the folder returns by : Path.GetDirectoryName(Assembly.GetAssembly(typeof(WebServiceTest)).CodeBase).
Then the property IsAce32dll returning if the ace32.dll is present in this folder (File.Exists(...)).
By digging a little more, it seems that the XSharp.rdd.dll referenced on the project is loaded from the GAC folder :
c:WindowsMicrosoft.NETassemblyGAC_MSILXSharp.Rddv4.0_2.6.0.0__ed555a0467764586)
but not from the folder where the webservice is run, despite the "CopyToLocal=True" in the Reference properties.
When the ADS dll is copied in the XSharp.rdd.dll GAC folder, the problem disapears.
As I have a workaround with a search path, I will be able to go further in my development. Hope the same problem will not appear in the release version.
Thanks again for your help,
Thierry
Unable to load DLL 'ace32.dll': The specified module is not found.
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu