473,799 Members | 3,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error with COM + 1.0 Admin Type Library (COMAdmin) interop on Win2K. 2003 works.

I've cross-posted this in the COM+ group as well -
apologies if that's a no-no. But the problem might be
caused by either... interop or just plain COMAdmin.
=============== =============== ===============

I've got a VB.NET app that is trying to access the
Component Services catalog. The first class method
installs a new component at a specified location. The
second method searches for a specified component and
deletes it.

The reference is to COM + 1.0 Admin Type Library
(COMAdmin)... located in %systemroot%\sy stem32\com\.

The framework version on the 2003 and 2000 servers is
v1.1.4322. The application was developed for that
version (using Visual Studio .NET 2003).

This code works 100% on Windows 2003 server. When trying
to run it on Windows 2000 server, it fails with the
following error:
=START========= =============== =============== =====
See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.InvalidC astException: QueryInterface for interface
COMAdmin.ICOMAd minCatalog2 failed.

at COMAdmin.COMAdm inCatalogClass. GetCollection(S tring
bstrCollName)

at
SecurDOCS_COM_U tility.Componen tServicesManage r.DeleteCompo
nent(String componentName, String& applicationName )

at SecurDOCS_COM_U tility.COMUtili ty.btnReplace_C lick
(Object sender, EventArgs e)

at System.Windows. Forms.Control.O nClick(EventArg s e)

at System.Windows. Forms.Button.On Click(EventArgs e)

at System.Windows. Forms.Button.On MouseUp(MouseEv entArgs
mevent)

at System.Windows. Forms.Control.W mMouseUp(Messag e& m,
MouseButtons button, Int32 clicks)

at System.Windows. Forms.Control.W ndProc(Message& m)

at System.Windows. Forms.ButtonBas e.WndProc(Messa ge& m)

at System.Windows. Forms.Button.Wn dProc(Message& m)

at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage
(Message& m)

at System.Windows. Forms.ControlNa tiveWindow.WndP roc
(Message& m)

at System.Windows. Forms.NativeWin dow.Callback(In tPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
=END=========== =============== =============== =====
Here's the class code:

=START========= =============== =============== ======
Imports COMAdmin

Public Class ComponentServic esManager
Public Sub InstallComponen t(ByVal componentName As
String, ByVal applicationName As String)
Dim oCatalog As New COMAdminCatalog

oCatalog.Instal lComponent(appl icationName,
componentName, Nothing, Nothing)
End Sub

Public Function DeleteComponent (ByVal componentName As
String, ByRef applicationName As String) As Boolean
applicationName = ""
Dim oCatalog As New COMAdminCatalog

' Get the Applications collection and populate it.
Dim oApplications As COMAdminCatalog Collection
oApplications = CType(oCatalog. GetCollection
("Applications" ), COMAdminCatalog Collection)
oApplications.P opulate()

' Get the correct application
Dim oAppObject As COMAdminCatalog Object

For Each oAppObject In oApplications
' Get and populate the Components collection
Dim oComponents As COMAdminCatalog Collection
oComponents = CType(oApplicat ions.GetCollect ion
("Components ", oAppObject.Key) , COMAdminCatalog Collection)
oComponents.Pop ulate()

' Get the correct component
Dim oCompObject As COMAdminCatalog Object
Dim iComponentIndex As Integer = 0

For Each oCompObject In oComponents
Dim sCompDLLValue As String =
oCompObject.Val ue("DLL").ToStr ing

If sCompDLLValue = componentName Then
applicationName =
oAppObject.Name .ToString
oCatalog.Shutdo wnApplication
(oAppObject.Nam e.ToString)
oComponents.Rem ove(iComponentI ndex)
oComponents.Sav eChanges()
End If
iComponentIndex += 1
Next

oCompObject = Nothing
Next

If Not applicationName = "" Then
Return True
Else
Return False
End If

oCatalog = Nothing
oApplications = Nothing
oAppObject = Nothing

End Function
End Class

=END=========== =============== =============== =====

I need this to work on Windows 2000 server ASAP. Any
ideas what the problem is?

TIA
Jul 21 '05 #1
0 3256

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
19186
by: Yitzhak | last post by:
I am having "Permission denied" error while calling LogEvent method of WScript.Shell component. Basically, ASP page calls Windows Script Host Shell component to log events to the OS Application Event log. My environment: Windows Server 2003, IIS 6, WSH, Classic ASP, Vbscript Below is the code and the error: Code:
0
2813
by: Ola Ogunneye | last post by:
--=_075912CF.F899D547 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello again all, I have created an account in the particular database that I was trying to backup Using PHPMYADMIN and I also created the same user account on the OS side. I still got the same 1064 message afterwards. I am still relatively new to Mysql and my adding user only works when I use
2
329
by: Paul P | last post by:
I am having a problem writing errors to the application log on a Windows 2003 server running IIS 6 The error message is "InvalidOperationException: Cannot open log for source {0}." I have created a Key called "TEST" under the Application in the Registry based on the microsoft article 329291 and using Solution 1 in that article In the code I basically do the following Dim MyLog as new EventLog( MyLog.Source = "TEST
9
10906
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent the wheel, right? Everything so far is working well with the Active Directory. The problem I am having is with adding File Permissions to a directory. I am currently using some code courtesy of "Willy Denoyette "
0
1001
by: dwa | last post by:
I get an "provider load error" at the end of the FMStocks example installtion. After rollback, here's the log: Anyone know what this is about? -- dwa $ Touchup project user options (i.e., .csproj.user) files
7
5032
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
8
3426
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be added. Converting the type library to a .Net assembly failed. A depended type library 'CDO' could not be converted to a .NET assembly. A dependent type library 'ADODB' could not be converted to a .NET assembly. Item has already been added." ...
0
2488
by: MarkD | last post by:
I have an ASP.NET (VB.NET) application that calls all VB6 COM DLL via Interop. The DLL uses functionality contained in a Custom OCX Control (Also VB6) that in turn contains a standard TreeView control. The Custom OCX is not used for visual purposes, but has some functionality that we require (hence hosting an OCX in a DLL). Everything worked fine until we installed the latest service pack for each respective windows operating system:...
0
692
by: Grant | last post by:
I've cross-posted this in the COM+ group as well - apologies if that's a no-no. But the problem might be caused by either... interop or just plain COMAdmin. ============================================= I've got a VB.NET app that is trying to access the Component Services catalog. The first class method installs a new component at a specified location. The second method searches for a specified component and deletes it.
0
9538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10470
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9067
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7561
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2935
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.