Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. COM Creation Problem

COM Creation Problem

Scheduled Pinned Locked Moved C#
helpcomworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abbas82
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • A Abbas82

      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

      M Offline
      M Offline
      mav northwind
      wrote on last edited by
      #2

      Hi! 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...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups