Option #1: make A.DLL "delay load" B.DLL and also load B.DLL into a resource in A.DLL. Either from your DllMain() method or from your custom action method(s), extract B.DLL from its resources into the same directory as the A.DLL was extracted to by Windows Installer. Erase it in DllMain() when the DLL is unloaded. This is the most flexible at runtime (can be used no matter if the CAs are immediate/deferred, etc.) but requires that you have "complete" control over A.DLL.
Option #2: make A.DLL "delay load" B.DLL, place B.DLL into the binary table, and extract B.DLL from your custom action method(s) before any calls into B.DLL. This will only work for immediate mode CAs and also requires "complete" control over A.DLL. Option #3: make A.DLL able to load B.DLL from a known location, and install B.DLL to that location. This will only work for deferred CAs scheduled after InstallFiles or immediate CAs scheduled after InstallFinalize, and will not work for CAs that need to run during removals. Option #4 (variation on #1 if you don't have control over A.DLL's source code): Make C.DLL that has both A.DLL and B.DLL incorporated as resources, and duplicate A.DLL's entrypoints. Incorporate C.DLL (not A.DLL or B.DLL) into the Binary table. Each CA in C.DLL extracts A.DLL and B.DLL, then calls the same entrypoint in A.DLL. This is sort of what DTF does (except that DTF adds in the additional wrinkle of pushing off A.DLL into a separate process to avoid "stamping" Windows Installer's CA sandbox process with whatever version of .Net's runtime was first used by a managed CA). Blair -----Original Message----- From: Alex Ivanoff [mailto:alex.ivan...@shavlik.com] Sent: Thursday, January 06, 2011 4:59 PM To: chr...@deploymentengineering.com; General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Custom action dll that depends on another dll A.DLL is a C++ dll in binary table. On Jan 6, 2011, at 18:09, Christopher Painter <chr...@deploymentengineering.com> wrote: > I would need more information to be able to answer that. Do you install the DLL's then call them or do you call A.dll out of the Binary table? Is A.DLL C++ or C#/DTF? > > Christopher Painter, Author of Deployment Engineering Blog > Have a hot tip, know a secret or read a really good thread that deserves attention? E-Mail Me > > > --- On Thu, 1/6/11, Alex Ivanoff <alex.ivan...@shavlik.com> wrote: > >> From: Alex Ivanoff <alex.ivan...@shavlik.com> >> Subject: [WiX-users] Custom action dll that depends on another dll >> To: wix-users@lists.sourceforge.net >> Date: Thursday, January 6, 2011, 5:34 PM >> Let's say I have a custom action dll >> A.DLL that depends on B.DLL. Is there >> a way to make it work? >> >> ---------------------------------------------------------------------------- -- >> Learn how Oracle Real Application Clusters (RAC) One Node >> allows customers >> to consolidate database storage, standardize their database >> environment, and, >> should the need arise, upgrade to a full multi-node Oracle >> RAC database >> without downtime or disruption >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> > > > > > ---------------------------------------------------------------------------- -- > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users