Call DLL Function Not Working on Clean PC

Got a problem you cannot solve? Try here.
Christina
Posts: 5
Joined: Fri Feb 12, 2016 10:36 am

Call DLL Function Not Working on Clean PC

Postby Christina » Fri Aug 26, 2016 10:27 am

Hello,

I've been writing an install, using InstallAware X3, that uses the Call DLL Function in order to call a native code DLL. When I run the installer on my development PC [32-bit Windows 7], it will go into the DLL without any problems. I have tested it as a release install and have also debugged it and it did step in to the DLL and work properly. I was able to tell if it worked on the release install by putting a message box into the beginning of the code. However, when I run it on my test PCs [32-bit Windows 7 and 64 bit Windows 7, the installer just skips over the Call DLL Function. There are no errors that come up at all, but it doesn't step into the DLL at all.

All of the dependencies for the DLL are present and in their correct spots at the time of the call. I checked this by getting the list of dependencies from Visual Studio's "dumpbin", adding a message box into the installer to pause it, and then checking if each one of the DLLs on the list were in their proper locations.

Here is the code from InstallAware for the DLL Call Function:

Code: Select all

~InstallAware Clipboard Data~
~Call DLL Function~
~{567DB413-0B71-4D0D-B957-2464B0B5032E}~
~$TARGETDIR$\ConfigRA\RAWrapper.dll,IsValid,word,DllReturn1,"pointer to string",$SN$,"pointer to string",$secstring$,"pointer to string",$orderNum$,"pointer to string",$actBy$,"allocated string buffer (MAX_PATH length)",$isValid$,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Comment~
~{52323C82-DA85-493D-9621-E20433EFD0A2}~
~~
~Set Variable~
~{DFD9D80F-22A5-4EB1-A07C-B9CE22157FD5}~
~dllreturn1$MYAH$MYAH$FALSE~
~~
~Set Variable~
~{84B72E74-4A85-4ED3-82D2-065DE954D799}~
~isValid$MYAH$MYAH$FALSE~
~~


What could be causing this issue?

Thank you.
-Christina

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Call DLL Function Not Working on Clean PC

Postby FrancescoT » Fri Aug 26, 2016 11:06 am

Dear Christina,

if the dll gets called correctly on your dev machine, the problem with the clean machine is forcedly caused by a missing component or by a incorrect version of a component (this may be possible in case you are testing your dll on different OS).

Instead of dumpbin, I suggest you to use "Dependency Walker" (it's free). This gives you an exact picture of what your dll needs to run properly.
http://www.dependencywalker.com

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Christina
Posts: 5
Joined: Fri Feb 12, 2016 10:36 am

Re: Call DLL Function Not Working on Clean PC

Postby Christina » Wed Aug 31, 2016 8:28 am

Dear Francesco,

Thank you for the help.
The issue came up because one of my DLLs wasn't being added to the GAC on the test PC.

- Christina

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Call DLL Function Not Working on Clean PC

Postby FrancescoT » Thu Sep 01, 2016 4:30 am

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Bing [Bot] and 186 guests