Kindly, i need a sample of how to use the Call Dll Function in InstallAware.
I need to develop a new dll using C# code.
Call Dll Function
Re: Call Dll Function
Dear Ghyath,
To call a DLL function, simply drag (or start typing) the Call DLL Function command in the MSIcode tab in your InstallAware IDE. Enter the path to your dll in the "DLL Path" field (for example - %TARGETDIR%\mydll.dll). Enter your function's name in the "Function Name" field and that should do it - let me know if you have further questions.
To call a DLL function, simply drag (or start typing) the Call DLL Function command in the MSIcode tab in your InstallAware IDE. Enter the path to your dll in the "DLL Path" field (for example - %TARGETDIR%\mydll.dll). Enter your function's name in the "Function Name" field and that should do it - let me know if you have further questions.
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
Re: Call Dll Function
Thanks for you reply,
I already did what you said, but i am still getting this error FUNCTIONNOTFOUND.
This means that the dll is loaded but the function could not be found.
I already did what you said, but i am still getting this error FUNCTIONNOTFOUND.
This means that the dll is loaded but the function could not be found.
Re: Call Dll Function
Dear Ghyath,
Are you sure you exported your functions properly? Are you sure that your compiler doesn't decorate the functions' headers?
Try running cmd.exe and typing rundll32 DLL, FUNC
where DLL is the full path to your DLL and FUNC is your function's name.
For example: rundll32 c:\windows\system32\user32.dll, MessageBoxA
Are you sure you exported your functions properly? Are you sure that your compiler doesn't decorate the functions' headers?
Try running cmd.exe and typing rundll32 DLL, FUNC
where DLL is the full path to your DLL and FUNC is your function's name.
For example: rundll32 c:\windows\system32\user32.dll, MessageBoxA
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
Re: Call Dll Function
Thank you for your reply.
I tried the above, an error occurred after running the rundll32 which is Missing entry: MethodName.
do you have any idea how to solve it.
note that I am using C# class library project.
I tried the above, an error occurred after running the rundll32 which is Missing entry: MethodName.
do you have any idea how to solve it.
note that I am using C# class library project.
Re: Call Dll Function
I found this link that may help http://sites.google.com/site/robertgies ... gedexports
Re: Call Dll Function
Dear Ghyath,
Thanks, but note that your problem had to do with how you build your DLL and not with InstallAware.
Thanks, but note that your problem had to do with how you build your DLL and not with InstallAware.
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
Thanks for the link Ghyath, it proved very useful to me, as I wanted to create a DLL using VS2010 and the .NET Framework4; it works like a charm.
cheers!
Mat
cheers!
Mat
-
isatterfield
- Posts: 2
- Joined: Tue Jan 10, 2012 1:56 pm
Re: Call Dll Function
I can't get this to work. I used the Test example, it compiles clean in Visual Studio 2010 using .NET Framework 3.5 and Robert's template project. I'm trying to build his Test class example.
I still get FUNCTIONNOTFOUND from InstallAware. And when I use RunDLL32, it says I'm missing the entry point for Add.
I added <Import Project="$(MSBuildProjectDirectory)\DllExport\RGiesecke.DllExport.targets" /> and have his DLLExport class. It compiles clean, but still can't find the function. Any insight would be greatly appreciated.
I still get FUNCTIONNOTFOUND from InstallAware. And when I use RunDLL32, it says I'm missing the entry point for Add.
I added <Import Project="$(MSBuildProjectDirectory)\DllExport\RGiesecke.DllExport.targets" /> and have his DLLExport class. It compiles clean, but still can't find the function. Any insight would be greatly appreciated.
Re: Call Dll Function
Clarification - Call DLL Function works on 32 bit WinAPI style DLLs (including custom DLLs that have stdcall/WinAPI function exports).
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

