Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Com+ in Windows 2003

Status
Not open for further replies.

cobas

Programmer
Feb 4, 2002
21
GB
I have an application written in vb6 that calls a function to create a com+ application and install the components. This work for win2k see below, but does not work for win 2003. Any ideas?

Function SetupiPort() As Boolean ' Return False if any errors occur.

' Initialize error handling for this function.
SetupiPort = False
' On Error GoTo My_Error_Handler

' Open a session with the catalog.
' Instantiate a COMAdminCatalog object.
Dim objCatalog As COMAdminCatalog
Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog")

' Create a new COM+ application.
' First get the "Applications" collection from the catalog.
Dim objApplicationsColl As COMAdminCatalogCollection
Set objApplicationsColl = objCatalog.GetCollection("Applications")

' Add a new item to this collection.
Dim objcomApp As COMAdminCatalogObject
Set objcomApp = objApplicationsColl.Add

' The "Applications" collection determines the available properties.
' Set the "Name" property of the new application item.
objcomApp.Value("Name") = "MyComponents"

' Set the "Description" property of the new application item.
objcomApp.Value("Description") = "My Components"

' Save changes made to the "Applications" collection.
objApplicationsColl.SaveChanges

' Install components into the application.
' Use the InstallComponent method on COMAdminCatalog.
' In this case, the last two parameters are passed as empty strings.
objCatalog.InstallComponent "MyComponents", "c:\mydll\myvers30.dll", "", ""

Exit Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top