Deploying wrapper libraries
Deploying a wrapper library on a target machine requires at least three phases:
-
Building the library as a DLL.
-
Delivering the DLL and the wrapped XLL to the target machine.
-
Installing any files required by the implementation model.
Building the VB6 project
Before deploying the wrapper library, you must first compile the VB6 project as
a DLL executable file. Before building it you might consider amending it as
follows.
-
Change the project description
-
Set the version number, product name, copyright and trademarks
-
Set the version compatibility to 'Binary Compatibility'
-
Alter the DLL base address
-
Build and register a help file
-
Amend the GetAddins event
handler, if you want to install the XLL file in a directory other than that
containing the COM wrapper DLL, or if you are wrapping multiple XLLs.
Delivering the DLL
Delivering the COM wrapper DLL to a target machine involves three steps:
-
Copy the wrapper DLL and the wrapped XLL(s) to a single directory on the target
machine. (If you have amended the GetAddins
event handler, then the XLL(s) may need to be installed in a different
directory.)
-
If the XLL has any dependencies on other DLLs these should also be delivered to
the target machine and placed in appropriate directories. You may wish to the
the Dependency Walker to check all dependencies of your XLL. (You can download
this utility from http://www.dependencywalker.com.)
-
Register the COM DLL. You can do this with a command line such as
REGSVR32 C:\Files\MYWRAPPERLIB.DLL
where C:\Files\MYWRAPPERLIB.DLL is replaced by the full path of the wrapper DLL
on the target machine. (Note: You must ensure that the VB6 runtime
(msvbvm60.dll) is present on the target machine before registering the wrapper
library.)
'Excel Application' implementation model
The target machine requires a copy of Excel 97, Excel 2000, Excel XP or Excel
2003.
'XLL Host' implementation model
As well as installing the wrapper library, you must ensure that a licensed copy
of the XLL Host library is registered on the target
machine.
The special build of xlcall32.dll must also be
present on the target machine (see XLL Host
Deployment).
See Also
XLL+ COM wrapper generator | Generated code | Calling the COM methods | XLL Host deployment