Microsoft KB Archive/243416: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 46: Line 46:
This article describes how to add and associate COM objects and ActiveX Controls that are used by Microsoft Visual C++ clients in Visual Studio Installer (VSI) packages. It assumes that you are familiar with COM, ActiveX, GUIDs, Class IDs, type libraries, and ProgIDs.<br />
This article describes how to add and associate COM objects and ActiveX Controls that are used by Microsoft Visual C++ clients in Visual Studio Installer (VSI) packages. It assumes that you are familiar with COM, ActiveX, GUIDs, Class IDs, type libraries, and ProgIDs.<br />
<br />
<br />
Throughout this article, the words &quot;COM object&quot; refer to both COM objects and ActiveX controls.
Throughout this article, the words "COM object" refer to both COM objects and ActiveX controls.


</div>
</div>
Line 66: Line 66:
<li>Right-click anywhere in the Associations Editor, and then select '''Add Document Type'''.</li>
<li>Right-click anywhere in the Associations Editor, and then select '''Add Document Type'''.</li>
<li>Set the '''Name''' property of the new document type to the ProgID of the COM object.</li>
<li>Set the '''Name''' property of the new document type to the ProgID of the COM object.</li>
<li>Delete the child named &quot;New Extension.&quot;</li></ol>
<li>Delete the child named "New Extension."</li></ol>
</li>
</li>
<li>Add the COM object in the Associations Editor:
<li>Add the COM object in the Associations Editor:

Latest revision as of 12:49, 21 July 2020

Knowledge Base


How To Add and Associate COM Objects for Visual C++ Clients in Visual Studio Installer

Article ID: 243416

Article Last Modified on 8/30/2004



APPLIES TO

  • Microsoft Visual Studio Installer 1.0



This article was previously published under Q243416

SUMMARY

This article describes how to add and associate COM objects and ActiveX Controls that are used by Microsoft Visual C++ clients in Visual Studio Installer (VSI) packages. It assumes that you are familiar with COM, ActiveX, GUIDs, Class IDs, type libraries, and ProgIDs.

Throughout this article, the words "COM object" refer to both COM objects and ActiveX controls.

MORE INFORMATION

Use the following procedure to add and associate COM objects and ActiveX controls.

  1. Add the COM object to the VSI project:
    1. Open the File System Editor.
    2. Add the COM object .dll/.ocx/.exe to the desired folder.
    3. Select the file and set the Register property to 0-vsifrNone. Instead of self-registering, Windows Installer now registers the component.
  2. Create a new document type:
    1. Open the Associations Editor.
    2. Right-click anywhere in the Associations Editor, and then select Add Document Type.
    3. Set the Name property of the new document type to the ProgID of the COM object.
    4. Delete the child named "New Extension."
  3. Add the COM object in the Associations Editor:
    1. Right-click anywhere in the Associations Editor.
    2. Select Add COM Object.
    3. Set the name (CLSID property) to the COM object CSLID GUID.
    4. If you use a .dll or .ocx file, set the Context property to 4 - vsiccInprocServer32.

      If you use an .exe file, set the Context property to 2 - vsiccLocalServer32.
    5. Set the DocumentType property to the document that you created in step 2c.
    6. Set the Component property to the file that contains the COM object. An ellipsis button appears when you select this property. Click the button to browse to the COM object .dll/.ocx/.exe file.
  4. Set document type properties:
    1. In the Associations Editor, select the document type that you created in step 2.
    2. Change the COMObject property to the GUID that you added in step 3c.
  5. Add the type library to the Visual Studio Installer project (but if your type library already exists in the file that you added in step 1, then skip to step 7):
    1. Open the File System Editor.
    2. Add the COM object .dll/.ocx/.exe file to the desired folder.
    3. Select the file and set the Register property to 0-vsifrNone. Instead of self-registering, Windows Installer now registers the component.
  6. Add the type library file to the Visual Studio Installer project:
    1. In the File System Editor, add the type library file to your project.
    2. Select the .tlb file and set its Register property to 0-vsifrNone.
  7. Add the type library in the Associations Editor:
    1. Right-click anywhere in the Associations Editor.
    2. Select Add Type Library.
    3. Set the LibID property to the type library's GUID.

You must associate a document type for every COM object in your .dll/.ocx/.exe file. In other words, if you have multiple COM classes, you must repeat steps 1-4 for every COM class.

Keywords: kbhowto KB243416