COM Creation Problem
-
Hello, I have the following method to help me in installing some COM components onto the machine...below is a snippet that is causing the problem...
Type objType = null; COMAdminCatalog objCatalog = null; COMAdminCatalogCollection objApplicationsColl = null; COMAdminCatalogObject objApp = null; try { objType = Type.GetTypeFromProgID("COMAdmin.COMAdminCatalog"); objCatalog = (COMAdminCatalog)(System.Activator.CreateInstance(objType));
It is part of setup application...so when I run the setup on my machine, it works fine.... However, when I try to test it on one of our servers.....I get a Specified Cast is Invalid exception from this line objCatalog = (COMAdminCatalog)(System.Activator.CreateInstance(objType)); I am guessing its a problem with either one of the last two line....forgive me, im new to COM Thanks in advance -
Hello, I have the following method to help me in installing some COM components onto the machine...below is a snippet that is causing the problem...
Type objType = null; COMAdminCatalog objCatalog = null; COMAdminCatalogCollection objApplicationsColl = null; COMAdminCatalogObject objApp = null; try { objType = Type.GetTypeFromProgID("COMAdmin.COMAdminCatalog"); objCatalog = (COMAdminCatalog)(System.Activator.CreateInstance(objType));
It is part of setup application...so when I run the setup on my machine, it works fine.... However, when I try to test it on one of our servers.....I get a Specified Cast is Invalid exception from this line objCatalog = (COMAdminCatalog)(System.Activator.CreateInstance(objType)); I am guessing its a problem with either one of the last two line....forgive me, im new to COM Thanks in advanceHi! Did you verify that
objType
is correct on the server? Is the COM class registered correctly on the server?Regards, mav -- Black holes are the places where god divided by 0...