Hi,
I don't know if I'm the first one to run into this issue, but so far using any InstallAware project, even a brand new one, I have never been able to call a specific DLL file more than once during a given execution of an installer. My installers are compiled in a Single-File Executable (.exe).
No matter if I'm calling the same function or a different function in the same DLL, the behavior I get is that on the second call of the DLL file, the application freezes and never gives any further response to any action. It is at that point necessary to force kill it with the Task Manager.
So far, my workaround has been to create a different DLL file for each function I needed to call during my installation process. However, this still does not completely resolves the problem, as I need to be able to call one same function more than once, until I get the desired outcome before I continue forward. Currently, I am forced to disable a button that calls a DLL, after it has done its first call.
Is this known? Is there any way I can hope to call a DLL function more than once?
Another piece of information: I used C# on VS2010. My DLLs are created/exported using this solution: https://sites.google.com/site/robertgie ... gedexports
Thank you very much for your help.
Regards,
Mathieu
Call DLL Function: Cannot invoke one DLL file more than once
-
m.duchesneau
- Posts: 21
- Joined: Tue May 24, 2011 1:42 pm
Re: Call DLL Function: Cannot invoke one DLL file more than
Hi,
I couldn't reproduce your problem - I created a blank setup and put this code in there:
~InstallAware Clipboard Data~
~Call DLL Function~
~{B2EADB94-90D8-4517-AAD3-A1C4896FE03A}~
~user32.dll,MessageBoxA,void,,"double word",0,"allocated string buffer (MAX_PATH length)",Text,"allocated string buffer (MAX_PATH length)",Caption,"double word",0,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Call DLL Function~
~{F75CB07D-2D75-4735-B037-8780FB8DBA3D}~
~user32.dll,MessageBoxA,void,,"double word",0,"allocated string buffer (MAX_PATH length)",Text,"allocated string buffer (MAX_PATH length)",Caption,"double word",0,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Call DLL Function~
~{4C10F73A-B539-405F-8D9B-440B1E98FC87}~
~user32.dll,MessageBoxA,void,,"double word",0,"allocated string buffer (MAX_PATH length)",Text,"allocated string buffer (MAX_PATH length)",Caption,"double word",0,$~
~mIDEFunc.dll\mEXEFunc.dll~
This showed 3 messageboxes just fine. Could you verify?
I couldn't reproduce your problem - I created a blank setup and put this code in there:
~InstallAware Clipboard Data~
~Call DLL Function~
~{B2EADB94-90D8-4517-AAD3-A1C4896FE03A}~
~user32.dll,MessageBoxA,void,,"double word",0,"allocated string buffer (MAX_PATH length)",Text,"allocated string buffer (MAX_PATH length)",Caption,"double word",0,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Call DLL Function~
~{F75CB07D-2D75-4735-B037-8780FB8DBA3D}~
~user32.dll,MessageBoxA,void,,"double word",0,"allocated string buffer (MAX_PATH length)",Text,"allocated string buffer (MAX_PATH length)",Caption,"double word",0,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Call DLL Function~
~{4C10F73A-B539-405F-8D9B-440B1E98FC87}~
~user32.dll,MessageBoxA,void,,"double word",0,"allocated string buffer (MAX_PATH length)",Text,"allocated string buffer (MAX_PATH length)",Caption,"double word",0,$~
~mIDEFunc.dll\mEXEFunc.dll~
This showed 3 messageboxes just fine. Could you verify?
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
m.duchesneau
- Posts: 21
- Joined: Tue May 24, 2011 1:42 pm
Re: Call DLL Function: Cannot invoke one DLL file more than
I have tested your code in a blank setup and confirm that it works fine.
So my next step was to try out the same environment and logic with my own dll. I have started with the simplest one of those I use (No arguments to pass, a long value is received).
I'm getting the same problem I reported above; it's called once, but then the process freezes.
As an addendum, I'll mention that the interface is not completely freezed; I am only able to click Cancel (to get a response), and after a while I get the "Setup Canceled" msgbox and it quits.
So it looks like something is wrong with the way I build my DLLs. What is the recommended way to export DLL functions using C#? I have no choice but to use that, because I need to call a web service. Unless of course you also have a different solution for that too.
Thanks a lot for your help,
Mathieu
So my next step was to try out the same environment and logic with my own dll. I have started with the simplest one of those I use (No arguments to pass, a long value is received).
I'm getting the same problem I reported above; it's called once, but then the process freezes.
As an addendum, I'll mention that the interface is not completely freezed; I am only able to click Cancel (to get a response), and after a while I get the "Setup Canceled" msgbox and it quits.
So it looks like something is wrong with the way I build my DLLs. What is the recommended way to export DLL functions using C#? I have no choice but to use that, because I need to call a web service. Unless of course you also have a different solution for that too.
Thanks a lot for your help,
Mathieu
Re: Call DLL Function: Cannot invoke one DLL file more than
Hi,
Indeed the problem has to be in your DLL.
FYI, you can only use DLL's written in unmanaged code - you can't use .NET assemblies.
Indeed the problem has to be in your DLL.
FYI, you can only use DLL's written in unmanaged code - you can't use .NET assemblies.
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
m.duchesneau
- Posts: 21
- Joined: Tue May 24, 2011 1:42 pm
Re: Call DLL Function: Cannot invoke one DLL file more than
Thank you, that's what I figured out also. To work around the problem, I have switched my DLLs to console applications which I can using Run Program and fetch the return value.
Still I would like to have an answer to my question: How do you usually go about calling Web services and receiving their response values?
Thank you!
Mathieu
Still I would like to have an answer to my question: How do you usually go about calling Web services and receiving their response values?
Thank you!
Mathieu
Re: Call DLL Function: Cannot invoke one DLL file more than
Hi,
What exactly do you mean by "calling Web services"? What are you trying to do?
What exactly do you mean by "calling Web services"? What are you trying to do?
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

