Epi Info™ User Guide
Command Reference
Check Commands: Define DLLObject
Description
This command creates a variable that represents an ActiveX object and a class within an ActiveX DLL (dynamic link library) file, ActiveX EXE (executable file), or a Windows Scripting Component (WSC) file.
Syntax
ActiveX DLL File
DEFINE <variable> DLLOBJECT “<ActiveX name>.<class>”
Windows Scripting Component (WSC) File
DEFINE <variable> DLLOBJECT “<filename>”
- The <variable> represents the name of the variable to be created. <variable> cannot be a reserved word.
- The <ActiveX name> represents the internal name of the ActiveX object that contains the class object for the DLL or EXE file.
- The <class> represents an internal class name that is defined within the ActiveX component.
- The <filename> represents the name of the Windows Scripting Component (WSC) file where the script component resides.
Comments
The ActiveX name may not be the same as the actual name of the dll (dynamic link library) or executable (exe) file. An ActiveX object is given a name when it’s developed. This name is required to create the object. The ActiveX object (executable or dll) must be registered before it can be used. Windows Scripting Component (WSC) objects can also be used.
Examples
Example 1: A variable is created that points to a class object within the Epiweek DLL file. This variable can subsequently be used to find the Epi Week for any given date.
DEFINE Week DLLOBJECT "EIEpiwk.Epiweek"
Example 2: A variable is created that points to a class object within the GetGlobalUniqueID.WSC file. You can use this variable to assign a field a unique ID.
DEFINE Global_ID DLLOBJECT "GetGlobalUniqueID.WSC"