Microsoft KB Archive/298365

= PRB: Error &quot;COM+ Internal Runtime Error 0x80041011&quot; =

Article ID: 298365

Article Last Modified on 12/5/2007

-

APPLIES TO


 * Microsoft COM+ 1.0
 * Microsoft COM+ 1.5

-



This article was previously published under Q298365



SYMPTOMS
When you write a component that manipulates the COM+ catalog through the COM+ Admin objects, if you call this component from Active Server Pages (ASP) on Microsoft Windows 2000 and Microsoft Windows XP, you may receive the following error message:

COM+ internal runtime error 0x80041011



CAUSE
The component that you are trying to install is already configured in a COM+ application.



RESOLUTION
To resolve this problem, add code to the method that installs the new component to detect if that component is already configured. For example, the following Microsoft Visual Basic code determines whether a component in a given dynamic-link library (DLL) is already configured in COM+: Private Function IsComponentInstalled(AppName as String, DllPath as String) As Boolean Dim comCat As COMAdmin.COMAdminCatalog Set comCat = New COMAdmin.COMAdminCatalog IsComponentInstalled = False ' Get the Applications collection from the COM+ catalog. Dim comApps As COMAdmin.COMAdminCatalogCollection Dim App As COMAdminCatalogObject Set comApps = cat.GetCollection(&quot;Applications&quot;) comApps.Populate Dim comComps As COMAdminCatalogCollection Dim comp As COMAdminCatalogObject ' Get the specific application that you are interested in. For Each app In comApps If app.Name = AppName Then Exit For End If   Next app ' Get the Components collection from that application. Set comComps = apps.GetCollection(&quot;Components&quot;, app.Key) comComps.Populate

' Determine if any component in the collection belongs to the DLL in question. For Each comp In comComps If comp.Value(&quot;DLL&quot;) = DllPath Then IsComponentInstalled = True Exit For End If   Next comp End Function

Additional query words: 0x80041011

Keywords: kbsysadmin kbprb KB298365

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.