How To Register and Unregister an Out-of-Process COM Component (ActiveX EXE) (297279)



The information in this article applies to:

  • Microsoft Visual Basic Enterprise Edition for Windows 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 5.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0

This article was previously published under Q297279

SUMMARY

This article describes how to register and unregister an out-of-process Component Object Model (COM) component. In Visual Basic, an out-of-process COM component corresponds to an ActiveX EXE file.

MORE INFORMATION

You can type these commands in a command window, or you can click Run from the Windows Start menu and type the commands.

To register the component, type the following command:

<path>\<mycomponent> /regserver

where <path> is the path to the component, and <mycomponent> is the name of your component.

To unregister the component, type the following command:

<path>\<mycomponent> /unregserver

where <path> is the path to the component, and <mycomponent> is the name of your component.

Visual Basic ActiveX EXE files register themselves the first time you run the EXE. However, you cannot use the EXE as a COM server until it is registered.

If you use the Package and Deployment Wizard or the Application Setup Wizard to distribute your ActiveX EXE, the EXE is registered automatically during application installation.

If you are working in the Visual Basic Integrated Development Environment (IDE), when you use the References dialog box to browse to the file location of an ActiveX EXE that is not registered, the component is registered when you add the EXE as a reference to the project.

Modification Type:MinorLast Reviewed:7/1/2004
Keywords:kbhowto kbLocalSvr KB297279