Visual Basic Concepts
Once an in-process component project is tested and debugged in the development environment, you can compile and test the .dll file.
Note This topic is part of a series that walks you through creating a sample ActiveX DLL. It begins with the topic Creating an ActiveX DLL.
An ActiveX component is compiled the same way any Visual Basic project is compiled — by choosing Make from the File menu. The .dll file includes a type library that describes your objects and allows them to be browsed.
Visual Basic makes it easy to add the necessary lines to the Windows Registry. You don’t have to write any code, and you don’t have to understand the format of registry entries. When you make the executable file, Visual Basic automatically registers it on your computer.
Note When you distribute your application as part of an integrated solution, registration is done during setup. If you use the Visual Basic Package and Deployment Wizard, registration of your component will be included in the setup process automatically. This is discussed in "Deploying Components" in "Debugging, Testing, and Deploying Components."
For More Information The Package and Deployment Wizard is described in "Distributing Your Applications" in the Visual Basic Programmer’s Guide.
To compile and test the OLE DLL executable
Visual Basic displays a warning message, because the TestThing project contains a reference to ThingDemo. Click Yes to remove ThingDemo anyway.
When you remove ThingDemo from the project group, Visual Basic looks for ThingDemo.dll in the Windows Registry. If the .dll file exists, Visual Basic automatically updates the reference you set in "Creating the TestThing Project."
To switch back to using the project instead of the binary component, you can click Add Project on the File menu, and add the ThingDemo project back to the project group.
You can compile TestThing.exe, and run it with the .dll. You can also test the compiled ThingDemo.dll from other applications.
To use ThingDemo.dll in another copy of Visual Basic
You can now add code to create Thing and Dialogs objects and invoke their properties and methods.
For More Information You can read more about test projects and debugging techniques in "Debugging, Testing, and Deploying Components."
This topic is part of a series that walks you through creating a sample ActiveX DLL.
To | See |
Go to the next step | Circular References and Component Shutdown |
Start from the beginning | Creating an ActiveX DLL. |